aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAndy Williams <andy@andywilliams.me>2017-03-21 22:36:53 +0000
committerAndy Williams <andy@andywilliams.me>2017-03-21 22:36:53 +0000
commit2c0b850f5727b0dce5fdc80cd6394adb242cd93f (patch)
tree6fe8c3a9e1ae036a86f1258791323958b9489786
parentelm_map: Fix work of elm_map_overlay_icon_set if icon is NULL. (diff)
downloadefl-2c0b850f5727b0dce5fdc80cd6394adb242cd93f.tar.gz
elm_code: fix keyboard selection forward
@fix
-rw-r--r--src/lib/elementary/elm_code_widget.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/src/lib/elementary/elm_code_widget.c b/src/lib/elementary/elm_code_widget.c
index 8db374c056..f5cb42262a 100644
--- a/src/lib/elementary/elm_code_widget.c
+++ b/src/lib/elementary/elm_code_widget.c
@@ -1654,6 +1654,17 @@ _elm_code_widget_key_down_cb(void *data, Evas *evas EINA_UNUSED,
if (!pd->selection)
elm_code_widget_selection_start(widget, pd->cursor_line, pd->cursor_col - (backwards?1:0));
+
+ if (pd->selection->start_line == pd->selection->end_line)
+ {
+ if ((pd->selection->end_col == pd->selection->start_col && !backwards) ||
+ (pd->selection->end_col > pd->selection->start_col))
+ elm_code_widget_cursor_position_set(widget, pd->selection->end_line, pd->selection->end_col+1);
+ }
+ else if (pd->selection->end_line > pd->selection->start_line)
+ {
+ elm_code_widget_cursor_position_set(widget, pd->selection->end_line, pd->selection->end_col+1);
+ }
}
else
elm_code_widget_selection_clear(widget);