Leon Winter
unread,Aug 1, 2019, 2:40:56 AM8/1/19Sign in to reply to author
Sign in to forward
You do not have permission to delete messages in this group
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to tmux-...@googlegroups.com
Hi,
test setup:
rxvt -geometry 80x26 -e tmux new-session \
'printf "\033[31m\033[44mE\033[7m\033[39m\033[49m\
%8s|%16s|%7s|%5s|%21s|%35s" a b c d e f; read'
then output the buffer with:
tmux capture-pane -p -e
As one can see the output of capture-pane does not correspond with the visual
display inside tmux: The end of the first line, which is background-inverted
whitespace as stripped.
The man page states
" -J joins wrapped lines and preserves trailing spaces at each line's end."
and infact when we use -J the trailing whitespace will be kept inplace,
unfortunately then however like the option is named lines will be joined
together so the captured output again does not correspond visually to the
content of the buffer. This behaviour is therefore intended but in our case very
unfortunate.
All of this is happening because the escape sequences with its background
setting gave meaning to the normally useless whitespace. If we chose to output
escape sequences with -e we might stop stripping whitespaces. Or we introduce a
new option that prevents stripping without joining lines. For the latter I added
a patch (which is trivial).
Regards,
Leon