commit 6d724f6d072b8f7eceba405e3d8cc42768c7210a
parent 1cc19c8c6a05d5c878f704f21daf0f30d0fc67fc
Author: Benno Schulenberg <bensberg@telfort.nl>
Date: Sat, 10 May 2025 17:00:35 +0200
feedback: show in mini bar the presence of an anchor on the cursor line
And as the presence of an anchor is now visible in the mini bar,
the "Placed anchor"/"Removed anchor" messages are no longer needed
when the mini bar is active.
Diffstat:
2 files changed, 8 insertions(+), 2 deletions(-)
diff --git a/src/search.c b/src/search.c
@@ -1009,9 +1009,9 @@ void put_or_lift_anchor(void)
refresh_needed = TRUE;
if (openfile->current->has_anchor)
- statusline(REMARK, _("Placed anchor"));
+ statusline(HUSH, _("Placed anchor"));
else
- statusline(REMARK, _("Removed anchor"));
+ statusline(HUSH, _("Removed anchor"));
}
/* Make the given line the current line, or report the anchoredness. */
diff --git a/src/winio.c b/src/winio.c
@@ -2272,6 +2272,12 @@ void minibar(void)
show_states_at(footwin);
}
+ /* Indicate it when the line has an anchor. */
+ if (openfile->current->has_anchor && namewidth + 7 < COLS)
+ mvwaddstr(footwin, 0, COLS - 5 - padding, openfile->filetop->has_anchor ?
+ (using_utf8() ? "\xEF\xBF\xAD" : "=") :
+ (using_utf8() ? "\xE2\xAC\xA5" : "+"));
+
/* Display how many percent the current line is into the file. */
if (namewidth + 6 < COLS) {
sprintf(location, "%3zi%%", 100 * openfile->current->lineno / openfile->filebot->lineno);