edit/editcmd.c: fix backward search by one symbol.

This commit is contained in:
Slava Zanko 2009-05-25 17:36:40 +03:00
parent 13b12fdd5b
commit 89bdeb7e34

View File

@ -1126,7 +1126,7 @@ editcmd_find (WEdit *edit, gsize *len)
gsize search_end;
if (edit->replace_backwards) {
search_end = edit->curs1;
search_end = edit->curs1-1;
while ((int) search_start >= 0) {
if (search_end - search_start > edit->search->original_len && mc_search_is_fixed_search_str(edit->search))
search_end = search_start + edit->search->original_len +1;
@ -1136,6 +1136,7 @@ editcmd_find (WEdit *edit, gsize *len)
}
search_start--;
}
edit->search->error_str = g_strdup(_(" Search string not found "));
} else {
return mc_search_run(edit->search, (void *) edit, edit->search_start, edit->last_byte, len);
}