Discussion:
[tmux:tickets] #202 Bug with resizing panes in tmux when using ZSH
Sam Perry
2015-06-02 14:42:18 UTC
Permalink
---

** [tickets:#202] Bug with resizing panes in tmux when using ZSH**

**Status:** open
**Created:** Tue Jun 02, 2015 02:42 PM UTC by Sam Perry
**Last Updated:** Tue Jun 02, 2015 02:42 PM UTC
**Owner:** nobody

I am using Tmux with ZSH and have a problem when trying to resize panels.
I am currently using these bindings to resize panels as I work:

unbind-key M-j ; bind-key -n M-j resize-pane -D 1
unbind-key M-k ; bind-key -n M-k resize-pane -U 1
unbind-key M-h ; bind-key -n M-h resize-pane -L 1
unbind-key M-l ; bind-key -n M-l resize-pane -R 1

For example: I have two panels, one on top of the other and both displaying a ZSH prompt. The top panel has run the following commands:

***@touriste-147-12:~% echo hello
hello
***@touriste-147-12:~% echo goodbye
goodbye
***@touriste-147-12:~% _

When vertically resizing the bottom panel to make it smaller the top panel will be enlarged to compensate as expected but the following is added to the screen:

***@touriste-147-12:~% <<<
***@touriste-147-12:~% <<< THIS IS ALL NEW AND NOT CREATED
***@touriste-147-12:~% <<< BY ME
***@touriste-147-12:~% echo hello <<<
***@touriste-147-12:~% echo hello
hello
***@touriste-147-12:~% echo goodbye
goodbye
***@touriste-147-12:~% _

Then if I resize the bottom panel back the same happens to the bottom, with the prompt staying at the position where it had been shrunk to like this:

From:

***@touriste-147-12:~% _

To:

***@touriste-147-12:~%
***@touriste-147-12:~%
***@touriste-147-12:~%
***@touriste-147-12:~%
***@touriste-147-12:~%
***@touriste-147-12:~%
***@touriste-147-12:~%
***@touriste-147-12:~% _

This does not occur when resizing the window using iTerm without tmux. The zsh shell displays properly in iTerm

The same is true of Terminal

This also does not occur when using bash in tmux with the same settings

So far I have tried:

- Adding <code>export LANG=en_GB.UTF-8</code> to my .zshrc
- Setting <code>export TERM="xterm-256color"</code> and <code>export TERM="screen-256color"</code> in my .zshrc
- Using the same for <code>set -g default-terminal "xterm-256color"</code>

Sadly, none of this has solved my problem.
From posting this here: http://superuser.com/questions/918182/bug-with-resizing-panes-in-tmux-when-using-zsh
the following comment goes some way to fixing the problem: "I haven't found a solution either, but I worked around the bug by adding if [[ ! -z $TMUX ]]; then printf '\n'; fi to my .zshrc" though I thought it would be worth bringing to your attention regardless.


---

Sent from sourceforge.net because tmux-***@lists.sourceforge.net is subscribed to https://sourceforge.net/p/tmux/tickets/

To unsubscribe from further messages, a project admin can change settings at https://sourceforge.net/p/tmux/admin/tickets/options. Or, if this is a mailing list, you can unsubscribe from the mailing list.
Loading...