nano

nano with my custom patches
git clone git://bsandro.tech/nano
Log | Files | Refs | README | LICENSE

commit 2b6924ef6e28f4a003b9d66962a42c894e0e12e8
parent 01d8b0e15dfcb037b3e3ddabce99068a955240a2
Author: Benno Schulenberg <bensberg@telfort.nl>
Date:   Sun, 15 Mar 2020 16:38:05 +0100

display: do not show a "[" double-width placeholder when softwrapping

The placeholder half-duplicates the character that is actually shown
at the beginning of the next row.  When NOT softwrapping, showing a
"[" before the ">" kind of makes sense: to avoid having a gaping gap
there.  But when softwrapping, all characters of the line will be on
the screen (except when going offscreen at the bottom), so there is
no need to show a placeholder for anything.

I imagine that when reading softwrapped Chinese or Japanese text,
things are easier to understand when no characters are shown that
are not actually in the text.

This avoids https://savannah.gnu.org/bugs/?57993.

Bug existed since version 2.8.6, commit 8490f4ac.

Diffstat:
Msrc/winio.c | 5-----
1 file changed, 0 insertions(+), 5 deletions(-)

diff --git a/src/winio.c b/src/winio.c @@ -2860,11 +2860,6 @@ int update_softwrapped_line(linestruct *line) if (end_of_line) break; - /* If the line is softwrapped early (because of a two-column character), - * show a "[" placeholder, unless we're softwrapping at blanks. */ - if (!ISSET(AT_BLANKS) && to_col - from_col < editwincols) - mvwaddch(edit, row - 1, to_col - from_col, '['); - from_col = to_col; }