Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Prevent hanging when using older versions of tmux #86

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

huzecong
Copy link

This pull request fixes issue #32 .

Using tmuxline with tmux 1.6 would cause vim to hang on startup. The code in question was https://github.com/edkolev/tmuxline.vim/blob/master/autoload/tmuxline.vim#L130:

call system("tmux source " . tmuxline#util#wrap_in_quotes(temp_file))

which in effect ran the following bash command:

(tmux source /tmp/xxxxx/0) >/tmp/xxxxx/1 2>&1

which causes bash to hang. But if tmux source ... is executed without the piping, it would return normally, and give a warning that one of the options was not available.

I don't know the exact reason behind this, but I tried changing the line of code into:

call system("tmux source " . tmuxline#util#wrap_in_quotes(temp_file) . " | cat")

and vim could start normally.

This sure is a rare problem (few would still use tmux 1.6 as of now), but I don't think adding a patch would hurt compatibility with other versions.

@kevinkjt2000
Copy link

Seems harmless enough to pipe to cat. I will go put this in my fork.

Because my airline theme would make it barely visible and I don't know how to modify airline themes.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants