commit d1c412d20009341cb1fedf42828ae72adc8a195a
parent 5c4c30e26b4c477a9d33d1c64146ae3959ceb4da
Author: OIX <ObeliX-@gmx.de>
Date: Tue, 22 Dec 2020 06:08:18 +0100
mouse: update title bar (the M flag) when the click is on the cursor
Clicking on the cursor toggles the mark, meaning that the flags in
the title bar should be updated when --stateflags is active.
This fixes https://savannah.gnu.org/bugs/?59747.
Indirectly-reported-by: ObeliX <ObeliX-@gmx.de>
Signed-off-by: OIX <ObeliX-@gmx.de>
Diffstat:
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/src/nano.c b/src/nano.c
@@ -1311,9 +1311,11 @@ int do_mouse(void)
#ifndef NANO_TINY
/* Clicking where the cursor is toggles the mark, as does clicking
* beyond the line length with the cursor at the end of the line. */
- if (sameline && openfile->current_x == current_x_save)
+ if (sameline && openfile->current_x == current_x_save) {
do_mark();
- else
+ if (ISSET(STATEFLAGS))
+ titlebar(NULL);
+ } else
#endif
/* The cursor moved; clean the cutbuffer on the next cut. */
keep_cutbuffer = FALSE;