nnn icon indicating copy to clipboard operation
nnn copied to clipboard

[plugin] file preview panel get stuck when use plugin preview-tui with tmux and bat

Open XhstormR opened this issue 9 months ago • 1 comments

Environment details (Put x in the checkbox along with the information)

  • [x] Operating System: MacOS
  • [x] Desktop Environment: Darwin 23.4.0 x86_64 i386
  • [x] Terminal Emulator: alacritty
  • [x] Shell: fishshell, version 3.7.1
  • [ ] Custom desktop opener (if applicable):
  • [x] Program options used: -adexoiUH -Te -Pp
  • [x] Configuration options set: export NNN_PLUG='p:preview-tui;o:fzopen;c:fzcd;z:autojump;x:!chmod +x $nnn*;'
  • [x] Plugins are installed
  • [ ] Issue exists on nnn master

Exact steps to reproduce the issue

nnn 4.9 tmux 3.4 bat 0.24.0 less 643

If the previewed file exceeds the window height, it will get stuck when scrolling to the end of the file, and then will display:Waiting for data... (^X or interrupt to abort). I found a similar issue: https://github.com/sharkdp/bat/issues/1055 , also may be related to pager less.

image

Update: This defect also appears in the preview directory function, so the bug should be related to the pager less.

image

XhstormR avatar Apr 28 '24 09:04 XhstormR

I used ov instead of less and it works fine now.

https://github.com/noborus/ov

change preview-tui:

  "NNN_PAGER=${NNN_PAGER:-less -P?n -R -C}"                # pager options
to
  "NNN_PAGER=${NNN_PAGER:-ov}"                # pager options

XhstormR avatar May 03 '24 21:05 XhstormR

Thanks for the update and workaround. Closing the issue.

jarun avatar Jun 08 '24 02:06 jarun