commit 71c0cde5ce922a8aa25d67a481a47b3005f63171
parent 18a4658d4f307d8f8201afb90e30363fba3f362d
Author: Benno Schulenberg <bensberg@telfort.nl>
Date: Mon, 3 Aug 2020 10:02:09 +0200
anchor: show an anchor also when the line is horizontally scrolled
This fixes https://savannah.gnu.org/bugs/?58884.
Bug existed since version 5.0, since anchors were introduced.
Diffstat:
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/winio.c b/src/winio.c
@@ -2275,7 +2275,7 @@ void draw_row(int row, const char *converted, linestruct *line, size_t from_col)
mvwprintw(edit, row, 0, "%*zd", margin - 1, line->lineno);
wattroff(edit, interface_color_pair[LINE_NUMBER]);
#ifndef NANO_TINY
- if (line->has_anchor && from_col == 0)
+ if (line->has_anchor && (from_col == 0 || !ISSET(SOFTWRAP)))
#ifdef ENABLE_UTF8
if (using_utf8())
wprintw(edit, "\xE2\x97\x86"); /* black diamond */