On Tue, Jan 21, 2014 at 6:58 PM, Bernhard Reutner-Fischer
<rep.dot....@gmail.com> wrote:
> When looking at a file containing a word "foo", searching for foo
> highlights the word. Now search for "asddsa" (no match), we are supposed
> to clear the highlight of the previous foo, not key it off the validity
> of the regex.
> This makes the highlight disappear at least on the next redraw..
>
> Signed-off-by: Bernhard Reutner-Fischer <rep.dot....@gmail.com>
> ---
>  miscutils/less.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/miscutils/less.c b/miscutils/less.c
> index cd553f6..6e187e6 100644
> --- a/miscutils/less.c
> +++ b/miscutils/less.c
> @@ -822,7 +822,7 @@ static void buffer_print(void)
>
>         move_cursor(0, 0);
>         for (i = 0; i <= max_displayed_line; i++)
> -               if (pattern_valid)
> +               if (num_matches)
>                         print_found(buffer[i]);
>                 else
>                         print_ascii(buffer[i]);


I can not reproduce the bug: I follow your instructions
and everything works as expected:
highlights on all instances of "foo" disappeared
on the new redraw.
_______________________________________________
busybox mailing list
busybox@busybox.net
http://lists.busybox.net/mailman/listinfo/busybox

Reply via email to