navi icon indicating copy to clipboard operation
navi copied to clipboard

Panic when running navi in emacs tramp mode shell

Open hnrklssn opened this issue 4 years ago • 4 comments

Describe the bug Navi immediately crashes when I run it from an emacs tramp shell.

To Reproduce

  1. connect to remote computer in emacs using tramp mode
  2. M-x shell
  3. run navi

Expected behavior I expect navi to run

Screenshots

panic: runtime error: index out of range [1] with length 0

goroutine 26 [running]:
github.com/junegunn/fzf/src.(*Terminal).printItem(0xc0000fe000, 0xc000128038, 0x0, 0x3, 0x1, 0x10000000054d700)
	/tmp/fzf-20200802-2108-156ai31/fzf-0.22.0/src/terminal.go:935 +0x7fc
github.com/junegunn/fzf/src.(*Terminal).printList(0xc0000fe000)
	/tmp/fzf-20200802-2108-156ai31/fzf-0.22.0/src/terminal.go:910 +0x25d
github.com/junegunn/fzf/src.(*Terminal).Loop.func9.1(0xc00000cf00)
	/tmp/fzf-20200802-2108-156ai31/fzf-0.22.0/src/terminal.go:1767 +0x1d9
github.com/junegunn/fzf/src/util.(*EventBox).Wait(0xc00000cf00, 0xc000061f88)
	/tmp/fzf-20200802-2108-156ai31/fzf-0.22.0/src/util/eventbox.go:34 +0x5e
github.com/junegunn/fzf/src.(*Terminal).Loop.func9(0xc0000fe000, 0xc00030c7f0, 0xc00030c7e0)
	/tmp/fzf-20200802-2108-156ai31/fzf-0.22.0/src/terminal.go:1754 +0x9e
created by github.com/junegunn/fzf/src.(*Terminal).Loop
	/tmp/fzf-20200802-2108-156ai31/fzf-0.22.0/src/terminal.go:1750 +0x42f
Hey, listen! navi encountered a problem.
Do you think this is a bug? File an issue at https://github.com/denisidoro/navi.

Caused by:
    No more parts in `selections`

Versions:

  • OS: WSL ubuntu client, ubuntu host
  • Shell Version: GNU bash, version 4.4.20(1)-release (x86_64-pc-linux-gnu)

Additional context It's worked in the past both in a regular shell and a local emacs shell (that is, it didn't crash in the emacs shell, but interactive mode doesn't really work) on the host computer.

hnrklssn avatar Sep 22 '20 14:09 hnrklssn

Thanks for opening your first issue here! In case you're facing a bug, please update navi to the latest version first. Maybe the bug is already solved! :)

welcome[bot] avatar Sep 22 '20 14:09 welcome[bot]

Strange... This error seems to be caused by fzf itself.

Did you upgrade fzf recently? Could you try using skim instead?

I'll try to investigate it but it may take some time as I'm not an Emacs user.

denisidoro avatar Sep 22 '20 15:09 denisidoro

Is this tramp mode shell equal to eshell?

denisidoro avatar Oct 08 '20 20:10 denisidoro

No, although I'm sure you could use eshell with tramp mode. I was using shell mode/inferior shell/M-x shell, however.

How would I go about using skim?

hnrklssn avatar Oct 16 '20 15:10 hnrklssn