walles / moar

Moar is a pager. It's designed to just do the right thing without any configuration.
Other
585 stars 17 forks source link

moar crashes when exiting $EDITOR #213

Closed mundry closed 1 week ago

mundry commented 1 week ago

Hey,

thanks for the quick turnaround on #211. It's really appreciated.

Unfortunately, I'm seeing crashes whenever I try to exit the editor. It happens in bash, zsh, and fish, as well as with nvim, vim and nano, both with and without tmux.

$ EDITOR=vim moar ~/.tmux.conf 
Please post the following report at <https://github.com/walles/moar/issues>,
or e-mail it to johan.walles@gmail.com.

Version: v1.24.0
LANG   : en_GB.UTF-8
TERM   : xterm-256color

GOOS    : linux
GOARCH  : amd64
Compiler: gc
NumCPU  : 16

time="Jun 23 10:57:59.502218" level=info msg="'v' pressed, launching editor: [vim /home/myself/.tmux.conf]"
time="Jun 23 11:00:04.233005" level=info msg="Editor exited successfully: [vim /home/myself/.tmux.conf]"

The experience in the editor is also really laggy. I have to press every key at least 2-3 times before it registers. It even crashes just opening the editor and closing it immediately after.

If you need anymore info, or need me to test a dev version, let me know.

Cheers

walles commented 1 week ago

I just noticed that I print the crash report after log.Info(), which was wrong.

Just upped it to log.Warn(), will be in the next release.

So the crash here isn't really a crash, it just looks exactly like one...

Will look into the lagginess.

walles commented 1 week ago

Thanks for testing and reporting back btw!

walles commented 1 week ago

I can repro the lagginess in nano, it's really bad.

I'm using code -w (VSCode) as my $EDITOR, that's why I didn't see this.

mundry commented 1 week ago

Awesome, thanks for the quick fix and explanation.

Just one difference compared to less, I thought I'd bring to your attention: After closing the editor, less returns back to displaying the file in the updated state, instead of quitting.

To me it's really just a nitpick, though. I'm fine with it the way it is. :)

walles commented 1 week ago

I considered how closely to follow less and I sort of guessed what-to-do-after wouldn't matter so much, and I took some liberties.

If at some point you'd feel this difference is an actual problem, let me know!