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
Этот коммит содержится в:
родитель
930b1d7809
Коммит
9dffac90e7
@ -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;
|
||||
|
Загрузка…
Ссылка в новой задаче
Block a user