1
1
mirror of https://github.com/walles/moar.git synced 2024-09-11 12:15:43 +03:00
Commit Graph

136 Commits

Author SHA1 Message Date
Johan Walles
ea5b4fdefe Extract search string compilation into its own testable function 2019-07-06 13:51:48 +02:00
Johan Walles
1e7cc90455 Merge branch 'walles/go-search' into go 2019-07-06 13:34:13 +02:00
Johan Walles
633d4b0db7 Scroll left and right using arrow keys 2019-07-06 13:33:41 +02:00
Johan Walles
16c92de86c Add support for searching backwards 2019-07-06 10:31:40 +02:00
Johan Walles
0f7ae9d089 Warn about unexpected pager modes 2019-07-06 07:54:33 +02:00
Johan Walles
ed657dbde6 Implement searching for next hit 2019-07-06 07:45:07 +02:00
Johan Walles
7d6f1f5361 Scroll to first hit while typing 2019-06-30 22:16:04 +02:00
Johan Walles
9693c91aac Reset search on new '/' 2019-06-30 22:15:27 +02:00
Johan Walles
0646c58a5f Restore screen before printing log messages 2019-06-30 22:11:26 +02:00
Johan Walles
f16d818715 Have the tokenizer provide an unformatted string as well 2019-06-30 15:06:33 +02:00
Johan Walles
a90f4939a4 Merge branch 'walles/go-search' into go
This enables search in a way, but it only highlights matches, it doesn't
scroll to where they are.
2019-06-30 09:54:23 +02:00
Johan Walles
4541f7fb08 Fix crash before first search 2019-06-30 09:53:24 +02:00
Johan Walles
af10a5f6c7 Add search matching functionality 2019-06-30 09:43:58 +02:00
Johan Walles
dd0e438f9a Restore screen before panicking 2019-06-29 22:27:18 +02:00
Johan Walles
8a8672a1e9 Add logic for highlighting search hits 2019-06-29 18:29:37 +02:00
Johan Walles
8a9470c651 Add a cursor when entering the search string 2019-06-29 11:24:03 +02:00
Johan Walles
656c01456e Enable entering a search string 2019-06-29 11:20:48 +02:00
Johan Walles
917a096270 Support / for search mode, ESC for back to view 2019-06-28 22:43:03 +02:00
Johan Walles
e78f452557 Add support for man page rendering 2019-06-27 21:39:46 +02:00
Johan Walles
59c21d4fec Merge branch 'walles/go-auto-decompress' into go 2019-06-25 19:45:49 +02:00
Johan Walles
94007d767c Plan for more filter testing 2019-06-25 19:44:22 +02:00
Johan Walles
fd10508c8d Implement transparent decompression 2019-06-24 21:55:33 +02:00
Johan Walles
e640c7d856 Add (failing) compressed-files tests 2019-06-23 21:30:11 +02:00
Johan Walles
70500056af Show file name and line numbers 2019-06-21 23:24:53 +02:00
Johan Walles
007112e896 Merge branch 'walles/go-fix-ci' into go 2019-06-19 07:25:29 +02:00
Johan Walles
4afce791c2 Add highlight to the Travis runs 2019-06-19 07:13:05 +02:00
Johan Walles
8b0e695a82 Prepare for dynamic footer from the GetLines() result 2019-06-18 21:58:17 +02:00
Johan Walles
7a33e82ba1 It's already there 2019-06-18 20:19:07 +02:00
Johan Walles
e1c3bf0a17 Merge branch 'walles/go-highlight' into go 2019-06-18 20:18:28 +02:00
Johan Walles
7517856fda Add usability FIXME 2019-06-18 20:17:56 +02:00
Johan Walles
354c4d13a8 Correct documentation 2019-06-18 20:15:15 +02:00
Johan Walles
c33fd4eb47 Add missing SGI code
00 is produced by highlight.
2019-06-18 20:12:35 +02:00
Johan Walles
bd4f7c5567 Fix the glitch 2019-06-18 20:11:27 +02:00
Johan Walles
f546e05cb7 Code complete, doesn't work 2019-06-18 20:06:38 +02:00
Johan Walles
1ec6216ab1 Add code highlighting test 2019-06-18 19:47:23 +02:00
Johan Walles
5cc47df367 Render broken UTF8 as red-on-white question marks
The default broken UTF8 marker in Go doesn't render well in my terminal.
2019-06-18 19:08:35 +02:00
Johan Walles
3011b15a09 Add note about broken UTF8 2019-06-17 22:22:17 +02:00
Johan Walles
9619c020e4 Add support for rendering TABs 2019-06-17 21:39:57 +02:00
Johan Walles
42c45aedae Simplify Reader API 2019-06-16 21:54:25 +02:00
Johan Walles
e4006b2c78 Support inverse video 2019-06-16 21:39:27 +02:00
Johan Walles
aa1cd1da5f Actually match moar and less output colors 2019-06-16 21:26:04 +02:00
Johan Walles
eecd9120cd Look more like Ruby moar and less 2019-06-16 21:12:08 +02:00
Johan Walles
75760fb7fa Support rendering bold text 2019-06-16 20:58:19 +02:00
Johan Walles
4717624c89 Handle background color changes 2019-06-16 20:57:03 +02:00
Johan Walles
0ba1efbe46 Handle mouse wheel scroll better
Before this change, if you scrolled up a lot with the mouse wheel, thus
creating many arrow-up events, you could sometimes escape and start
scrolling into the terminal's scrollback buffer (iTerm2, macOS).

With this change in place that doesn't happen any more.

I don't understand why.

The difference between Sync() and Show() is that:
* Sync() redraws the entire screen unconditionally
* Show() tries to update only the parts of the screen that actually changed
2019-06-16 20:33:18 +02:00
Johan Walles
a1cdf0c200 Add logging 2019-06-16 10:02:19 +02:00
Johan Walles
8da0ecf37e Merge branch 'walles/go-ansi-fgcolor' into go 2019-06-16 09:24:00 +02:00
Johan Walles
abe8f37eaf Fix an off-by-one error 2019-06-16 09:23:25 +02:00
Johan Walles
d7dacd4dae WIP: Implement ANSI foreground color setting
Doesn't work, but the parts are there. Go fix.
2019-06-16 09:14:30 +02:00
Johan Walles
38f3c28faf FIXME: Add broken-UTF8 tests 2019-06-15 17:13:10 +02:00