elm_code: Selections of word break on quotes too

This commit is contained in:
Andy Williams 2017-01-10 12:53:21 +00:00
parent 30445b6ea6
commit 6d4f1501bf
2 changed files with 7 additions and 1 deletions

View File

@ -6,7 +6,7 @@
#include "elm_code_widget_private.h"
static char _breaking_chars[] = " \t,.?!;:*&()[]{}";
static char _breaking_chars[] = " \t,.?!;:*&()[]{}'\"";
static Elm_Code_Widget_Selection_Data *
_elm_code_widget_selection_new()

View File

@ -524,6 +524,7 @@ START_TEST (elm_code_test_widget_selection_select_word)
file = elm_code_file_new(code);
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, "word \"symbols\" test", 19, NULL);
win = elm_win_add(NULL, "entry", ELM_WIN_BASIC);
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);
ck_assert_str_eq("stuff", 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();
}
END_TEST