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

617 Commits

Author SHA1 Message Date
Johan Walles
ff51ec6d78 Implement negative deltaScreenLines handling 2022-03-06 16:23:00 +01:00
Johan Walles
0ab35fd522 WIP: Canonicalize scroll position 2022-03-06 16:23:00 +01:00
Johan Walles
154a071ff5 More understandability changes 2022-03-06 16:23:00 +01:00
Johan Walles
aee61dced8 Make screenLines.go more understandable 2022-03-06 16:23:00 +01:00
Johan Walles
caf43e2ce3 WIP: Start using scrollPosition 2022-03-06 16:23:00 +01:00
Johan Walles
41923045fc Move redrawing into screenLines.go 2022-03-06 16:23:00 +01:00
Johan Walles
8bf34a2ab0 Simplify scroll position handling
Requiring more clipping logic during rendering.
2022-03-06 16:23:00 +01:00
Johan Walles
d6b2c8e185 Require pager access for scrolling 2022-03-06 16:23:00 +01:00
Johan Walles
076dbebd62 WIP Add a scroll position class 2022-03-06 16:23:00 +01:00
Johan Walles
245b292299 Test paging all sample files 2022-03-06 16:22:24 +01:00
Johan Walles
c1c15a2814 Document use of the MOAR environment variable 2022-02-27 11:21:38 +01:00
Johan Walles
388de91d3a Add option for how to render unprintable characters
Fixes #83.
2022-02-27 09:39:16 +01:00
Johan Walles
fb9f8efbe6 Extract number prefix length into its own method 2022-02-19 09:17:23 +01:00
Johan Walles
94c3623701 Proper go function names
Private function names should start with lowercase letters.
2022-02-19 08:49:10 +01:00
Johan Walles
0fe275af8d Merge branch 'johan/no-screen-lines'
The ScreenLines struct was just a copy of a subset of Pager. Use Pager
directly instead.
2022-02-19 08:39:52 +01:00
Johan Walles
aa94872fe6 Fix scrolling off-by-one error 2022-02-19 08:38:13 +01:00
Johan Walles
bd761c1c69 Add a wrapping test 2022-02-18 22:37:32 +01:00
Johan Walles
7ef67aac29 Fix two more failing tests 2022-02-18 19:27:10 +01:00
Johan Walles
635aaffc29 Fix a broken bounds check 2022-02-18 19:27:10 +01:00
Johan Walles
c7a286db5d Fix some test failures 2022-02-18 19:27:10 +01:00
Johan Walles
caa1654278 Fix compile errors in tests 2022-02-18 19:27:10 +01:00
Johan Walles
46a5924796 Fix feature envy
The ScreenLines struct was just a subset of the pager struct.
2022-02-18 19:27:10 +01:00
Johan Walles
fbdcdc46e3
Merge pull request #82 from walles/johan/statusbar
Add --statusbar= command line option
2022-02-18 19:14:01 +01:00
Johan Walles
f0f4d703a0 Add --statusbar= command line option
Supports "plain", "inverse" or "bold", defaulting to "inverse".

Resolves #81.
2022-02-18 19:09:05 +01:00
Johan Walles
152c9ba780 Extract line rendering into its own method
This is prep for being able to properly scroll through wrapped lines.
2022-02-16 06:19:06 +01:00
Johan Walles
4755277187
Merge pull request #80 from walles/johan/golangci-lint
Let golangci-lint do all linting
2022-02-13 08:42:46 +01:00
Johan Walles
7ddd22e754 CI: Only install golangci-lint on Windows 2022-02-13 08:39:05 +01:00
Johan Walles
dd776b94fa golangci-lintify linter exclusions 2022-02-13 08:34:09 +01:00
Johan Walles
2c297e4639 Fix a linter reported problem 2022-02-13 08:31:56 +01:00
Johan Walles
1d002582f0 Move golangci-lint config into a config file 2022-02-13 08:22:57 +01:00
Johan Walles
542d71f5e0 Replace all linting with golangci-lint 2022-02-13 08:16:30 +01:00
Johan Walles
c3a27f4fbe Improve release script docs 2022-02-13 07:57:40 +01:00
Johan Walles
b96c88c4d1 Support retaining screen contents after exit
Fixes #76.
2021-11-09 18:56:02 +01:00
Johan Walles
871cf523c0 Bump Chroma to 0.9.4
Removes some indirect dependencies, fixes #74.
2021-10-17 08:57:13 +02:00
Johan Walles
77f4b0aebe
Merge pull request #71 from walles/walles/windows-exe
Add a Windows executable to the release
2021-09-10 06:59:21 +02:00
Johan Walles
7a4e512bf6 Give "go test" more time on Windows
It took 14s in this Travis build...

https://app.travis-ci.com/github/walles/moar/jobs/536579072

... and I want more wiggle room, so increase the timeout to 30s.
2021-09-10 06:54:52 +02:00
Johan Walles
46b84fb392 Add a Windows executable to the release 2021-09-10 06:50:44 +02:00
Johan Walles
a710033d6f Mention transparent decompression in --help message 2021-07-01 19:21:42 +02:00
Johan Walles
ce8ef9d1cc README: List automatic decompression
It has been there all along, just not documented.

Spotted in #66, thanks @ciscohack!
2021-07-01 19:13:33 +02:00
Johan Walles
994e29bc66 Document move to homebrew-core 2021-06-12 08:47:24 +02:00
Johan Walles
90ba73e11a Add homebrew packaging
`brew install walles/johan/moar` to install.

`brew upgrade` to upgrade to latest release.

Packaging lives here:
https://github.com/walles/homebrew-johan/blob/main/Formula/moar.rb

Fixes #63, thanks @fredericrous for the inspiration!
2021-06-05 11:10:31 +02:00
Johan Walles
fec9ad8149 Fix crash on paging down
Fixes #65.
2021-06-04 13:20:28 +02:00
Johan Walles
2a435c091b Print MOAR environment value in --help 2021-06-04 06:15:09 +02:00
Johan Walles
4552bfd79c Add command line switch for hiding line numbers 2021-06-03 21:49:02 +02:00
Johan Walles
24776d7fe3 Improve vertical clipping in presence of wrapping
New vertical clipping algorithm:
1. Render all input lines we have
2. Scroll until the right ones are visible on screen

This makes us get closer to being able to show the last line in the
presence of wrapped lines, and paves the way for true sub-line
scrolling.
2021-06-03 07:25:02 +02:00
Johan Walles
8b242b42bc Fix rendering of empty input
Before this change, we rendered empty input as one empty line.

With this change in place, we now put the EOF marker at the top, where
it belongs if there's nothing to show.
2021-05-31 19:08:19 +02:00
Johan Walles
47036defd4 Fix crash reading empty input 2021-05-31 19:00:11 +02:00
Johan Walles
962235dc8a Merge branch 'walles/wrap-to-end'
This merge gets us closer to working scroll to the bottom when lines are
wrapped.

Next step to make this work all the way would be to support scrolling
the screen one screen line at a time, even when the first input line of
the screen is wrapped over multiple screen lines.
2021-05-30 16:13:08 +02:00
Johan Walles
c1d046f65b First shot at wrap friendly line fitting
Tests crash, must fix.
2021-05-30 16:11:26 +02:00
Johan Walles
f7bad91000 Move search pattern into ScreenLines struct 2021-05-30 15:33:28 +02:00