summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlastair Poole <netstar@gmail.com>2020-07-14 11:11:16 +0100
committerAlastair Poole <netstar@gmail.com>2020-07-14 11:12:29 +0100
commit9f7fde560aac4953cfbb801b4a8d115a7a0039e0 (patch)
tree2f231957ee3f44a6f26029b4b3c0445cc931719f
parentf620e0edd17dc7ea3d93ac26146da2698b372d51 (diff)
elm_code: on newline ensure line number visible.
@fix T2798
-rw-r--r--src/lib/elementary/elm_code_widget.c14
1 files changed, 14 insertions, 0 deletions
diff --git a/src/lib/elementary/elm_code_widget.c b/src/lib/elementary/elm_code_widget.c
index c6cb600647..870a73cee6 100644
--- a/src/lib/elementary/elm_code_widget.c
+++ b/src/lib/elementary/elm_code_widget.c
@@ -1526,6 +1526,18 @@ _elm_code_widget_tab_at_cursor_insert(Elm_Code_Widget *widget)
1526 } 1526 }
1527} 1527}
1528 1528
1529static void
1530_elm_code_widget_scroll_newline(Elm_Code_Widget *widget)
1531{
1532 Elm_Code_Widget_Data *pd;
1533 Evas_Coord x, y, w, h;
1534
1535 pd = efl_data_scope_get(widget, ELM_CODE_WIDGET_CLASS);
1536
1537 elm_scroller_region_get(pd->scroller, &x, &y, &w, &h);
1538 elm_scroller_region_show(pd->scroller, 0, y, w, h);
1539}
1540
1529void 1541void
1530_elm_code_widget_newline(Elm_Code_Widget *widget) 1542_elm_code_widget_newline(Elm_Code_Widget *widget)
1531{ 1543{
@@ -1575,6 +1587,8 @@ _elm_code_widget_newline(Elm_Code_Widget *widget)
1575 _elm_code_widget_undo_change_add(widget, change); 1587 _elm_code_widget_undo_change_add(widget, change);
1576 _elm_code_widget_change_free(change); 1588 _elm_code_widget_change_free(change);
1577 free(text); 1589 free(text);
1590
1591 _elm_code_widget_scroll_newline(widget);
1578} 1592}
1579 1593
1580static void 1594static void