mirror of
https://github.com/tmux/tmux.git
synced 2026-10-11 04:44:25 +00:00
Only skip collecting text except for right margin when autowrap is off,
from Jang-Ho Hwang.
This commit is contained in:
@@ -1,4 +1,4 @@
|
|||||||
/* $OpenBSD: screen-write.c,v 1.296 2026/10/02 12:53:26 nicm Exp $ */
|
/* $OpenBSD: screen-write.c,v 1.297 2026/10/02 14:16:42 nicm Exp $ */
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Copyright (c) 2007 Nicholas Marriott <nicholas.marriott@gmail.com>
|
* Copyright (c) 2007 Nicholas Marriott <nicholas.marriott@gmail.com>
|
||||||
@@ -2664,6 +2664,10 @@ screen_write_collect_add(struct screen_write_ctx *ctx,
|
|||||||
* Don't need to check that the attributes and whatnot are still the
|
* Don't need to check that the attributes and whatnot are still the
|
||||||
* same - input_parse will end the collection when anything that isn't
|
* same - input_parse will end the collection when anything that isn't
|
||||||
* a plain character is encountered.
|
* a plain character is encountered.
|
||||||
|
*
|
||||||
|
* Without wrapping, collect up to but not including the last column.
|
||||||
|
* Leave that cell to screen_write_cell so repeated writes overwrite it
|
||||||
|
* and the cursor remains at the right edge.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
collect = 1;
|
collect = 1;
|
||||||
@@ -2673,7 +2677,8 @@ screen_write_collect_add(struct screen_write_ctx *ctx,
|
|||||||
collect = 0;
|
collect = 0;
|
||||||
else if (gc->attr & GRID_ATTR_CHARSET)
|
else if (gc->attr & GRID_ATTR_CHARSET)
|
||||||
collect = 0;
|
collect = 0;
|
||||||
else if (~s->mode & MODE_WRAP)
|
else if ((~s->mode & MODE_WRAP) &&
|
||||||
|
s->cx + ctx->item->used >= sx - 1)
|
||||||
collect = 0;
|
collect = 0;
|
||||||
else if (s->mode & MODE_INSERT)
|
else if (s->mode & MODE_INSERT)
|
||||||
collect = 0;
|
collect = 0;
|
||||||
|
|||||||
Reference in New Issue
Block a user