Telling ncurses to really redraw the line, without optimization.
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@4907 35c25a1d-7b9e-4130-9fde-d3aeb78583b8master
parent
b19524f0d7
commit
0ae38b4ef8
|
@ -1,3 +1,10 @@
|
||||||
|
2014-05-23 Benno Schulenberg <bensberg@justemail.net>
|
||||||
|
* src/winio.c (edit_draw): Finally, the proper fix for bug #31743;
|
||||||
|
telling ncurses to really redraw the line, without optimization, so
|
||||||
|
it will not mistakenly assume that a wide character at the start of
|
||||||
|
a line takes up just one column. This deletes the workaround that
|
||||||
|
had the side effect of creating pastes full of trailing whitespace.
|
||||||
|
|
||||||
2014-05-19 Mark Majeres <mark@engine12.com>
|
2014-05-19 Mark Majeres <mark@engine12.com>
|
||||||
* src/winio.c (edit_draw): Paint the current line *after* tickling the
|
* src/winio.c (edit_draw): Paint the current line *after* tickling the
|
||||||
terminal, so that the character in the final column will be displayed
|
terminal, so that the character in the final column will be displayed
|
||||||
|
|
10
src/winio.c
10
src/winio.c
|
@ -2492,15 +2492,13 @@ void edit_draw(filestruct *fileptr, const char *converted, int
|
||||||
assert(openfile != NULL && fileptr != NULL && converted != NULL);
|
assert(openfile != NULL && fileptr != NULL && converted != NULL);
|
||||||
assert(strlenpt(converted) <= COLS);
|
assert(strlenpt(converted) <= COLS);
|
||||||
|
|
||||||
#ifdef ENABLE_UTF8
|
|
||||||
if (using_utf8())
|
|
||||||
/* Tickle the terminal into displaying two-column characters
|
|
||||||
* properly, using Unicode 00A0 (No-Break Space). */
|
|
||||||
mvwaddstr(edit, line, COLS - 1, "\xC2\xA0\x00");
|
|
||||||
#endif
|
|
||||||
/* First simply paint the line -- then we'll add colors or the
|
/* First simply paint the line -- then we'll add colors or the
|
||||||
* marking highlight on just the pieces that need it. */
|
* marking highlight on just the pieces that need it. */
|
||||||
mvwaddstr(edit, line, 0, converted);
|
mvwaddstr(edit, line, 0, converted);
|
||||||
|
/* Tell ncurses to really redraw the line without trying to optimize
|
||||||
|
for what it thinks is already there, because it gets it wrong in
|
||||||
|
the case of a wide character in column zero. See bug #31743. */
|
||||||
|
wredrawln(edit, line, 1);
|
||||||
|
|
||||||
#ifndef DISABLE_COLOR
|
#ifndef DISABLE_COLOR
|
||||||
/* If color syntaxes are available and turned on, we need to display
|
/* If color syntaxes are available and turned on, we need to display
|
||||||
|
|
Loading…
Reference in New Issue