mirror of
https://github.com/irssi/irssi.git
synced 2024-12-04 14:46:39 -05:00
Make /LASTLOG -after/-before work without text to match
git-svn-id: http://svn.irssi.org/repos/irssi/trunk@4601 dbcabf3a-b0e7-0310-adc4-f8d773084564
This commit is contained in:
parent
48e1fc203c
commit
f5793daed5
@ -483,25 +483,19 @@ GList *textbuffer_find_text(TEXT_BUFFER_REC *buffer, LINE_REC *startline,
|
|||||||
line_matched = (line->info.level & level) != 0 &&
|
line_matched = (line->info.level & level) != 0 &&
|
||||||
(line->info.level & nolevel) == 0;
|
(line->info.level & nolevel) == 0;
|
||||||
|
|
||||||
if (*text == '\0') {
|
if (*text != '\0') {
|
||||||
/* no search word, everything matches */
|
textbuffer_line2text(line, FALSE, str);
|
||||||
if (line_matched) {
|
|
||||||
textbuffer_line_ref(line);
|
|
||||||
matches = g_list_append(matches, line);
|
|
||||||
}
|
|
||||||
continue;
|
|
||||||
}
|
|
||||||
|
|
||||||
textbuffer_line2text(line, FALSE, str);
|
if (line_matched)
|
||||||
|
line_matched =
|
||||||
if (line_matched)
|
|
||||||
line_matched =
|
|
||||||
#ifdef HAVE_REGEX_H
|
#ifdef HAVE_REGEX_H
|
||||||
regexp ? regexec(&preg, str->str, 0, NULL, 0) == 0 :
|
regexp ? regexec(&preg, str->str, 0, NULL, 0) == 0 :
|
||||||
#endif
|
#endif
|
||||||
fullword ? strstr_full_case(str->str, text, !case_sensitive) != NULL :
|
fullword ? strstr_full_case(str->str, text, !case_sensitive) != NULL :
|
||||||
case_sensitive ? strstr(str->str, text) != NULL :
|
case_sensitive ? strstr(str->str, text) != NULL :
|
||||||
stristr(str->str, text) != NULL;
|
stristr(str->str, text) != NULL;
|
||||||
|
}
|
||||||
|
|
||||||
if (line_matched) {
|
if (line_matched) {
|
||||||
/* add the -before lines */
|
/* add the -before lines */
|
||||||
pre_line = line;
|
pre_line = line;
|
||||||
|
Loading…
Reference in New Issue
Block a user