Unfortunate interaction between tmux splits and nvim input/rpc calls
- Dominant language
- Vim Script
- Stars
- 10.3k
- Forks
- 608
- Avg merge
- 5d 8h
- Merged PRs (30d)
- 2
Description
If fzf.vim opens a tmux split or popup, nvim is locked until that split is dealt with.
By locked I mean:
- nvim can't process user input
- nvim can't respond to RPC calls
Specifically this impacts coc-fzf, in that it uses a python script making an RPC call to nvim to populate the fzf buffer. The rpc call over the socket hangs, and no results are shown.
Not being able to process input is not the end of the world (after all, there's a big popup in the way), but not being able to populate the input to fzf is an issue.
I would guess that it's stuck in here: https://github.com/junegunn/fzf/blob/94999101e358385f3ca67a6ec9512f549196b802/plugin/fzf.vim#L717. I honestly have no idea if this is a simple one line change, or if it would require wobbling the whole of nvim's ui loop.
To reproduce:
- run nvim with fzf.vim in a tmux session
- run `let g:fzf_layout = { 'tmux': '-r50%' }`
- make a call to fzf
- Observe that while the tmux split is open, nvim is frozen
To reproduce the rpc hang (untested):
- run nvim with fzf.vim in a tmux session
- run `let g:fzf_layout = { 'tmux': '-r50%' }`
- make a call to fzf with the buffer populated by the following python script
- observe that the fzf popup is never populated with `something`
```python
from pynvim import attach
import sys
nvim = attach('socket', path=sys.argv[0])
nvim.command("echo hello")
print("something")
```
-------------
- [x] I have fzf 0.30.0 or above
- [x] I have read through https://github.com/junegunn/fzf.vim/blob/master/README.md
- [x] I have read through https://github.com/junegunn/fzf/blob/master/README-VIM.md
- [x] I have read through the manual page of fzf (`man fzf`)
- [x] I have searched through the existing issues
Contributor guide
No contributing guide indexed for this repository
Research direction
Reproduce the freeze with fzf.vim in Neovim inside tmux using g:fzf_layout = { 'tmux': '-r50%' }, then inspect plugin/fzf.vim around the referenced line 717. Test the RPC case with the provided Python script and verify that Neovim remains responsive and fzf is populated with "something" while the tmux split is open.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python, vim
- Domain
- cli, tooling
- Issue type
- Bug
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 25/100