diff -Naur mc-4.7.0-pre1~/edit/editcmd.c mc-4.7.0-pre1/edit/editcmd.c
old
|
new
|
|
1280 | 1280 | gsize search_end; |
1281 | 1281 | |
1282 | 1282 | if (edit->replace_backwards) { |
1283 | | search_end = edit->curs1-1; |
| 1283 | search_end = edit->last_byte; |
1284 | 1284 | while ((int) search_start >= 0) { |
1285 | | if (search_end - search_start > edit->search->original_len && mc_search_is_fixed_search_str(edit->search)) |
1286 | | search_end = search_start + edit->search->original_len +1; |
1287 | | if ( mc_search_run(edit->search, (void *) edit, search_start, search_end, len)) |
| 1285 | if (search_end > search_start + edit->search->original_len && mc_search_is_fixed_search_str(edit->search)) |
| 1286 | search_end = search_start + edit->search->original_len; |
| 1287 | if ( mc_search_run(edit->search, (void *) edit, search_start, search_end, len) |
| 1288 | && edit->search->normal_offset == search_start ) |
1288 | 1289 | { |
1289 | 1290 | return TRUE; |
1290 | 1291 | } |
diff -Naur mc-4.7.0-pre1~/src/view.c mc-4.7.0-pre1/src/view.c
old
|
new
|
|
3146 | 3146 | if (view->search_backwards) { |
3147 | 3147 | search_end = view_get_filesize (view); |
3148 | 3148 | while ((int) search_start >= 0) { |
3149 | | if (search_end - search_start > view->search->original_len && mc_search_is_fixed_search_str(view->search)) |
| 3149 | if (search_end > search_start + view->search->original_len && mc_search_is_fixed_search_str(view->search)) |
3150 | 3150 | search_end = search_start + view->search->original_len; |
3151 | 3151 | |
3152 | 3152 | view_read_start (view, &view->search_onechar_info, search_start); |
3153 | 3153 | |
3154 | | if ( mc_search_run(view->search, (void *) view, search_start, search_end, len)) |
| 3154 | if ( mc_search_run(view->search, (void *) view, search_start, search_end, len) |
| 3155 | && view->search->normal_offset == search_start ) |
3155 | 3156 | return TRUE; |
3156 | 3157 | |
3157 | 3158 | search_start--; |