File tree 1 file changed +18
-8
lines changed
1 file changed +18
-8
lines changed Original file line number Diff line number Diff line change @@ -56,20 +56,30 @@ ProcessResult Selector::ProcessKeyEvent(const KeyEvent& key_event) {
56
56
if (ch == XK_Left || ch == XK_KP_Left) {
57
57
if (!key_event.ctrl () &&
58
58
!key_event.shift () &&
59
- ctx->caret_pos () == ctx->input ().length () &&
60
- ctx->get_option (" _horizontal" ) &&
61
- CursorUp (ctx)) {
62
- return kAccepted ;
59
+ ctx->caret_pos () == ctx->input ().length ()) {
60
+ if (ctx->get_option (" _horizontal" ) &&
61
+ CursorUp (ctx)) {
62
+ return kAccepted ;
63
+ }
64
+ if (ctx->get_option (" _vertical" )) {
65
+ CursorDown (ctx);
66
+ return kAccepted ;
67
+ }
63
68
}
64
69
return kNoop ;
65
70
}
66
71
if (ch == XK_Right || ch == XK_KP_Right) {
67
72
if (!key_event.ctrl () &&
68
73
!key_event.shift () &&
69
- ctx->caret_pos () == ctx->input ().length () &&
70
- ctx->get_option (" _horizontal" )) {
71
- CursorDown (ctx);
72
- return kAccepted ;
74
+ ctx->caret_pos () == ctx->input ().length ()) {
75
+ if (ctx->get_option (" _horizontal" )) {
76
+ CursorDown (ctx);
77
+ return kAccepted ;
78
+ }
79
+ if (ctx->get_option (" _vertical" ) &&
80
+ CursorUp (ctx)) {
81
+ return kAccepted ;
82
+ }
73
83
}
74
84
return kNoop ;
75
85
}
You can’t perform that action at this time.
0 commit comments