diff options
author | Andy Williams <andy@andywilliams.me> | 2016-05-17 17:25:28 +0100 |
---|---|---|
committer | Andy Williams <andy@andywilliams.me> | 2016-05-17 17:25:28 +0100 |
commit | 769f5d8c96170b55f47563009f9422f75b029f1a (patch) | |
tree | 3c943578260990aded8835b71cb943df78ddb820 | |
parent | 69efba3efcd63385153ef8658b5f3e41b67756d8 (diff) | |
download | efl-769f5d8c96170b55f47563009f9422f75b029f1a.tar.gz |
elm_code: Fix crash when tabbing in a small widget
avoid placing cursor outside of our column width
-rw-r--r-- | legacy/elm_code/src/lib/widget/elm_code_widget.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/legacy/elm_code/src/lib/widget/elm_code_widget.c b/legacy/elm_code/src/lib/widget/elm_code_widget.c index da6987e128..62b7f6c2b0 100644 --- a/legacy/elm_code/src/lib/widget/elm_code_widget.c +++ b/legacy/elm_code/src/lib/widget/elm_code_widget.c @@ -1063,6 +1063,8 @@ _elm_code_widget_text_at_cursor_insert(Elm_Code_Widget *widget, const char *text col_width = elm_code_widget_line_text_column_width_to_position(widget, line, position + length) - elm_code_widget_line_text_column_width_to_position(widget, line, position); + // a workaround for when the cursor position would be off the line width + _elm_code_widget_resize(widget, line); elm_obj_code_widget_cursor_position_set(widget, col + col_width, row); eo_event_callback_call(widget, ELM_CODE_WIDGET_EVENT_CHANGED_USER, NULL); |