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

From:
Omar Polo <op@omarpolo.com>
Subject:
Re: tog: make SPACE page down in all views
To:
Christian Weisgerber <naddy@mips.inka.de>
Cc:
gameoftrees@openbsd.org
Date:
Mon, 20 Jun 2022 16:44:05 +0200

Download raw body.

Thread
Christian Weisgerber <naddy@mips.inka.de> wrote:
> Currently, SPACE ' ' is handled inconsistenly across different views:
> 
> log:   open diff view, alias for ENTER
> diff:  page down
> blame: page down
> tree:  unused
> ref:   unused
> 
> I suggest to map SPACE to "page down" in all views.  That should
> be uncontroversial for tree and ref, but it is a change for log.
> Does anybody object?
> 
> OK?

yes please!  it's a bit incosistent the current state and it's easy to
get confused.

> diff refs/heads/main refs/heads/space
> blob - ccc38d4c5d675293f415ff2696edfd596fbb3220
> blob + a89f36bf163bbb820b19ad56b23223e7e6078bc1
> --- tog/tog.1
> +++ tog/tog.1
> @@ -114,7 +114,7 @@ Log message moves right on the screen.
>  Scroll log message field to the rightmost position.
>  .It Cm 0
>  Scroll log message field to the leftmost position.
> -.It Cm Page-down, Ctrl+f, f
> +.It Cm Page-down, Space, Ctrl+f, f
>  Move the selection cursor down one page.
>  .It Cm Page-up, Ctrl+b, b
>  Move the selection cursor up one page.
> @@ -130,7 +130,7 @@ This will traverse all commits on the current branch w
>  a long time depending on the number of commits in branch history.
>  If needed, this operation can be cancelled with
>  .Cm Backspace .
> -.It Cm Enter, Space
> +.It Cm Enter
>  Open a
>  .Cm diff
>  view showing file changes made in the currently selected commit.
> @@ -403,7 +403,7 @@ are as follows:
>  Move the selection cursor down.
>  .It Cm Up-arrow, k, Ctrl-p
>  Move the selection cursor up.
> -.It Cm Page-down, Ctrl+f, f
> +.It Cm Page-down, Space, Ctrl+f, f
>  Move the selection cursor down one page.
>  .It Cm Page-up, Ctrl+b, b
>  Move the selection cursor up one page.
> @@ -477,7 +477,7 @@ are as follows:
>  Move the selection cursor down.
>  .It Cm Up-arrow, k, Ctrl-p
>  Move the selection cursor up.
> -.It Cm Page-down, Ctrl+f, f
> +.It Cm Page-down, Space, Ctrl+f, f
>  Move the selection cursor down one page.
>  .It Cm Page-up, Ctrl+b, b
>  Move the selection cursor up one page.
> blob - d375738b1b19d5bba6c0e4fe547d3ddbf4bb8ec9
> blob + f141c7e0862d76f96091a91bd2f059a28e348c30
> --- tog/tog.c
> +++ tog/tog.c
> @@ -2679,7 +2679,8 @@ input_log_view(struct tog_view **new_view, struct tog_
>  		/* FALL THROUGH */
>  	case KEY_NPAGE:
>  	case CTRL('f'):
> -	case 'f': {
> +	case 'f':
> +	case ' ': {
>  		struct commit_queue_entry *first;
>  		first = s->first_displayed_entry;
>  		if (first == NULL)
> @@ -2711,7 +2712,6 @@ input_log_view(struct tog_view **new_view, struct tog_
>  		}
>  		break;
>  	case KEY_ENTER:
> -	case ' ':
>  	case '\r':
>  		if (s->selected_entry == NULL)
>  			break;
> @@ -5998,6 +5998,7 @@ input_tree_view(struct tog_view **new_view, struct tog
>  	case KEY_NPAGE:
>  	case CTRL('f'):
>  	case 'f':
> +	case ' ':
>  		if (got_tree_entry_get_next(s->tree, s->last_displayed_entry)
>  		    == NULL) {
>  			/* can't scroll any further; move cursor down */
> @@ -6870,6 +6871,7 @@ input_ref_view(struct tog_view **new_view, struct tog_
>  	case KEY_NPAGE:
>  	case CTRL('f'):
>  	case 'f':
> +	case ' ':
>  		if (TAILQ_NEXT(s->last_displayed_entry, entry) == NULL) {
>  			/* can't scroll any further; move cursor down */
>  			if (s->selected < s->ndisplayed - 1)