diff options
| -rw-r--r-- | config.def.h | 2 | ||||
| -rw-r--r-- | main.c | 8 |
2 files changed, 8 insertions, 2 deletions
diff --git a/config.def.h b/config.def.h index c29ce64..0af24fd 100644 --- a/config.def.h +++ b/config.def.h @@ -273,6 +273,8 @@ static const KeyBinding bindings_visual[] = { { "<C-f>", ALIAS("<PageDown>") }, { "<C-u>", ACTION(CURSORS_PREV) }, { "<C-d>", ACTION(CURSORS_NEXT) }, + { "<C-k>", ALIAS("<C-u>") }, + { "<C-j>", ALIAS("<C-d>") }, { "x", ALIAS("d") }, { "r", ALIAS("c") }, { "s", ALIAS("c") }, @@ -1401,8 +1401,12 @@ static const char *cursors_remove(Vis *vis, const char *keys, const Arg *arg) { static const char *cursors_navigate(Vis *vis, const char *keys, const Arg *arg) { View *view = vis_view(vis); - if (!view_cursors_multiple(view)) - return wscroll(vis, keys, arg); + if (!view_cursors_multiple(view)) { + Filerange sel = view_selection_get(view); + if (!text_range_valid(&sel)) + return wscroll(vis, keys, arg); + return keys; + } Cursor *c = view_cursors_primary_get(view); for (int count = vis_count_get_default(vis, 1); count > 0; count--) { if (arg->i > 0) { |
