aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--config.def.h2
-rw-r--r--main.c8
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") },
diff --git a/main.c b/main.c
index 9208974..e8c008a 100644
--- a/main.c
+++ b/main.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) {