mirror of
git://git.sv.gnu.org/nano.git
synced 2024-12-05 19:01:57 +03:00
remove DB's hacks to work around problems with ncurses' display of
two-column characters at the beginnings and ends of long lines (i.e, lines with $'s added), as the problems don't occur with ncurses 5.4, and there's no easy way to fix the same type of problem with doing a regex replace of "^" on a line beginning with a two-column character git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2231 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
This commit is contained in:
parent
913db834d2
commit
930b1d7809
20
src/winio.c
20
src/winio.c
@ -2273,12 +2273,6 @@ 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. Also make sure that we don't try to display only part of a
|
||||
* multicolumn character there. */
|
||||
if (dollars && len > 0 && strlenpt(buf) > start_col + len)
|
||||
len--;
|
||||
|
||||
if (len == 0)
|
||||
return mallocstrcpy(NULL, "");
|
||||
|
||||
@ -2293,7 +2287,7 @@ char *display_string(const char *buf, size_t start_col, size_t len, bool
|
||||
index = 0;
|
||||
|
||||
if (column < start_col || (dollars && column > 0 &&
|
||||
buf[start_index] != '\t')) {
|
||||
buf[start_index] != '\t')) {
|
||||
int wide_buf, wide_buf_len;
|
||||
|
||||
/* We don't display all of buf[start_index] since it starts to
|
||||
@ -2347,15 +2341,9 @@ 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) {
|
||||
/* If dollars is TRUE, make room for the "$" at the
|
||||
* beginning of the line. Also make sure that we don't try
|
||||
* to display only part of a multicolumn character there. */
|
||||
converted[0] = ' ';
|
||||
index = 1;
|
||||
if (dollars && column == start_col) {
|
||||
converted[1] = ' ';
|
||||
index = 2;
|
||||
}
|
||||
index++;
|
||||
if (dollars && column == start_col)
|
||||
index++;
|
||||
|
||||
start_col++;
|
||||
start_index += wide_buf_len;
|
||||
|
Loading…
Reference in New Issue
Block a user