Commit 4f3249de authored by David Lawrence Ramsey's avatar David Lawrence Ramsey Committed by Benno Schulenberg
Browse files

display: when converting tabs, don't go beyond the screen width

This fixes https://savannah.gnu.org/bugs/?51427.
parent ecc7c266
Showing with 1 addition and 1 deletion
+1 -1
......@@ -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++;
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment