nano-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Nano-devel] [PATCH 2/2] cutting: give feedback when otherwise nothing h


From: Benno Schulenberg
Subject: [Nano-devel] [PATCH 2/2] cutting: give feedback when otherwise nothing happens
Date: Mon, 31 Dec 2018 13:24:06 +0100

This makes the cutting and pasting keystrokes somewhat discoverable.

---
 src/cut.c | 10 +++++++---
 1 file changed, 7 insertions(+), 3 deletions(-)

diff --git a/src/cut.c b/src/cut.c
index 7cb6a862..87ed711e 100644
--- a/src/cut.c
+++ b/src/cut.c
@@ -186,6 +186,7 @@ bool nothing_needs_cutting(void)
 #ifndef NANO_TINY
                openfile->mark = NULL;
 #endif
+               statusbar(_("Nothing was cut"));
                return TRUE;
        } else
                return FALSE;
@@ -246,8 +247,10 @@ void do_copy_text(void)
 /* Cut from the current cursor position to the end of the file. */
 void do_cut_till_eof(void)
 {
-       if (openfile->current->next == NULL && openfile->current->data[0] == 
'\0')
+       if (openfile->current->next == NULL && openfile->current->data[0] == 
'\0') {
+               statusbar(_("Nothing was cut"));
                return;
+       }
 
        add_undo(CUT_TO_EOF);
        do_cut_text(FALSE, FALSE, TRUE, FALSE);
@@ -292,9 +295,10 @@ void do_uncut_text(void)
        size_t was_leftedge = 0;
                /* The leftedge where we started the paste. */
 
-       /* If the cutbuffer is empty, there is nothing to do. */
-       if (cutbuffer == NULL)
+       if (cutbuffer == NULL) {
+               statusbar(_("The cutbuffer is empty"));
                return;
+       }
 
 #ifndef NANO_TINY
        add_undo(PASTE);
-- 
2.19.2




reply via email to

[Prev in Thread] Current Thread [Next in Thread]