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

1092 Commits

Author SHA1 Message Date
Johan Walles
e0729105d6 Implement naive shutdown on Unix as well 2024-07-14 11:37:36 +02:00
Johan Walles
c30fb6d5a1 Do the platform agnostic part 2024-07-14 11:26:10 +02:00
Johan Walles
2a8a7701db Merge branch 'johan/tail-files'
Fixes #224.
2024-07-14 11:14:01 +02:00
Johan Walles
500b91fe60 Comment on fsnotify 2024-07-14 11:13:08 +02:00
Johan Walles
9cb47558e0 Self review changes 2024-07-14 11:07:00 +02:00
Johan Walles
62abdec926 The replace protection is not needed any more
Before, we used to highlight the buffer in the background, but we don't
do that any more, so we can't get new lines while highlighting any more.
2024-07-14 10:56:09 +02:00
Johan Walles
b29b5b237b Start fixing the tailing code 2024-07-14 10:40:40 +02:00
Johan Walles
68dd253ee6 We don't need this initially
If this not working would become a problem, let's fix it at that time.
2024-07-14 10:32:05 +02:00
Johan Walles
3f06a65d54 Implement file tailing 2024-07-14 10:29:05 +02:00
Johan Walles
f1d543e08e Track bytes consumed by the reader 2024-07-14 08:22:07 +02:00
Johan Walles
c3a05ae367 More tailing prep 2024-07-14 08:12:07 +02:00
Johan Walles
a1d219b785 Extract done reporting
This is prep for being able to reuse readStreamInternal() for adding
more lines later.
2024-07-14 08:06:32 +02:00
Johan Walles
886d561364 Stop passing around a member variable 2024-07-13 22:35:25 +02:00
Johan Walles
7ae3e9580a Avoid a function reference
They make code hard to follow.
2024-07-13 22:27:47 +02:00
Johan Walles
18acd3e092 Same test but with an initially empty file 2024-07-13 16:54:32 +02:00
Johan Walles
72b2451382 Add another test 2024-07-13 16:48:17 +02:00
Johan Walles
82e9ac0794 Test reading from files getting updated 2024-07-13 16:41:20 +02:00
Johan Walles
2097e7c01f We aren't doing filtering any more
We now have decompresion built in instead of trying to call external
binaries to do the work.
2024-07-13 16:03:44 +02:00
Johan Walles
eb7d1b92d1 Add go install to the manual install instructions
Inspired by https://github.com/walles/moar/issues/223.
2024-07-12 07:02:21 +02:00
Johan Walles
3c39daf7ad Add a manual test suite 2024-06-30 09:29:10 +02:00
Johan Walles
3543b2ca5f Forgot this in the last commit 2024-06-30 09:09:38 +02:00
Johan Walles
f9e5031cbe Safer shutdown
Now without closing stdin. That closing may or may not have been causing
problems on Windows.
2024-06-30 08:25:48 +02:00
Johan Walles
b2b69852e2 Make Windows screen shutdown more robust
Relates to <https://github.com/walles/moar/issues/217>
2024-06-29 13:32:12 +02:00
Johan Walles
831c894e69
Merge pull request #220 from walles/johan/windows-readable-executable
Fix executability check on Windows
2024-06-29 08:41:08 +02:00
Johan Walles
2e13403096 Fix executability check on Windows 2024-06-29 08:36:13 +02:00
Johan Walles
a5317483e8 Test our executability checker 2024-06-29 08:24:15 +02:00
Johan Walles
8dd02a3fe1 Extract checks to be testable 2024-06-28 22:37:34 +02:00
Johan Walles
2aa84811dc Support editing piped input
By writing it to a file and opening the editor on that file.

Related to https://github.com/walles/moar/issues/211.
2024-06-28 06:57:26 +02:00
Johan Walles
83dffa6e1f Make shutdown more reliable
At least I hope it is...
2024-06-24 20:05:34 +02:00
Johan Walles
a9641512e1
Merge pull request #215 from walles/johan/reprint-after-close-stdin
Fix crash on --quit-if-one-screen by dupping stdout
2024-06-24 07:31:16 +02:00
Johan Walles
69bef3097c Fix crash on --quit-if-one-screen by dupping stdout 2024-06-24 07:26:42 +02:00
Johan Walles
e73a70a4bd Fix terminal editor lagginess
After pressing 'v'.

By stopping our main loop before launching the editor.

Before this change our main loop was still running, stealing events from
stdin and the launched editor.

Fixes #213.
2024-06-23 12:41:31 +02:00
Johan Walles
2012110efa Tune log levels
Improves on #213.

Before this change "log.Info()" resulted in a crash report on exit.

With this change in place log.Warn() is required for that.
2024-06-23 12:20:03 +02:00
Johan Walles
d911e542b8 Merge branch 'johan/v-to-edit'
Fixes #211.
2024-06-22 09:10:23 +02:00
Johan Walles
a5386ad5e8 Show log output even after editor run
Before this change, if anything was logged and the user pressed 'v' to
edit a file, the log output would be lost.

With this change in place, the log output is now shown after the editor
is done.
2024-06-22 09:06:54 +02:00
Johan Walles
2fa4acfb45 Add marker for where to continue coding 2024-06-21 09:36:45 +02:00
Johan Walles
6cb35136e0 Make our own file if the current is unreadable 2024-06-21 09:34:37 +02:00
Johan Walles
1c5e23683a Retain the original file name 2024-06-21 09:23:56 +02:00
Johan Walles
9818eec3dc Launch the editor 2024-06-21 09:17:15 +02:00
Johan Walles
0d6eaef308 Get a file name to send to the editor 2024-06-21 08:50:25 +02:00
Johan Walles
033d4d284c Implement some editing prep code 2024-06-21 08:36:57 +02:00
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
eae1915b5e Fix formatting 2024-05-18 15:34:17 +02:00
Johan Walles
11095496b2 Tune logging 2024-05-18 15:23:37 +02:00
Johan Walles
d1fac66a23 Improve search logging 2024-05-18 15:15:45 +02:00
Johan Walles
f434895eef Fix backwards search performance issue
This problem was here all along, but it was excarberated by the newly
introduced parallel search.
2024-05-18 08:37:06 +02:00
Johan Walles
7b032b2fa4 Merge branch 'johan/parallel-search' 2024-05-18 08:17:13 +02:00
Johan Walles
686882ffcd Improve docs 2024-05-18 08:13:08 +02:00
Johan Walles
60d3577b59 Don't crash searching in empty buffer 2024-05-18 07:59:44 +02:00