diff options
author | Tillmann Karras <tilkax@gmail.com> | 2013-11-26 20:22:45 +0100 |
---|---|---|
committer | Tillmann Karras <tilkax@gmail.com> | 2013-11-26 20:22:45 +0100 |
commit | 3293fc2cdfa2ed14c674e672a7dd47b001903e07 (patch) | |
tree | b177d4544ebc41e4398d7dd15966d4944f130a1e | |
parent | c370c05a0da7bc5156b94b098dd806f022e0b818 (diff) |
Don't use partial matching
I mixed it up with match vs. match_full
-rw-r--r-- | src/ui_util.c | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/src/ui_util.c b/src/ui_util.c index a1694be..e926d0d 100644 --- a/src/ui_util.c +++ b/src/ui_util.c @@ -1178,8 +1178,8 @@ static void ui_listing_search(ui_listing_t *ul, guint64 key) { return; } char *pattern = ui_textinput_get(ul->query); - GRegex *regex = g_regex_new(pattern, G_REGEX_CASELESS | G_REGEX_OPTIMIZE, G_REGEX_MATCH_PARTIAL_HARD, NULL); - if (!regex) + GRegex *regex = g_regex_new(pattern, G_REGEX_CASELESS | G_REGEX_OPTIMIZE, 0, NULL); + if(!regex) return; GSequenceIter *pos = g_sequence_get_begin_iter(ul->list); while(!g_sequence_iter_is_end(pos)) { @@ -1190,9 +1190,8 @@ static void ui_listing_search(ui_listing_t *ul, guint64 key) { } g_regex_unref(regex); g_free(pattern); - if(!g_sequence_iter_is_end(pos)) { + if(!g_sequence_iter_is_end(pos)) ul->sel = pos; - } } @@ -1204,7 +1203,7 @@ gboolean ui_listing_key(ui_listing_t *ul, guint64 key, int page) { switch(key) { case INPT_CHAR('/'): - if (ul->to_string) + if(ul->to_string) ul->query = ui_textinput_create(FALSE, NULL); break; case INPT_KEY(KEY_NPAGE): { // page down |