From 0014d0b99e243d9c7979e87bb7e1c0a09d3205e5 Mon Sep 17 00:00:00 2001 From: Andy Williams Date: Tue, 27 Dec 2016 22:17:01 +0000 Subject: [PATCH] elm_code: Fix another public API using the wrong order --- src/lib/elementary/elm_code_widget.c | 4 ++-- src/lib/elementary/elm_code_widget.eo | 4 ++-- src/lib/elementary/elm_code_widget_selection.c | 4 ++-- src/lib/elementary/elm_code_widget_text.c | 14 +++++++------- 4 files changed, 13 insertions(+), 13 deletions(-) diff --git a/src/lib/elementary/elm_code_widget.c b/src/lib/elementary/elm_code_widget.c index a98a329fc7..c9baaddd8a 100644 --- a/src/lib/elementary/elm_code_widget.c +++ b/src/lib/elementary/elm_code_widget.c @@ -1459,7 +1459,7 @@ _elm_code_widget_backspace(Elm_Code_Widget *widget) elm_code_widget_line_text_position_for_column_get(widget, line, col - 1)); char_width = position - elm_code_widget_line_text_position_for_column_get(widget, line, start_col); - text = elm_code_widget_text_between_positions_get(widget, start_col, row, end_col, row); + text = elm_code_widget_text_between_positions_get(widget, row, start_col, row, end_col); elm_code_line_text_remove(line, position - char_width, char_width); elm_obj_code_widget_cursor_position_set(widget, row, start_col); @@ -1501,7 +1501,7 @@ _elm_code_widget_delete(Elm_Code_Widget *widget) start_col = elm_code_widget_line_text_column_width_to_position(widget, line, position); end_col = elm_code_widget_line_text_column_width_to_position(widget, line, position + char_width); - text = elm_code_widget_text_between_positions_get(widget, start_col, row, end_col, row); + text = elm_code_widget_text_between_positions_get(widget, row, start_col, row, end_col); elm_code_line_text_remove(line, position, char_width); elm_obj_code_widget_cursor_position_set(widget, row, start_col); efl_event_callback_legacy_call(widget, ELM_OBJ_CODE_WIDGET_EVENT_CHANGED_USER, NULL); diff --git a/src/lib/elementary/elm_code_widget.eo b/src/lib/elementary/elm_code_widget.eo index 5bb5b92a9f..7539ca730d 100644 --- a/src/lib/elementary/elm_code_widget.eo +++ b/src/lib/elementary/elm_code_widget.eo @@ -223,10 +223,10 @@ class Elm.Code_Widget (Elm.Layout, Elm.Interface.Atspi.Text) text_between_positions_get { [[Get text between given positions]] params { - start_col: uint; [[The widget column of the first character to get]] start_line: uint; [[The line of the first character to get]] - end_col: uint; [[The widget column of the last character to get]] + start_col: uint; [[The widget column of the first character to get]] end_line: uint; [[The line of the last character to get]] + end_col: uint; [[The widget column of the last character to get]] } return: ptr(char); [[The text content between start and end positions]] } diff --git a/src/lib/elementary/elm_code_widget_selection.c b/src/lib/elementary/elm_code_widget_selection.c index 74325e84a8..f9b75a7a16 100644 --- a/src/lib/elementary/elm_code_widget_selection.c +++ b/src/lib/elementary/elm_code_widget_selection.c @@ -337,8 +337,8 @@ elm_code_widget_selection_text_get(Evas_Object *widget) selection = elm_code_widget_selection_normalized_get(widget); text = elm_code_widget_text_between_positions_get(widget, - selection->start_col, selection->start_line, - selection->end_col, selection->end_line); + selection->start_line, selection->start_col, + selection->end_line, selection->end_col); free(selection); return text; diff --git a/src/lib/elementary/elm_code_widget_text.c b/src/lib/elementary/elm_code_widget_text.c index 974ff52cc7..23faca44ec 100644 --- a/src/lib/elementary/elm_code_widget_text.c +++ b/src/lib/elementary/elm_code_widget_text.c @@ -36,8 +36,8 @@ _elm_code_widget_text_left_gutter_width_get(Eo *obj, Elm_Code_Widget_Data *pd) static char * _elm_code_widget_text_multi_get(Elm_Code_Widget *widget, Elm_Code_Widget_Data *pd, - unsigned int start_col, unsigned int start_line, - unsigned int end_col, unsigned int end_line) + unsigned int start_line, unsigned int start_col, + unsigned int end_line, unsigned int end_col) { Elm_Code_Line *line; char *first, *last, *ret, *ptr; @@ -89,7 +89,7 @@ _elm_code_widget_text_multi_get(Elm_Code_Widget *widget, Elm_Code_Widget_Data *p static char * _elm_code_widget_text_single_get(Elm_Code_Widget *widget, Elm_Code_Widget_Data *pd, - unsigned int start_col, unsigned int start_line, + unsigned int start_line, unsigned int start_col, unsigned int end_col) { Elm_Code_Line *line; @@ -104,13 +104,13 @@ _elm_code_widget_text_single_get(Elm_Code_Widget *widget, Elm_Code_Widget_Data * static char * _elm_code_widget_text_between_positions_get(Eo *widget, Elm_Code_Widget_Data *pd, - unsigned int start_col, unsigned int start_line, - unsigned int end_col, unsigned int end_line) + unsigned int start_line, unsigned int start_col, + unsigned int end_line, unsigned int end_col) { if (start_line == end_line) - return _elm_code_widget_text_single_get(widget, pd, start_col, start_line, end_col); + return _elm_code_widget_text_single_get(widget, pd, start_line, start_col, end_col); else - return _elm_code_widget_text_multi_get(widget, pd, start_col, start_line, end_col, end_line); + return _elm_code_widget_text_multi_get(widget, pd, start_line, start_col, end_line, end_col); } static unsigned int