forked from enlightenment/efl
elm_code: Fix another public API using the wrong order
This commit is contained in:
parent
5cf5e4bb3c
commit
0014d0b99e
|
@ -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));
|
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);
|
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_code_line_text_remove(line, position - char_width, char_width);
|
||||||
elm_obj_code_widget_cursor_position_set(widget, row, start_col);
|
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);
|
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);
|
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_code_line_text_remove(line, position, char_width);
|
||||||
elm_obj_code_widget_cursor_position_set(widget, row, start_col);
|
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);
|
efl_event_callback_legacy_call(widget, ELM_OBJ_CODE_WIDGET_EVENT_CHANGED_USER, NULL);
|
||||||
|
|
|
@ -223,10 +223,10 @@ class Elm.Code_Widget (Elm.Layout, Elm.Interface.Atspi.Text)
|
||||||
text_between_positions_get {
|
text_between_positions_get {
|
||||||
[[Get text between given positions]]
|
[[Get text between given positions]]
|
||||||
params {
|
params {
|
||||||
start_col: uint; [[The widget column of the first character to get]]
|
|
||||||
start_line: uint; [[The line 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_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]]
|
return: ptr(char); [[The text content between start and end positions]]
|
||||||
}
|
}
|
||||||
|
|
|
@ -337,8 +337,8 @@ elm_code_widget_selection_text_get(Evas_Object *widget)
|
||||||
selection = elm_code_widget_selection_normalized_get(widget);
|
selection = elm_code_widget_selection_normalized_get(widget);
|
||||||
|
|
||||||
text = elm_code_widget_text_between_positions_get(widget,
|
text = elm_code_widget_text_between_positions_get(widget,
|
||||||
selection->start_col, selection->start_line,
|
selection->start_line, selection->start_col,
|
||||||
selection->end_col, selection->end_line);
|
selection->end_line, selection->end_col);
|
||||||
|
|
||||||
free(selection);
|
free(selection);
|
||||||
return text;
|
return text;
|
||||||
|
|
|
@ -36,8 +36,8 @@ _elm_code_widget_text_left_gutter_width_get(Eo *obj, Elm_Code_Widget_Data *pd)
|
||||||
|
|
||||||
static char *
|
static char *
|
||||||
_elm_code_widget_text_multi_get(Elm_Code_Widget *widget, Elm_Code_Widget_Data *pd,
|
_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 start_line, unsigned int start_col,
|
||||||
unsigned int end_col, unsigned int end_line)
|
unsigned int end_line, unsigned int end_col)
|
||||||
{
|
{
|
||||||
Elm_Code_Line *line;
|
Elm_Code_Line *line;
|
||||||
char *first, *last, *ret, *ptr;
|
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 *
|
static char *
|
||||||
_elm_code_widget_text_single_get(Elm_Code_Widget *widget, Elm_Code_Widget_Data *pd,
|
_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)
|
unsigned int end_col)
|
||||||
{
|
{
|
||||||
Elm_Code_Line *line;
|
Elm_Code_Line *line;
|
||||||
|
@ -104,13 +104,13 @@ _elm_code_widget_text_single_get(Elm_Code_Widget *widget, Elm_Code_Widget_Data *
|
||||||
|
|
||||||
static char *
|
static char *
|
||||||
_elm_code_widget_text_between_positions_get(Eo *widget, Elm_Code_Widget_Data *pd,
|
_elm_code_widget_text_between_positions_get(Eo *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, unsigned int end_line)
|
unsigned int end_line, unsigned int end_col)
|
||||||
{
|
{
|
||||||
if (start_line == end_line)
|
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
|
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
|
static unsigned int
|
||||||
|
|
Loading…
Reference in New Issue