summaryrefslogtreecommitdiff
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
parenta63ce8c2e2be61ba3acf1d9b71c963f313ad5cf6 (diff)
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,
1654 1654
1655 if (!pd->selection) 1655 if (!pd->selection)
1656 elm_code_widget_selection_start(widget, pd->cursor_line, pd->cursor_col - (backwards?1:0)); 1656 elm_code_widget_selection_start(widget, pd->cursor_line, pd->cursor_col - (backwards?1:0));
1657
1658 if (pd->selection->start_line == pd->selection->end_line)
1659 {
1660 if ((pd->selection->end_col == pd->selection->start_col && !backwards) ||
1661 (pd->selection->end_col > pd->selection->start_col))
1662 elm_code_widget_cursor_position_set(widget, pd->selection->end_line, pd->selection->end_col+1);
1663 }
1664 else if (pd->selection->end_line > pd->selection->start_line)
1665 {
1666 elm_code_widget_cursor_position_set(widget, pd->selection->end_line, pd->selection->end_col+1);
1667 }
1657 } 1668 }
1658 else 1669 else
1659 elm_code_widget_selection_clear(widget); 1670 elm_code_widget_selection_clear(widget);