Johan Walles
f6571b3942
Improve color downsampling
...
Tested on the green-gradient.txt sample file, looks much better after
this change.
2024-01-12 15:01:37 +01:00
Johan Walles
a9832386f2
Merge branch 'johan/fix-done'
...
Fixes #183 by making sure both file loaded and file highlighted are
reported as they should.
2024-01-12 09:40:41 +01:00
Johan Walles
9fa0ad682a
Make all tests pass
2024-01-12 09:28:56 +01:00
Johan Walles
559165c091
Remove redundant code
...
Already done inside of highlightFromMemory().
2024-01-12 08:55:18 +01:00
Johan Walles
b2068fad01
Prevent a race in the tests
2024-01-12 08:54:57 +01:00
Johan Walles
3e9a8d7f01
Make the waiting tests pass
2024-01-12 08:48:13 +01:00
Johan Walles
2e1dd0ec82
Use the same waiting code in all places
2024-01-12 08:40:08 +01:00
Johan Walles
9f3f62d6ee
Add tests for reader done reporting
2024-01-12 08:34:21 +01:00
Johan Walles
ba00295011
Render non-breaking spaces
...
As spaces. Go's unicode.IsPrint() doesn't consider them printable, but
they are just spaces so we should print them anyway.
Just tested this in ITerm2 and it works fine.
2024-01-11 09:33:23 +01:00
Johan Walles
35c89d69d0
Merge branch 'johan/man-page-headings-space'
...
Accept non-bold whitespace in man page headings.
2024-01-11 09:01:46 +01:00
Johan Walles
96430848a3
Fix broken tests
2024-01-11 09:00:32 +01:00
Johan Walles
9bb857fe74
Attempt reimplementing the state machine
...
With support for both bold and not-bold whitespace.
Tests fail.
2024-01-11 08:54:18 +01:00
Johan Walles
06747d3c96
WIP Restart heading parsing implementation
2024-01-11 06:29:10 +01:00
Johan Walles
84f332d020
Test that bold spaces also work
2024-01-11 06:28:47 +01:00
Johan Walles
89f7309854
Add another man page heading test
2024-01-10 23:05:28 +01:00
Johan Walles
7672b755e7
Whitespace in man page headings can be not-bold
...
Add a failing test for this.
2024-01-10 22:57:31 +01:00
Johan Walles
75592ac471
Print less text on bad command lines
...
Hopefully this change could have made this situation more obvious:
https://github.com/walles/moar/issues/170#issuecomment-1869806311
2024-01-10 22:49:46 +01:00
Johan Walles
0c8bf3ce7a
Merge branch 'johan/man-page-headings'
...
Use GenericHeading style for man page headings.
Related to #170 .
2024-01-10 17:31:10 +01:00
Johan Walles
4d3eef299a
Fix a broken test
2024-01-10 17:29:25 +01:00
Johan Walles
319d777c56
Properly detect man page headers while rendering
2024-01-10 17:26:44 +01:00
Johan Walles
190e362f14
Update a test
...
So it doesn't get special treatment from being identified as a heading.
2024-01-10 17:19:58 +01:00
Johan Walles
ce89f69b1c
Test highlighing man page headers
...
Fails.
2024-01-10 17:17:14 +01:00
Johan Walles
2e6d79a177
Use the right index
2024-01-10 17:00:28 +01:00
Johan Walles
a72423cffc
Add a test
2024-01-10 16:50:20 +01:00
Johan Walles
96bf1394fc
Optimize out a unicode operation in the common case
...
Common case = no backspaces in the string.
2024-01-10 16:50:20 +01:00
Johan Walles
fe0e5493ab
Headings do not start with whitespace
2024-01-10 16:50:20 +01:00
Johan Walles
4ccc36732d
Fix a heading identification bug
2024-01-10 16:50:20 +01:00
Johan Walles
3b16284ed9
Use GenericHeading for man page headings
2024-01-10 16:50:20 +01:00
Johan Walles
90b4e92e76
Add man page headings test
2024-01-10 16:50:20 +01:00
Johan Walles
e823d0263a
Use 16M color when requested
...
Before this change we used 8 colors when asked for 16M.
2024-01-10 16:48:42 +01:00
Johan Walles
b5f9b88c31
Fix wrapping backwards search
2024-01-10 14:41:21 +01:00
Johan Walles
ab20550d45
Fix search problem on not-found mode
...
Fixes #182 , but there are still related issues when searching backwards
and wrapping after not-found.
2024-01-10 13:37:45 +01:00
Johan Walles
625c94feec
Fix hang searching backwards
...
Solves the hang in #182 , but we still don't find anything on the way
back so not there yet.
2024-01-10 13:15:43 +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
98b83c45d6
Merge branch 'johan/mark-jump'
...
Fixes #175 .
2024-01-09 15:44:08 +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
4867b2c2ed
Implement jumping to marks
2024-01-09 15:26:16 +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
a38c6344b6
Merge branch 'johan/pager-control'
...
This moves code for different pager moves out into separate files.
2024-01-09 14:45:39 +01:00
Johan Walles
900042183a
Ponderings around naming
2024-01-09 14:45:17 +01:00
Johan Walles
eaa06ac3cc
Simplify a test
2024-01-09 14:40:40 +01:00
Johan Walles
2561e6a114
Fix wrapping scroll issue
2024-01-09 14:25:50 +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
8e81a04188
Make the tests compile
2024-01-09 13:52:59 +01:00
Johan Walles
1164972796
Add a not found pager mode
2024-01-09 13:47:04 +01:00
Johan Walles
2fbf74559f
Add a go-to-line mode
2024-01-09 13:38:52 +01:00