Open pjrulez opened 6 years ago
I didn't mention this one at #364 to avoid confusion, but that issue explains where this behavior started to happen and why, if you downgrade to tmuxp 1.3.2/libtmux 0.7.4 I'm almost sure it will vanish for you too.
Yeah, I tried. Uninstalled, installed with pip3 install tmuxp==1.3.2 It came with libtmux version 0.8.0. Tested loading that same session. Issue still appeared. So I tried to downgrade libtmux to 0.7.4 which I couldn't do via pip3 so I played around in tmux only to find out error appears even in sessions that were not loaded from tmuxp. So when I realized that which I didn't notice before installing tmuxp I removed tmuxp with pip3 uninstall tmuxp and new sessions don't seem to have this issue anymore.
It's definitely got something to do with tmuxp from my current observation. If I figure out otherwise I'll close this issue myself.
Actually I did some further testing and figured out the issue appears with tmuxp installed. Then I detached the session with the issue reapearing for every command, uninstalled tmux and reattached only to find the issue not appearing anymore.
Could you give me a hint, I think it must have something to do with starting those panes, $TERM. maybe I have some configuration in .bashrc or .zshrc that tmuxp invokes differently than it's invoked otherwise? Idk.
Did you revert to libtmux 0.7.4? As I've commented on that issue you need to do so, problems started due to libtmux 0.7.5.
You need to revert both to the versions I mention.
@oblitum I need help maintaining libtmux and tmuxp. I have too much on my plate at the moment. If you could spread the word we're looking for help in #290, it'd be a big help.
As for the libtmux version, did we have it determined what piece of code did was the culprit?
@tony determined the culprit for the new problems, no. You commented that you would try to reproduce it on more similar environment, but it stopped there, hence I've opened a new one. Determined for the old problems, issue #309, I explain on #364 what was the actual culprit that did fix it, but before that fix was merged, new stuff got merged as attempt fix and that new stuff is what's causing these new issues, I just dunno what exactly in this new code is the culprit. Solution for #309 was supposed to be simple, problem was due to this alone, but in the end too many things got in besides focusing on fixing that.
Reminder that recently the package was moved from AUR to community on Arch, but sadly it's quite broken on Arch, AFAIK, due to #364 and #365.
Sorry for delay. Okay so I did as you asked: screenshot The image shows why I thought I can't install the version you suggested. However I did install tmuxp 1.3.2/libtmux 0.7.4 and the problem was sadly not resolved. The % kept on showing up. Sometimes it happens sometimes it doesn't I can't pin down the exact reason why. But it doesn't happen without tmuxp. I'm a pretty new Linux user tho... If anyone finds out what could be the reason I will try it and verify.
Hmm, OK. So maybe this is harder to correlate than I thought. I don't get the issue on 1.3.2/0.7.4, on latest I get this % issue: panes are created with a first char of %, following by lots of whitespace, and then the prompt, all panes show up like this. If it's happening for you even on 1.3.2/0.7.4, then I dunno.
Okay so I'm using tmp addons tmux-continuum with resurrect and I kept the session I loaded using tmuxp before I removed it. I restarted my device and tested it a bit more and I found out it appeared again in some panes after I removed both libtmux and tmuxp and restored the session. After playing around a bit it didn't occur again, also it didn't occur with many windows and panes in a new session created using only tmux with tmuxp and libtmux removed. So I don't know but it's possible it's a direct result of something tmuxp sets up when loading a new session and which persists in the settings after tmuxp is removed. Strange.
I used tmux-continuum before and it presented issues regarding scrolling, I don't use it anymore. I think if you're gonna test this issue you should avoid this plugin because it keeps running in a loop and may cause conflicts.
Related to https://github.com/tmux-python/tmuxp/issues/364#issuecomment-377793884. Can we get a PR/testcase where this % output glitch is recreated?
I'm getting the same issue with Kubuntu 18.04, tmux 2.6, and tmuxp 1.4.0.
session_name: project
windows:
- window_name: Git
layout: even-horizontal
panes:
- shell_command:
- tmux rename-session ${PWD##*/}; clear
- git status
- shell_command:
- git log
- window_name: Edit
panes:
- shell_command:
- vim -c "NERDTreeToggle"
The two git panes in the first window have the highlighted % sign and a few blank lines, then the command prompt. Note that the git log
command opens to a pager and I don't know if tmuxp without this bug would normally leave it in that pager, but in this case it is not in a pager, but has the %, blank lines, and new prompt, as described.
The pane in the second window is in my vim session, as desired. Closing or suspending vim in that pane does not show a % or blank lines in the terminal "behind" it. Everything looks good here.
UPDATE: It seems that the git log
pane is working fine, keeping me in the pager without any extra space or characters. The git status
pane still has the highlighted "%" and a few lines of whitespace. I think the whole thing is caused by terminal resizing as it jumps to fill the terminal window.
My terminal line is a powerline with stuff on the left and right of the terminal window, and I know this can make resizing weird sometimes because the stuff on the right side doesn't reflow well when the terminal window is resized. So perhaps it's related? I've been meaning to simplify my powerline anyway, so if I fix it, I'll try to remember to post back here.
Any updates on this?
@paulofelisbino
I'm looking for help on the project in general, sorry about that! Not ignoring this (or any thread for that matter!) Apologies for any inconvenience!
I'm personally not experiencing this in my tmuxp workflow, so can't attest to this.
In case there is any activity on this issue: It would be really helpful to give a brief summation of the issue / where it stands and a PR with a test.
@tony i'm willing to help, planning to learn python for a while now
@paulofelisbino If you want to, yep.
I have no criterion for onboarding into the org itself. I don't want to make the bar so high interested people leave, on the other hand I don't want 100 org members (well, it does work for jazzband)
One way: if you review PRs (ask for em to rebase against master) and need to merge a PR, I can grant you org access, since it'd be a need then. You can @tony me in a PR to notify me. How does that sound?
Confirm % and new lines in:
session_name: xxx
windows:
- window_name: vim
panes:
- shell_command: nvim
- window_name: commands
layout: main-vertical
panes:
- clear
- clear && php -v
- clear && node -v
I can also confirm % and the new lines for blank panes.
Since I have quite some experience with Python and I'm also experiencing the issue, I try to reproduce it and find the relevant parts in the code.
How would I proceed once I made myself familiar with the code or if I have questions?
@pylbrecht Feel free to add in a PR for this issue or pass along the relevant code that you find. If you have any questions, feel free to @ me.
I suspect this to be an issue of slow shell startup due to ohmyzsh. I can reproduce this "% and newlines" behavior by opening a terminal and start typing right away before the shell prompt appears.
I can confirm thought of @pylbrecht, had the same issue.
Use sleep_before
, giving your shell some time to start.
Note: requires cmd: my-command
syntax (see docs)
session_name: xxx
windows:
- window_name: vim
panes:
- shell_command:
- nvim
- window_name: commands
layout: main-vertical
panes:
- cmd: clear
sleep_before: .5
- clear && php -v
- clear && node -v
Just installed and playing around with a configuration. Running in gnome terminal with zsh and tmux. This is the configuration of the 1st window where issue appears:
The issue is, when starting tmux session with "tmuxp load OMG" the 1st and 2nd pane display "%" after each issues command. Happens when the session is loaded with "l." and "screenfetch" and for every command issues afterward. Strangely the 3rd pane issuing shell_command: "fortune | cowsay" doesn't display "%" after the command, nor after any next command.
This doesn't occur ever if I start tmux manually in any pane or any window. It is possible to kill the troublesome panes and create new splits and the issue is gone. But that nullifies tmuxp's benefits if I have to remake whole 1st window everytime I open this session.
Any ideas why this would occur?
Example is displayed in this _https://s14.postimg.org/ul2tnsu75/tmuxp_Issue_Screenshot_from_2018-03-13_19-28-23.png_.
Information about my system: Python version:
python --version Python 2.7.13
python3 --version Python 3.5.3
(installed using pip3) system PATH:echo $PATH /usr/local/bin:/usr/bin:/bin:/usr/local/games:/usr/games:/sbin/:/home/pj/bin/:/home/pj/Applications/cava/:/home/pj/.local/bin/:/sbin/:/home/pj/bin/:/home/pj/Applications/c ava/:/home/pj/.local/bin/
(after seeing this I realized my /etc/zsh/zshenv gets sourced twice? This is the troubling line:export PATH=$PATH:/sbin/:$HOME/bin/:$HOME/Applications/cava/:$HOME/.local/bin/
, but I don't think this is causing my issue. tmux version:tmux -V tmux 2.3
tmuxp version:tmuxp --version tmuxp 1.4.0
tmux path:which tmux tmux: aliased to _zsh_tmux_plugin_run
tmuxp path:/home/pj/.local/bin//tmuxp
(I have no idea what's wrong with "//" here. tmuxp executable is located in the/home/pj/.local/bin/
directory) libtmux version: can't find libtmux. shell:chsh Login Shell [/usr/bin/zsh]:
output of tmux list-sessions:tls OMG: 5 windows (created Tue Mar 13 19:48:30 2018) [171x42] (attached) XXX: 5 windows (created Tue Mar 13 19:24:28 2018) [171x42]
(XXX is the manually fixed version I keep running with resurrect and continuum tmp plugins) tmux list-windows:tmux list-panes:
output of tmux show-options -g:
tmux show-window-options -g:
Within tmux: echo $TERM screen-256color (it's set in .tmux.conf) Outside tmux in zsh: xterm-256color
Sorry about this. It's more than I'd wish to paste...
I assume it's some kind of TERM issue that gets lost within Oh-My-Zsh configuration. But the thing is this "%" only apears when I load tmuxp session.
Any ideas?