Commit 50e8f8aa authored by Benno Schulenberg's avatar Benno Schulenberg
Browse files

cutting: give feedback when otherwise nothing happens

This makes the cutting and pasting keystrokes somewhat discoverable.
No related merge requests found
Showing with 7 additions and 3 deletions
+7 -3
...@@ -369,6 +369,7 @@ bool nothing_needs_cutting(void) ...@@ -369,6 +369,7 @@ bool nothing_needs_cutting(void)
#ifndef NANO_TINY #ifndef NANO_TINY
openfile->mark = NULL; openfile->mark = NULL;
#endif #endif
statusbar(_("Nothing was cut"));
return TRUE; return TRUE;
} else } else
return FALSE; return FALSE;
...@@ -429,8 +430,10 @@ void do_copy_text(void) ...@@ -429,8 +430,10 @@ void do_copy_text(void)
/* Cut from the current cursor position to the end of the file. */ /* Cut from the current cursor position to the end of the file. */
void do_cut_till_eof(void) 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; return;
}
add_undo(CUT_TO_EOF); add_undo(CUT_TO_EOF);
do_cut_text(FALSE, FALSE, TRUE, FALSE); do_cut_text(FALSE, FALSE, TRUE, FALSE);
...@@ -475,9 +478,10 @@ void do_uncut_text(void) ...@@ -475,9 +478,10 @@ void do_uncut_text(void)
size_t was_leftedge = 0; size_t was_leftedge = 0;
/* The leftedge where we started the paste. */ /* 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; return;
}
#ifndef NANO_TINY #ifndef NANO_TINY
add_undo(PASTE); add_undo(PASTE);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment