Commit 9dffac90 authored by David Lawrence Ramsey's avatar David Lawrence Ramsey
Browse files

put back two of the hacks of DB's that are actually needed (we need one

since we can't add half a two-column character to converted in
display_string(), and we need the other to keep the "$" from spilling
over to the next line if the line contains two-column characters in the
right places)


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2232 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
parent 930b1d78
Showing with 6 additions and 3 deletions
+6 -3
......@@ -2273,6 +2273,11 @@ char *display_string(const char *buf, size_t start_col, size_t len, bool
size_t index;
/* Current position in converted. */
/* If dollars is TRUE, make room for the "$" at the end of the
* line. */
if (dollars && len > 0 && strlenpt(buf) > start_col + len)
len--;
if (len == 0)
return mallocstrcpy(NULL, "");
......@@ -2341,9 +2346,7 @@ char *display_string(const char *buf, size_t start_col, size_t len, bool
}
#ifdef NANO_WIDE
else if (wcwidth((wchar_t)wide_buf) > 1) {
index++;
if (dollars && column == start_col)
index++;
converted[index++] = ' ';
start_col++;
start_index += wide_buf_len;
......
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