summaryrefslogtreecommitdiff
path: root/src/fe-text
diff options
context:
space:
mode:
authorWouter Coekaerts <coekie@irssi.org>2007-08-22 19:31:47 +0000
committercoekie <coekie@dbcabf3a-b0e7-0310-adc4-f8d773084564>2007-08-22 19:31:47 +0000
commitf5793daed59cb3e3046c685383b207761c1c2e6b (patch)
tree112fbc6c8fb668e98723fbe70d5668e0792cca0a /src/fe-text
parent48e1fc203c939fd62e54278d1c8447458ced13de (diff)
downloadirssi-f5793daed59cb3e3046c685383b207761c1c2e6b.zip
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
Diffstat (limited to 'src/fe-text')
-rw-r--r--src/fe-text/textbuffer.c18
1 files changed, 6 insertions, 12 deletions
diff --git a/src/fe-text/textbuffer.c b/src/fe-text/textbuffer.c
index 76f07ac8..ff5fe2f5 100644
--- a/src/fe-text/textbuffer.c
+++ b/src/fe-text/textbuffer.c
@@ -483,25 +483,19 @@ GList *textbuffer_find_text(TEXT_BUFFER_REC *buffer, LINE_REC *startline,
line_matched = (line->info.level & level) != 0 &&
(line->info.level & nolevel) == 0;
- if (*text == '\0') {
- /* no search word, everything matches */
- if (line_matched) {
- textbuffer_line_ref(line);
- matches = g_list_append(matches, line);
- }
- continue;
- }
+ if (*text != '\0') {
+ textbuffer_line2text(line, FALSE, str);
- textbuffer_line2text(line, FALSE, str);
-
- if (line_matched)
- line_matched =
+ if (line_matched)
+ line_matched =
#ifdef HAVE_REGEX_H
regexp ? regexec(&preg, str->str, 0, NULL, 0) == 0 :
#endif
fullword ? strstr_full_case(str->str, text, !case_sensitive) != NULL :
case_sensitive ? strstr(str->str, text) != NULL :
stristr(str->str, text) != NULL;
+ }
+
if (line_matched) {
/* add the -before lines */
pre_line = line;