Ticket #4395: searchfix.diff

File searchfix.diff, 841 bytes (added by sxmboer2, 2 years ago)

patch to fix newlines being ignored in search engine

  • lib/search/regex.c

    diff --git a/lib/search/regex.c b/lib/search/regex.c
    index 32be35319..cabf2e486 100644
    a b mc_search__run_regex (mc_search_t * lc_mc_search, const void *user_data, 
    921921 
    922922                g_string_append_c (lc_mc_search->regex_buffer, (char) current_chr); 
    923923 
    924                 if ((char) current_chr == '\n' || virtual_pos > end_search) 
     924                if ((char) current_chr == '\0' || virtual_pos > end_search) 
    925925                    break; 
    926926            } 
    927927        } 
    mc_search__run_regex (mc_search_t * lc_mc_search, const void *user_data, 
    940940 
    941941                current_pos++; 
    942942 
    943                 if (current_chr == '\n' || current_pos > end_search) 
     943                if (current_chr == '\0' || current_pos > end_search) 
    944944                    break; 
    945945            } 
    946946