1
1
mirror of https://github.com/walles/moar.git synced 2024-11-22 21:50:43 +03:00
Commit Graph

1149 Commits

Author SHA1 Message Date
Johan Walles
5295602e42 Implement rune width measuring 2024-09-15 14:17:41 +02:00
Johan Walles
9c858a7ecb Add a rune width test 2024-09-15 14:13:16 +02:00
Johan Walles
e0e9ee6610 Start telling screen cells from styled runes
One rune can cover multiple screen cells.
2024-09-15 13:56:50 +02:00
Johan Walles
bac6d0d80e Add line wrapping tests 2024-09-15 09:22:24 +02:00
Johan Walles
5b180e20ca Tune docs + linting 2024-09-15 09:12:39 +02:00
Johan Walles
60088072db More tests on the same theme 2024-09-15 09:08:48 +02:00
Johan Walles
8cff9fa78c Use the new function in one more place 2024-09-15 07:32:53 +02:00
Johan Walles
c5a2102377 Add test for wide character support
Failing.
2024-09-15 07:29:19 +02:00
Johan Walles
4930d0aed3 Accept \ characters in URLs
Generated by some software on Windows, also accepted by less. We should
accept them for compatibility reasons.

Fixes #244.
2024-09-14 10:39:36 +02:00
Johan Walles
6d3bf3dfd4 Auto detect JSON for highlighting
Resolves #240.
2024-09-10 16:54:53 +02:00
Johan Walles
f885c873af
Merge pull request #239 from lapo-luchini/version
Use module version when not built with script.
2024-09-03 20:11:55 +02:00
Johan Walles
f1a65a7a8d Maintain build.sh link for local builds 2024-09-03 20:08:42 +02:00
Lapo Luchini
e225cc77f7
Fix indent-error-flow.
Signed-off-by: Lapo Luchini <lapo@lapo.it>
2024-09-01 18:43:51 +02:00
Lapo Luchini
214662484f
Use module version when not built with script.
Signed-off-by: Lapo Luchini <lapo@lapo.it>
2024-08-31 12:49:21 +02:00
Johan Walles
e68547a413 Make line numbers easier to read 2024-08-13 07:00:32 +02:00
Johan Walles
c379459982 Add a regression test
For: https://github.com/walles/moar/issues/236#issuecomment-2282677792
2024-08-13 06:56:16 +02:00
Johan Walles
a67c887554 Include stack trace in panic logs 2024-08-12 21:47:46 +02:00
Johan Walles
27e9c0d68b Merge branch 'johan/color-underline'
Fixes #237.
2024-08-12 20:57:59 +02:00
Johan Walles
f69e58d9b3 Handle reading underline color 2024-08-12 20:57:44 +02:00
Johan Walles
065b95a653 Add a colored underline test case 2024-08-12 20:50:57 +02:00
Johan Walles
d9b3e16e00 Render underline color changes 2024-08-12 20:44:40 +02:00
Johan Walles
ae0ae42241 Support parsing underline color escape sequences 2024-08-12 20:43:10 +02:00
Johan Walles
2c9f16fa2a Add underline color support to Style 2024-08-12 20:39:48 +02:00
Johan Walles
43f17ebe7b Remove no-longer-needed code 2024-08-12 20:31:11 +02:00
Johan Walles
f26ae4ff9a Introduce colorType to ansiString 2024-08-12 20:25:53 +02:00
Johan Walles
44136f6524 More renaming, forgot some things 2024-08-12 18:53:44 +02:00
Johan Walles
42b0bc7e25 Improve naming 2024-08-12 18:36:49 +02:00
Johan Walles
37cf840879 Fix a highlighting issue
Reported here:
https://github.com/walles/moar/issues/236#issuecomment-2282677792
2024-08-11 16:34:29 +02:00
Johan Walles
6cf1223634 Catch errors in goroutines and log them 2024-08-10 08:40:48 +02:00
Johan Walles
3b5b2ff31f Handle scrolling down while stream is loading
I don't know how this could work even without the stream loading, but
now it does.

Fixes #235.
2024-08-09 09:50:38 +02:00
Johan Walles
db41b5c946 Give tests more time on Windows
CI is slow on Windows.
2024-08-06 10:59:08 +02:00
Johan Walles
479d8970b2 Build tests in a separate step
To help the tests not time out.
2024-08-06 10:56:30 +02:00
Johan Walles
f7bdb720f3 Windows tests are slow
Give them enough time to not time out during CI.
2024-08-06 10:55:04 +02:00
Johan Walles
eafc0e2250 Use fallback if $EDITOR is not set
Fixes #232.

Note that vim as a pretty crappy fallback since it's so hard to use, but
I'm going with vim anyway for compatibility with less.
2024-08-06 10:50:31 +02:00
Johan Walles
eacddda29e Accept ^H as backspace when searching
Fixes #226.
2024-07-30 20:05:46 +02:00
Johan Walles
64352801a8
Merge pull request #229 from walles/johan/ci-upgrade
Bump to a newer setup-go version
2024-07-22 14:49:13 +02:00
Johan Walles
6e415f9a78 Bump to a newer setup-go version
And add a separate build step on Linux, so we're more comparable with
Windows. The extra build step will take some time, but it will also make
the next build step faster due to caching.
2024-07-22 13:19:59 +02:00
Johan Walles
ba0dc99445 Extend one of the tailing tests 2024-07-22 09:53:51 +02:00
Johan Walles
311ec98b94 Merge branch 'johan/tail-with-no-eof'
Fixes tailing files with no newline at end of file.

Yes, the branch name is wrong, it's EOL that's missing and nothing else.
2024-07-19 09:43:56 +02:00
Johan Walles
f97b7b8e71 Verify split-UTF-8-character handling while tailing
It already worked, but now we have a test confirming it.
2024-07-18 16:08:27 +02:00
Johan Walles
899998b4af Handle tailing no-newline-at-of files 2024-07-18 16:03:08 +02:00
Johan Walles
3a08bf62bb Add a test 2024-07-18 15:31:29 +02:00
Johan Walles
25c79625d5 Fill out the test a bit 2024-07-17 08:02:32 +02:00
Johan Walles
cec3daaf88 Mutexes not needed 2024-07-17 07:59:42 +02:00
Johan Walles
818c5229c0 Add a just-read test 2024-07-17 07:59:20 +02:00
Johan Walles
c89cecddd8 Fix a test failure on Windows 2024-07-17 00:40:57 +02:00
Johan Walles
0091a15268 Test the fancy interruptable reader
And add hints for any future Windows implementation.
2024-07-17 00:38:31 +02:00
Johan Walles
b77151e6b1 Add another test for the InterruptableReader 2024-07-17 00:24:50 +02:00
Johan Walles
002d188b49 Start adding tests for the interruptable reader 2024-07-17 00:18:36 +02:00
Johan Walles
f4fed36bfd Fix a hang
Before this change, if select() returned EINTR we would hang.

This change:
* Makes us ignore EINTRs and try again
* Makes sure to not hang, even if the twin main loop would fail for some
  other reason.
2024-07-15 20:30:47 +02:00