aboutsummaryrefslogtreecommitdiff
path: root/main.c
diff options
context:
space:
mode:
Diffstat (limited to 'main.c')
-rw-r--r--main.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/main.c b/main.c
index 0fd0489..ba4ae01 100644
--- a/main.c
+++ b/main.c
@@ -1326,9 +1326,11 @@ static const char *selections_new(Vis *vis, const char *keys, const Arg *arg) {
for (Selection *s = view_selections(view); s; s = view_selections_next(s))
sel = s;
break;
- default:
- return keys;
}
+
+ if (!sel)
+ return keys;
+
size_t oldpos = view_cursors_pos(sel);
if (arg->i > 0)
view_line_down(sel);