"GOT", but the "O" is a cute, smiling pufferfish. Index | Thread | Search

From:
Omar Polo <op@omarpolo.com>
Subject:
Re: tog: echo input prompt to bottom left
To:
Mark Jamsek <mark@jamsek.com>
Cc:
Game of Trees <gameoftrees@openbsd.org>
Date:
Mon, 26 Dec 2022 15:34:54 +0100

Download raw body.

Thread
On 2022/12/27 00:28:35 +1100, Mark Jamsek <mark@jamsek.com> wrote:
> Related to the last but probably better as a separate commit: always
> echo to the bottom left if in the child view of a vsplit.
> 
> I think we discussed this briefly a while back and the decision was to
> echo to the bottom left irrespective of which view is active.
> 
> (This is on top of the previous but should apply cleanly either way.)

it took me a moment to notice what is (currently) wrong.  The issue is
that when you have a a vertical split (two window side-by-side) the
"/" prompt may be rendered on the rightmost window.

ok op@

> -----------------------------------------------
> commit 7c43102bbdee741112b9fff47ec23acb42d1a8fd (main)
> from: Mark Jamsek <mark@jamsek.dev>
> date: Mon Dec 26 13:26:04 2022 UTC
>  
>  tog: echo input prompt to the bottom left of screen
>  
>  Irrespective of the active view, always echo to the bottom of the parent.
>  
> diff a14f7b3f31efe5e42bdc59f5e67d0d20469a1c69 7c43102bbdee741112b9fff47ec23acb42d1a8fd
> commit - a14f7b3f31efe5e42bdc59f5e67d0d20469a1c69
> commit + 7c43102bbdee741112b9fff47ec23acb42d1a8fd
> blob - 3dbe897e48fdd71e921866059a833b96b7777482
> blob + 90aaa1e85a54a8310a42a9808b283bd3580d4bda
> --- tog/tog.c
> +++ tog/tog.c
> @@ -1304,6 +1304,8 @@ view_search_start(struct tog_view *view)
>  
>  	if (view_is_hsplit_top(view))
>  		v = view->child;
> +	else if (view->mode == TOG_VIEW_SPLIT_VERT && view->parent)
> +		v = view->parent;
>  
>  	mvwaddstr(v->window, v->nlines - 1, 0, "/");
>  	wclrtoeol(v->window);