forked from enlightenment/efl
elm_code: Selections of word break on quotes too
This commit is contained in:
parent
30445b6ea6
commit
6d4f1501bf
|
@ -6,7 +6,7 @@
|
||||||
|
|
||||||
#include "elm_code_widget_private.h"
|
#include "elm_code_widget_private.h"
|
||||||
|
|
||||||
static char _breaking_chars[] = " \t,.?!;:*&()[]{}";
|
static char _breaking_chars[] = " \t,.?!;:*&()[]{}'\"";
|
||||||
|
|
||||||
static Elm_Code_Widget_Selection_Data *
|
static Elm_Code_Widget_Selection_Data *
|
||||||
_elm_code_widget_selection_new()
|
_elm_code_widget_selection_new()
|
||||||
|
|
|
@ -524,6 +524,7 @@ START_TEST (elm_code_test_widget_selection_select_word)
|
||||||
file = elm_code_file_new(code);
|
file = elm_code_file_new(code);
|
||||||
elm_code_file_line_append(file, "word selection test", 19, NULL);
|
elm_code_file_line_append(file, "word selection test", 19, NULL);
|
||||||
elm_code_file_line_append(file, "more stuff\tto test", 18, NULL);
|
elm_code_file_line_append(file, "more stuff\tto test", 18, NULL);
|
||||||
|
elm_code_file_line_append(file, "word \"symbols\" test", 19, NULL);
|
||||||
|
|
||||||
win = elm_win_add(NULL, "entry", ELM_WIN_BASIC);
|
win = elm_win_add(NULL, "entry", ELM_WIN_BASIC);
|
||||||
widget = elm_code_widget_add(win, code);
|
widget = elm_code_widget_add(win, code);
|
||||||
|
@ -542,6 +543,11 @@ START_TEST (elm_code_test_widget_selection_select_word)
|
||||||
selection = elm_code_widget_selection_text_get(widget);
|
selection = elm_code_widget_selection_text_get(widget);
|
||||||
ck_assert_str_eq("stuff", selection);
|
ck_assert_str_eq("stuff", selection);
|
||||||
free(selection);
|
free(selection);
|
||||||
|
|
||||||
|
elm_code_widget_selection_select_word(widget, 3, 9);
|
||||||
|
selection = elm_code_widget_selection_text_get(widget);
|
||||||
|
ck_assert_str_eq("symbols", selection);
|
||||||
|
free(selection);
|
||||||
elm_shutdown();
|
elm_shutdown();
|
||||||
}
|
}
|
||||||
END_TEST
|
END_TEST
|
||||||
|
|
Loading…
Reference in New Issue