Count columns used by ND_SPACE character when splitting lines
ND_SPACE take up a printable column, so they need to be counted. Reproducer: /eval echo $repeat(160 $chr(19))XXXXXXXXXXXXXXXXXXXXXXX
This commit is contained in:
@@ -1,5 +1,7 @@
|
|||||||
[Changes 1.2.2]
|
[Changes 1.2.2]
|
||||||
|
|
||||||
|
* Count columns used by ND_SPACE character when splitting lines. (caf)
|
||||||
|
|
||||||
* Use target window width rather than terminal width to wrap /list -wide
|
* Use target window width rather than terminal width to wrap /list -wide
|
||||||
output. (caf)
|
output. (caf)
|
||||||
|
|
||||||
|
|||||||
@@ -500,10 +500,11 @@ char **BX_prepare_display(const char *orig_str,
|
|||||||
/*
|
/*
|
||||||
* Just swallop up any ND's over the max
|
* Just swallop up any ND's over the max
|
||||||
*/
|
*/
|
||||||
if ((nds_max > 0) && (nds_count > nds_max))
|
if ((nds_count <= nds_max) || (nds_max <= 0))
|
||||||
;
|
{
|
||||||
else
|
|
||||||
buffer[pos++] = ND_SPACE;
|
buffer[pos++] = ND_SPACE;
|
||||||
|
col++;
|
||||||
|
}
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case '\n': /* Forced newline */
|
case '\n': /* Forced newline */
|
||||||
|
|||||||
Reference in New Issue
Block a user