Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Re: Prompt redrawing issues with wrapped prompt on SIGWINCH



On Apr 18,  7:04pm, Daniel Hahler wrote:
}
} Some remarks: it does not only affect urxvt, but also gnome-terminal.
} So it's likely to be a common issue with all terminals?!

Doesn't happen to me with xterm, but it sends multiple SIGWINCH rather
than wait for the final size of the window.

} Could this be addressed by e.g. having the terminal notify zsh about
} SIGWINCH before reflowing/rewrapping the text, or something similar?

Signals are asynchronous at the OS level so the emulator can't control
whether the shell has as chance to respond to the signal before it
redraws the text.  In any case this would require reprogramming the
emulator, so is out of our hands.

} > PS1=$'${(pl:COLUMNS-1::=:)}\n %# '
} 
} This suggested workaround only helps if you resize the window by one
} column, e.g. when using the mouse. But modkey-h/l in awesome changes
} the master-window-factor by a percent of the screen size.

The suggested workaround was successful for me when using mouse-drag to
resize the window, despite urxvt sending only a single SIGWINCH when the
mouse was released, which should be analogous to having the window manager
trigger a proportional resize.  What version of zsh do you have?



Messages sorted by: Reverse Date, Date, Thread, Author