If you don't want tmux to join lines together when you resize, you need to
insert a newline rather than letting it wrap at the last column. For
example:

perl -e "print \"x\"x$COLUMNS,\"\n\",foo,\"\n\""

tmux will not join these lines together.

If you don't print a newline, tmux will join the lines together.


On 16 March 2018 at 01:40, Stephen Hicks <[email protected]> wrote:

> I use long shell prompts that span multiple lines.  In order to get the
> earlier lines to go flush to the right-hand-side of the terminal window, I
> inspect $COLUMNS and just print that many characters so that the next
> character will be at the start of the next line.  This works great in most
> cases, but when my tmux window resizes, weird things happen.  For example,
>
> ```
> ---(sdh@home)---------(12:34)---
> ~ $ echo foo
> ```
>
> when my window gets wider expands to
>
> ```
> ---(sdh@home)---------(12:34)---~ $ echo f
> oo
> ```
>
> which is awkward and confusing.  Inserting an actual newline doesn't work
> (short of a weird termcap setting I'm vaguely aware of to compensate for
> wonky terminals that eat newlines at the end of a line), but I wonder if a
> special tmux-only non-printing escape sequence would be sufficient to tell
> tmux not to wrap the next line even if the window was big enough?  I'm not
> entirely sure what this would look like, but wanted to throw the idea out
> there to see if it would get any traction.
>
> --
> You received this message because you are subscribed to the Google Groups
> "tmux-users" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to [email protected].
> To post to this group, send email to [email protected].
> For more options, visit https://groups.google.com/d/optout.
>

-- 
You received this message because you are subscribed to the Google Groups 
"tmux-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send an email to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to