screen: don't push the longer-line indicator ($) to the next row
If the last two columns of a row would be taken up by a double-width character (and the line is longer than that), don't print it, because it wouldn't leave any room for the $ character. This fixes https://savannah.gnu.org/bugs/?50491. Reported-by: David Lawrence Ramsey <pooka109@gmail.com>master
parent
3c3eb4909d
commit
69784d51db
|
@ -1928,6 +1928,10 @@ char *display_string(const char *buf, size_t start_col, size_t span,
|
||||||
/* Null-terminate converted. */
|
/* Null-terminate converted. */
|
||||||
converted[index] = '\0';
|
converted[index] = '\0';
|
||||||
|
|
||||||
|
/* If there is more text than can be shown, make room for the $. */
|
||||||
|
if (*buf != '\0' && isdata && !ISSET(SOFTWRAP))
|
||||||
|
span--;
|
||||||
|
|
||||||
/* Make sure converted takes up no more than span columns. */
|
/* Make sure converted takes up no more than span columns. */
|
||||||
index = actual_x(converted, span);
|
index = actual_x(converted, span);
|
||||||
null_at(&converted, index);
|
null_at(&converted, index);
|
||||||
|
|
Loading…
Reference in New Issue