aboutsummaryrefslogtreecommitdiff
path: root/main.c
diff options
context:
space:
mode:
authorMarc André Tanner <mat@brain-dump.org>2017-12-08 10:54:20 +0100
committerMarc André Tanner <mat@brain-dump.org>2017-12-08 10:54:20 +0100
commit8e27737bd4e9ff1c275a0cb439bfe2280ffa3f62 (patch)
tree8ea5ca3b893102ff3f9a891b5d738e0440f8ac2f /main.c
parent7da804505d38c98ae66ec3524e190df7e68936bb (diff)
downloadvis-8e27737bd4e9ff1c275a0cb439bfe2280ffa3f62.tar.gz
vis-8e27737bd4e9ff1c275a0cb439bfe2280ffa3f62.tar.xz
vis: let <C-c> behave as <Escape> if only one selection exists
This should allow the :-command prompt to be closed with <C-c><C-c> (from insert mode) or <C-c> (from normal mode). Fix #608
Diffstat (limited to 'main.c')
-rw-r--r--main.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/main.c b/main.c
index a41c253..db2ca28 100644
--- a/main.c
+++ b/main.c
@@ -1484,7 +1484,7 @@ static const char *selections_remove_column(Vis *vis, const char *keys, const Ar
if (column >= max)
column = max - 1;
if (view_selections_count(view) == 1) {
- vis_mode_switch(vis, VIS_MODE_NORMAL);
+ vis_keys_feed(vis, "<Escape>");
return keys;
}