Download raw body.
tog: clear search highlighting when reloading view
On Fri, Dec 24, 2021 at 02:21:21PM +0100, Christian Weisgerber wrote:
> Stefan Sperling:
>
> > Fair enough. I won't insist on using a new function. What is more
> > important is that tog's behaviour gets fixed somehow.
>
> Here's a diff to this purpose:
Yes, OK. Thank you!
> diff 46ea77db89a0945a013f032c6c6a94779126412f /home/naddy/got
> blob - 689aa4b67e0bcae980ac8b0f007f11c145528be1
> file + tog/tog.c
> --- tog/tog.c
> +++ tog/tog.c
> @@ -3699,6 +3699,7 @@ input_diff_view(struct tog_view **new_view, struct tog
> wclear(view->window);
> s->first_displayed_line = 1;
> s->last_displayed_line = view->nlines;
> + s->matched_line = 0;
> diff_view_indicate_progress(view);
> err = create_diff(s);
> break;
> @@ -3757,6 +3758,7 @@ input_diff_view(struct tog_view **new_view, struct tog
> case '[':
> if (s->diff_context > 0) {
> s->diff_context--;
> + s->matched_line = 0;
> diff_view_indicate_progress(view);
> err = create_diff(s);
> if (s->first_displayed_line + view->nlines - 1 >
> @@ -3769,6 +3771,7 @@ input_diff_view(struct tog_view **new_view, struct tog
> case ']':
> if (s->diff_context < GOT_DIFF_MAX_CONTEXT) {
> s->diff_context++;
> + s->matched_line = 0;
> diff_view_indicate_progress(view);
> err = create_diff(s);
> }
> @@ -3793,6 +3796,7 @@ input_diff_view(struct tog_view **new_view, struct tog
>
> s->first_displayed_line = 1;
> s->last_displayed_line = view->nlines;
> + s->matched_line = 0;
>
> diff_view_indicate_progress(view);
> err = create_diff(s);
> @@ -3817,6 +3821,7 @@ input_diff_view(struct tog_view **new_view, struct tog
>
> s->first_displayed_line = 1;
> s->last_displayed_line = view->nlines;
> + s->matched_line = 0;
>
> diff_view_indicate_progress(view);
> err = create_diff(s);
> @@ -4369,6 +4374,7 @@ run_blame(struct tog_view *view)
> s->last_displayed_line = view->nlines;
> s->selected_line = 1;
> }
> + s->matched_line = 0;
>
> done:
> if (blob)
> --
> Christian "naddy" Weisgerber naddy@mips.inka.de
>
>
tog: clear search highlighting when reloading view