nano

nano with my custom patches
git clone git://bsandro.tech/nano
Log | Files | Refs | README | LICENSE

commit 4314b8ded31d0a990bc6120607d9d33ac5b50c57
parent 52e39ae5f71e189491008c60d2a1617770dfa852
Author: Benno Schulenberg <bensberg@telfort.nl>
Date:   Thu,  1 Aug 2019 13:24:56 +0200

display: blank the status bar on a successful cut or paste

But don't blank it when using the word-deletion functions.

This addresses https://savannah.gnu.org/bugs/?56564.

Original-patch-by: Bill Hager <prog00@protonmail.com>

Diffstat:
Msrc/cut.c | 8+++++++-
1 file changed, 7 insertions(+), 1 deletion(-)

diff --git a/src/cut.c b/src/cut.c @@ -182,7 +182,9 @@ void chop_word(bool forward) openfile->current_x = is_current_x; /* Now kill the marked region and a word is gone. */ - cut_text(); + add_undo(CUT); + do_cut_text(FALSE, TRUE, FALSE, FALSE); + update_undo(CUT); /* Discard the cut word and restore the cutbuffer. */ free_lines(cutbuffer); @@ -390,6 +392,7 @@ void cut_text(void) if (is_cuttable(FALSE)) do_cut_text(FALSE, FALSE, FALSE, FALSE); #endif + wipe_statusbar(); } #ifndef NANO_TINY @@ -433,6 +436,7 @@ void cut_till_eof(void) add_undo(CUT_TO_EOF); do_cut_text(FALSE, FALSE, TRUE, FALSE); update_undo(CUT_TO_EOF); + wipe_statusbar(); } /* Erase text (current line or marked region), sending it into oblivion. */ @@ -455,6 +459,7 @@ void zap_text(void) do_cut_text(FALSE, openfile->mark != NULL, FALSE, TRUE); update_undo(ZAP); + wipe_statusbar(); cutbuffer = was_cutbuffer; } @@ -496,5 +501,6 @@ void paste_text(void) openfile->placewewant = xplustabs(); set_modified(); + wipe_statusbar(); refresh_needed = TRUE; }