preservim / vimux

easily interact with tmux from vim
MIT License
2.21k stars 162 forks source link

VimuxClosePanes closes incorrect pane #55

Closed ton closed 10 years ago

ton commented 11 years ago

In case Vim executes VimClosePanes when I'm in a different window than Vim itself is, a pane in the current window is closed instead of a pane in the window Vim is in.

benmills commented 11 years ago

Just to be clear you're describing a case where vim executes VimuxClosePanes when you're not currently in the window with vim in it and it vimux closes a pane in your current window rather than the window vim is in?

ton commented 11 years ago

Yes, that's right.

To elaborate on this, I start a make in Vim, that is executed in a separate tmux pane using Vimux. After the make finishes, using Vim's server functionality, a command is sent to Vim to read in any make errors using cfile, and then close the Vimux pane.

This is the command I use for that:

call VimuxRunCommand(&makeprg . " 2>&1 | tee /tmp/errors.err; vim --servername " . v:servername . " --remote-send '<Esc>:VimuxCloseRunner<CR>:cfile /tmp/errors.err | cw<CR><CR>'")

benmills commented 10 years ago

This function doesn't exist anymore.

ton commented 10 years ago

VimuxCloseRunner() has the same incorrect behaviour.