mirror of
https://github.com/MidnightCommander/mc
synced 2025-03-30 11:42:54 +03:00
Ticket #2294: mcview: incorrect starting offset for 'search again'
When you press F7 in mcview to repeat the previous search, it starts again from the file offset that is 3 bytes after the beginning of the current match. This introduces weird and clearly buggy symptoms. Couple of examples: If the file contains xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx and you search for a single x character, and you keep on pressing F7, every third character gets highlighted. Signed-off-by: Slava Zanko <slavazanko@gmail.com>
This commit is contained in:
parent
906f688742
commit
ff2132b0a8
@ -228,7 +228,7 @@ mcview_do_search (mcview_t * view)
|
||||
|
||||
if (view->search_start)
|
||||
{
|
||||
search_start = (mcview_search_options.backwards) ? -2 : 2;
|
||||
search_start = (mcview_search_options.backwards) ? -2 : 0;
|
||||
search_start = view->search_start + search_start +
|
||||
mcview__get_nroff_real_len (view, view->search_start, 2) * search_start;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user