Johan Walles
0ac8dede4a
Extract editing into a function
2024-06-21 08:20:08 +02:00
Johan Walles
df79efefa7
Add editor launching placeholder code
2024-06-21 08:14:18 +02:00
Johan Walles
5646a67ced
Prevent a useless warning message
2024-01-13 12:37:42 +01:00
Johan Walles
a9d1ad542d
Move gotoLineString to where it should be
...
It only lives as long as the GotoLine mode does, so it should be part of
that struct.
2024-01-09 17:28:49 +01:00
Johan Walles
b2019308e1
Not needed, remove it
2024-01-09 15:41:44 +01:00
Johan Walles
0f60fb4f45
Fix the help text
2024-01-09 15:39:59 +01:00
Johan Walles
a9fbc3f681
Fixups after testing
2024-01-09 15:37:42 +01:00
Johan Walles
ab10a82b6c
Add a mark setting mode
2024-01-09 15:02:43 +01:00
Johan Walles
8fb912e261
Initial marks commit
2024-01-09 14:52:00 +01:00
Johan Walles
900042183a
Ponderings around naming
2024-01-09 14:45:17 +01:00
Johan Walles
07e8bf6142
Pass all tests
2024-01-09 14:14:39 +01:00
Johan Walles
f22f6e7658
Silence false positive linter warnings
2024-01-09 14:10:44 +01:00
Johan Walles
2fbf74559f
Add a go-to-line mode
2024-01-09 13:38:52 +01:00
Johan Walles
dde3525a2b
Implement viewing mode
2024-01-09 13:31:43 +01:00
Johan Walles
74b84eed34
Start extracting pager modes
2024-01-09 12:00:47 +01:00
Johan Walles
5d4201b151
Make pager.go compile again
2024-01-07 08:38:52 +01:00
Johan Walles
05f8c2674b
Make pager.go compile again
2024-01-07 08:26:13 +01:00
Johan Walles
2c1dd09bbe
Fix some compile errors
2024-01-06 18:55:07 +01:00
Johan Walles
55e2daf07f
Move textstyles into the (mostly) not-public part
...
I don't foresee this ever being published for anybody else to use.
2024-01-05 09:12:17 +01:00
Johan Walles
0cac41d753
Make pager.go compile
2024-01-05 06:40:11 +01:00
Johan Walles
f97a57cfaf
Start extracting another package
2024-01-05 06:31:33 +01:00
Johan Walles
f0bc8f2258
Enable revive for unused parameters check
2024-01-01 13:30:25 +01:00
Emanuel Skrenković
1acffbd42e
Page right only to after last char
...
When paging right, it was possible to infinitely go to the right. This
commit changes that so it is only possible to go right until the last
visible character is out of screen.
2023-12-26 12:10:19 +01:00
Johan Walles
d511e50652
Downsample colors to terminal palette
...
As neeed.
This enables you to view 24 bit color documents in a 256 color terminal.
With reduced quality obviously, but still.
2023-12-19 08:47:40 +01:00
Johan Walles
2d383f90d5
Fix a crash
...
Fixes #171 specifically.
2023-12-18 09:24:40 +01:00
Johan Walles
21afb4f2ef
Don't track the formatter
...
They are only needed at startup, so let's not keep them around while
paging.
2023-12-17 16:09:29 +01:00
Johan Walles
a7d8e05daa
Some more not-yet-compiling code
2023-12-17 08:29:46 +01:00
Johan Walles
5c73f124f9
Bump Chroma and remove a workaround
2023-12-17 08:29:06 +01:00
Johan Walles
d8055e7ef0
Centralize visible height calculation
...
And stop doing it wrong in some places.
2023-12-02 13:46:15 +01:00
Johan Walles
f2360746f1
Add forgotten newline
...
Before this change, ReprintAfterExit() didn't end its output with a
newline.
Now it does.
Fixes #165
2023-11-13 13:10:06 +01:00
Johan Walles
cbbdaf632b
Always use style color for plain text
...
Before this change, it only worked on 16M color terminals.
After there's a Chroma release with
https://github.com/alecthomas/chroma/pull/869 in it we should revert
back to "None" here and use the new Chroma release instead.
2023-10-14 08:51:08 +02:00
Johan Walles
aa2b3c91b5
Don't use "string" as a variable name
2023-10-12 07:05:42 +02:00
Johan Walles
273d92c644
"None" is the proper fallback
...
"None" is documented as "No highlighting".
2023-10-12 07:00:39 +02:00
Johan Walles
251513ef66
Use plain style color for unclassified text
...
I believe this fixes #159 .
2023-10-06 19:03:48 +02:00
Johan Walles
4bd2d70a53
Add support for +1234 command line option
...
Fixes #155 .
2023-09-27 20:23:27 +02:00
Johan Walles
c1a43957eb
Add 'gg' to internal help
2023-09-23 12:46:22 +02:00
Johan Walles
5a33eda766
Improve console input EOF handling
...
Related to #126 . Need some Windows tester to tell me how it works.
2023-08-30 21:26:29 +02:00
Johan Walles
00d951bdc9
Make --quit-if-one-screen much more responsive
2023-05-20 08:03:45 +02:00
Johan Walles
2a5b82fe81
Log start / end on trace level
2023-05-20 07:00:05 +02:00
Johan Walles
c84dc09fbf
Remove line numbers when auto-exiting on short input
2023-05-18 09:28:03 +02:00
Johan Walles
3d142c6b1f
Track whether everything fits on screen
...
NOTE: Fix the compile errors next
2023-05-18 09:28:03 +02:00
Johan Walles
e18487fc80
Fix another compile error
2023-05-18 09:28:03 +02:00
Johan Walles
97a799ef06
Fix a compile error
2023-05-18 09:28:03 +02:00
Johan Walles
374660422f
Consider entireFileDisplayed() implementation
2023-05-18 09:28:03 +02:00
Johan Walles
37d6c59cba
Do faster checks first
2023-05-18 09:28:03 +02:00
Johan Walles
628c380b93
Sort of implement quit-if-one-screen
...
Doesn't compile, but still...
2023-05-18 09:26:23 +02:00
Johan Walles
ea94ad40fa
Enable checking whether a reader is done
2023-05-14 19:42:18 +02:00
Johan Walles
eafb70d790
Configurable side scroll amount
...
Using the new --shift command line flag.
Fixes #130 .
2023-03-19 11:57:40 +01:00
Johan Walles
a5bd7037e3
Single character shift when moving right / left
...
By holding ALT while pressing the right / left arrow keys.
Relates to #130 .
2023-03-19 11:25:52 +01:00
Johan Walles
3b2980de8e
Use standoutStyle in the screen footer
2022-12-31 16:54:10 +01:00