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.
This commit is contained in:
Benno Schulenberg 2020-08-03 10:02:09 +02:00
parent 18a4658d4f
commit 71c0cde5ce
1 changed files with 1 additions and 1 deletions

View File

@ -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 */