summaryrefslogtreecommitdiffstats
path: root/cpukit/libmisc/shell
diff options
context:
space:
mode:
authorzack <zack>2023-02-09 21:25:32 -0500
committerJoel Sherrill <joel@rtems.org>2023-02-15 15:16:37 -0600
commit809e34e52777d3ba17e66cea7796fff71c3372cb (patch)
tree1d8c86ae3957a6cec79edad55ad49fb4b9cdf5df /cpukit/libmisc/shell
parentbsps/aarch64: Fix off-by-one cache bug (diff)
downloadrtems-809e34e52777d3ba17e66cea7796fff71c3372cb.tar.bz2
libmisc/shell/main_edit.c: User cannot cut using ctrl e and x
Closes #4557
Diffstat (limited to 'cpukit/libmisc/shell')
-rw-r--r--cpukit/libmisc/shell/main_edit.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/cpukit/libmisc/shell/main_edit.c b/cpukit/libmisc/shell/main_edit.c
index 6e954639e2..8317452b7b 100644
--- a/cpukit/libmisc/shell/main_edit.c
+++ b/cpukit/libmisc/shell/main_edit.c
@@ -1713,7 +1713,6 @@ static void copy_selection(struct editor *ed) {
ed->env->clipboard = (unsigned char *) realloc(ed->env->clipboard, ed->env->clipsize);
if (!ed->env->clipboard) return;
copy(ed, ed->env->clipboard, selstart, ed->env->clipsize);
- select_toggle(ed);
}
static void cut_selection(struct editor *ed) {
@@ -2132,7 +2131,7 @@ static void edit(struct editor *ed) {
case ctrl('e'): select_toggle(ed); break;
case ctrl('a'): select_all(ed); break;
- case ctrl('c'): copy_selection(ed); break;
+ case ctrl('c'): copy_selection(ed);select_toggle(ed); break;
case ctrl('f'): find_text(ed, 0); break;
case ctrl('l'): goto_line(ed); break;
case ctrl('g'): find_text(ed, 1); break;