~ubuntu-branches/ubuntu/oneiric/irssi/oneiric

« back to all changes in this revision

Viewing changes to src/fe-text/textbuffer.c

  • Committer: Bazaar Package Importer
  • Author(s): Emilio Pozuelo Monfort
  • Date: 2007-11-02 18:13:28 UTC
  • mfrom: (1.1.2 upstream)
  • Revision ID: james.westby@ubuntu.com-20071102181328-vg4v2tuqeviu16g9
Tags: 0.8.12-2ubuntu1
* Merge with Debian, remaining Ubuntu changes:
  - Added debian/patches/90irc-ubuntu-com.dpatch (Launchpad #52690).
  - Modify Maintainer value to match the DebianMaintainerField spec.
  - debian/irssi.prerm: Do not alternative. LP: #67698.

Show diffs side-by-side

added added

removed removed

Lines of Context:
13
13
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
14
14
    GNU General Public License for more details.
15
15
 
16
 
    You should have received a copy of the GNU General Public License
17
 
    along with this program; if not, write to the Free Software
18
 
    Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
 
16
    You should have received a copy of the GNU General Public License along
 
17
    with this program; if not, write to the Free Software Foundation, Inc.,
 
18
    51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
19
19
*/
20
20
 
21
21
#define G_LOG_DOMAIN "TextBuffer"
480
480
        line = startline != NULL ? startline : buffer->first_line;
481
481
 
482
482
        for (; line != NULL; line = line->next) {
483
 
                if ((line->info.level & level) == 0 ||
484
 
                    (line->info.level & nolevel) != 0)
485
 
                        continue;
486
 
 
487
 
                if (*text == '\0') {
488
 
                        /* no search word, everything matches */
489
 
                        textbuffer_line_ref(line);
490
 
                        matches = g_list_append(matches, line);
491
 
                        continue;
492
 
                }
493
 
 
494
 
                textbuffer_line2text(line, FALSE, str);
495
 
 
496
 
                line_matched =
 
483
                line_matched = (line->info.level & level) != 0 &&
 
484
                        (line->info.level & nolevel) == 0;
 
485
 
 
486
                if (*text != '\0') {
 
487
                        textbuffer_line2text(line, FALSE, str);
 
488
 
 
489
                        if (line_matched)
 
490
                        line_matched =
497
491
#ifdef HAVE_REGEX_H
498
492
                        regexp ? regexec(&preg, str->str, 0, NULL, 0) == 0 :
499
493
#endif
500
494
                        fullword ? strstr_full_case(str->str, text, !case_sensitive) != NULL :
501
495
                        case_sensitive ? strstr(str->str, text) != NULL :
502
496
                        stristr(str->str, text) != NULL;
 
497
                }
 
498
 
503
499
                if (line_matched) {
504
500
                        /* add the -before lines */
505
501
                        pre_line = line;