commit 06e48df8a3c0213078be54cc3c40755882b1ce68
parent 88776e0eee06560970aa199231a268a852d8d6a1
Author: Benno Schulenberg <bensberg@telfort.nl>
Date: Sat, 17 May 2025 12:27:28 +0200
feedback: report the setting and removing of an anchor just once
When line numbers or the mini bar are active, there is no need for
the status-bar messages. Only when both line numbers and mini bar
are absent, the feedback messages are needed.
Diffstat:
1 file changed, 6 insertions(+), 4 deletions(-)
diff --git a/src/search.c b/src/search.c
@@ -1008,10 +1008,12 @@ void put_or_lift_anchor(void)
else
refresh_needed = TRUE;
- if (openfile->current->has_anchor)
- statusline(HUSH, _("Placed anchor"));
- else
- statusline(HUSH, _("Removed anchor"));
+ if (!ISSET(LINE_NUMBERS) && (!ISSET(MINIBAR) || ISSET(ZERO))) {
+ if (openfile->current->has_anchor)
+ statusline(REMARK, _("Placed anchor"));
+ else
+ statusline(REMARK, _("Removed anchor"));
+ }
}
/* Make the given line the current line, or report the anchoredness. */