diff options
author | pgen <p.gen.progs@gmail.com> | 2018-03-10 18:18:21 +0100 |
---|---|---|
committer | pgen <p.gen.progs@gmail.com> | 2018-03-10 18:18:21 +0100 |
commit | beeaa82f60b20f4995dc2a1a4beb2f355b9dd207 (patch) | |
tree | b41fa0b9afb8f9e7bf76a0680f47affe39520e71 | |
parent | 970f7660a7ca8eb94fc2450648af4b57a3b4a805 (diff) |
Do not number empty words in column mode
-rw-r--r-- | smenu.c | 5 |
1 files changed, 3 insertions, 2 deletions
@@ -7652,8 +7652,9 @@ main(int argc, char * argv[]) char * tmp = xmalloc(strlen(word->str) + 4 + menu_index_data.length); int * word_pos = malloc(sizeof(int)); - if (!!regexec(&menu_pattern_re, word->str, (size_t)0, NULL, 0) - == (menu_index_data.expression == 'm' ? 0 : 1)) + if (!isempty(word->str) + && !!regexec(&menu_pattern_re, word->str, (size_t)0, NULL, 0) + == (menu_index_data.expression == 'm' ? 0 : 1)) { *word_pos = wi; |