mirror of
git://git.sv.gnu.org/nano.git
synced 2025-01-16 22:39:21 +03:00
display: when converting tabs, don't go beyond the screen width
This fixes https://savannah.gnu.org/bugs/?51427.
This commit is contained in:
parent
ecc7c26641
commit
4f3249de56
@ -1902,7 +1902,7 @@ char *display_string(const char *buf, size_t column, size_t span, bool isdata)
|
||||
converted[index++] = ' ';
|
||||
column++;
|
||||
/* Fill the tab up with the required number of spaces. */
|
||||
while (column % tabsize != 0) {
|
||||
while (column % tabsize != 0 && column < beyond) {
|
||||
converted[index++] = ' ';
|
||||
column++;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user