voldikss / vim-floaterm

:computer: Terminal manager for (neo)vim
MIT License
2.49k stars 77 forks source link

Files opened within terminal immediately close #66

Closed IGI-111 closed 4 years ago

IGI-111 commented 4 years ago

Opening files with floaterm inside the terminal works, but the command immediately ends inside the terminal (and prints 0).

This is especially problematic when using it with git commit as the editor immediately closes from git's point of view, and it only sees an empty commit message.

voldikss commented 4 years ago

Can not reproduce it. Could you provide a screenshot.gif?

IGI-111 commented 4 years ago

Peek 30-03-2020 17-46 Here goes.

voldikss commented 4 years ago

Hmmm, could you provide your nvim version / OS / shell

IGI-111 commented 4 years ago
igi-111 at Wedge in ~
$ uname -a
Linux Wedge 5.5.13-arch1-1 #1 SMP PREEMPT Wed, 25 Mar 2020 16:04:40 +0000 x86_64 GNU/Linux

igi-111 at Wedge in ~
$ nvim --version
NVIM v0.4.3
Build type: Release
LuaJIT 2.0.5
Compilation: /usr/bin/cc -march=x86-64 -mtune=generic -O2 -pipe -fno-plt -O2 -DNDEBUG -DMIN_LOG_LEVEL=3 -Wall -Wextra -pedantic -Wno-unused-parameter -Wstrict-prototypes -std=gnu99 -Wshadow -Wconversion -Wmissing-prototypes -Wimplicit-fallthrough -Wvla -fstack-protector-strong -fdiagnostics-color=always -DINCLUDE_GENERATED_DECLARATIONS -D_GNU_SOURCE -DNVIM_MSGPACK_HAS_FLOAT32 -DNVIM_UNIBI_HAS_VAR_FROM -I/build/neovim/src/build/config -I/build/neovim/src/neovim-0.4.3/src -I/usr/include -I/build/neovim/src/build/src/nvim/auto -I/build/neovim/src/build/include
Compilé par builduser

Features: +acl +iconv +tui
See ":help feature-compile"

         fichier vimrc système : "$VIM/sysinit.vim"
               $VIM par défaut : "/usr/share/nvim"

Run :checkhealth for more info

igi-111 at Wedge in ~
$ zsh --version
zsh 5.8 (x86_64-pc-linux-gnu)
voldikss commented 4 years ago

Sorry but I can not figure out what's wrong for now. The only hint I can give is that the following line was expected to executed after running floaterm: https://github.com/voldikss/vim-floaterm/blob/be8fcc212d53bbf373d2d07982aa113171a7f735/bin/floaterm#L40

BTW, make sure you have neovim-remote installed before using floaterm command.

IGI-111 commented 4 years ago

I do have nvr installed the editor wouldn't open the files otherwise what seems to be happening is that the nvr call isn't blocking for some reason.

I guess I'll fiddle with the script to try and figure out what's going on.

IGI-111 commented 4 years ago

Looks like this was fixed by your commit for #68 adding --remote-wait.