Fix some smaller errors concerning regex searches in mcedit

This commit is contained in:
Patrick Winnertz 2009-01-23 20:01:15 +01:00
parent 1e2ed2f808
commit 88c320822a
1 changed files with 3 additions and 2 deletions

View File

@ -1453,7 +1453,8 @@ string_regexp_search (char *pattern, char *string, int match_type,
g_free (old_pattern);
old_pattern = 0;
}
if (regcomp (&r, pattern, REG_EXTENDED | (icase ? REG_ICASE : 0))) {
if (regcomp (&r, pattern, REG_EXTENDED | (icase ? REG_ICASE : 0) |
REG_NEWLINE)) {
*found_len = 0;
return -3;
}
@ -1553,7 +1554,7 @@ edit_find_string (long start, unsigned char *exp, int *len, long last_byte, edit
int found_start, match_bol, move_win = 0;
while (start + offset < last_byte) {
match_bol = (offset == 0 || (*get_byte) (data, start + offset - 1) == '\n');
match_bol = (start == 0 || (*get_byte) (data, start + offset - 1) == '\n');
if (!move_win) {
p = start + offset;
q = 0;