esamattis / slimux

SLIME inspired tmux integration plugin for Vim
http://esa-matti.suuronen.org/blog/2012/04/19/slimux-tmux-plugin-for-vim/
Other
217 stars 52 forks source link

Slimux ignores a pane if vim is run outside tmux #50

Closed apirogov closed 8 years ago

apirogov commented 8 years ago

I run vim outside tmux and my REPL inside. In this setup something went broken lately - Slimux "eats" one pane, when I have one pane open it says there are none, if there are multiple, it seems to ignore the first.

When I set let g:slimux_exclude_vim_pane = 0

it works correctly again, so it seems that this filtering breaks down somehow if vim itself is not inside tmux, I guess. It should not be necessary to set this option if vim is not even inside tmux.

slashfoo commented 8 years ago

That is correct, I'll work on fixing this bug. Thanks for opening the report.

slashfoo commented 8 years ago
        let l:current_pane_id = system('tmux display-message -p "#{session_name}:#{window_index}.#{pane_index}"')

This line returns "session:" (blank for window and pane) which would make slimux ignore all panes. I'm going to patch this in a bit.

slashfoo commented 8 years ago

The bug isn't caused by that line, but it's an example of cases I had not thought of when I patched in the feature.

slashfoo commented 8 years ago

@apirogov I didn't know the commit would close the ticket immediately, please reopen it if the issue persists. I tested the options a bit, it should basically ignore the exclusion flags if vim is not running from within tmux.

apirogov commented 8 years ago

Ok, thanks! Just tried it, seems to work fine now.