commit 9bb9a747e2bb07511f936e835c1faafb58369ba6
parent e86180119e21b80cb1477f0115087eabc82be45b
Author: Benno Schulenberg <bensberg@telfort.nl>
Date: Mon, 13 Apr 2020 11:48:36 +0200
feedback: indicate an anchor with a "+" in the line-number margin
Diffstat:
2 files changed, 8 insertions(+), 1 deletion(-)
diff --git a/src/search.c b/src/search.c
@@ -983,6 +983,8 @@ void put_or_lift_anchor(void)
{
openfile->current->has_anchor = !openfile->current->has_anchor;
+ update_line(openfile->current, openfile->current_x);
+
if (openfile->current->has_anchor)
statusbar(_("Placed anchor"));
else
diff --git a/src/winio.c b/src/winio.c
@@ -2395,7 +2395,12 @@ void draw_row(int row, const char *converted, linestruct *line, size_t from_col)
#endif
mvwprintw(edit, row, 0, "%*zd", margin - 1, line->lineno);
wattroff(edit, interface_color_pair[LINE_NUMBER]);
- wprintw(edit, " ");
+#ifndef NANO_TINY
+ if (line->has_anchor && from_col == 0)
+ wprintw(edit, "+");
+ else
+#endif
+ wprintw(edit, " ");
}
#endif