I decided to tackle issue #7. Attached is my branch for better
One note not explicitly covered in the commit logs is that the minimum
I am happy to make any edits, so if you don't like some of the
The text was updated successfully, but these errors were encountered:
tmux 1.4 added the "(active)" string to the current pane in `tmux list-panes' output. tmux 1.5 introduced unique pane ids in the form of %n, available either through the $TMUX_PANE environment variable or at the end of each line of `tmux list-panes'. Leveraging these two features, a new method `s:screenTmux.activePane()' returns the pane id of the current active pane, suitable for use as part of a `-t id' parameter. We store the shell's pane id with this method in the variable `g:ScreenShellTmuxPane' when opening a new region, window, or terminal. When sending text from vim -> shell, we note vim's pane id, send text to `-t g:ScreenShellTmuxPane', and select-pane back to vim's pane. This supplants the assumption that vim is in pane 0 and the shell is at pane 1. Vim and the target shell can be at any pane position and work correctly. However, if tmux is at version 1.4, shuffling the order of the panes break communication, because the pane id is relative. If tmux is at version 1.5, the pane id is unique and thus communication will not fail even if the pane's position is shuffled or even moved to another window.