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

From:
Mark Jamsek <mark@jamsek.com>
Subject:
tog: uppercase alpha keymaps that open new views
To:
gameoftrees@openbsd.org
Date:
Fri, 22 Jul 2022 23:54:08 +1000

Download raw body.

Thread
Briefly raised with stsp the other day: uppercase all the alpha key maps
that open new views. The blame view key to open a log view is already
'L'; this diff makes the following changes:

log view
  t := T
  r := R

tree view
  l := L
  r := R

ref view
  t := T

I think this is better than having most lower and one upper. We already
use 'l' to scroll right in some views, and hjkl are somewhat standard
movement keys, so I think it makes more sense to uppercase our keys for
opening new views.

diff /home/mark/src/git/got-current
commit - 598eac4331d322ab9e91ee6864c54845e3a6e86c
path + /home/mark/src/git/got-current
blob - f73c13e4ee7be77816a5e17af55d718bc8289519
file + tog/tog.1
--- tog/tog.1
+++ tog/tog.1
@@ -162,7 +162,7 @@ or
 Open a
 .Cm diff
 view showing file changes made in the currently selected commit.
-.It Cm t
+.It Cm T
 Open a
 .Cm tree
 view showing the tree for the currently selected commit.
@@ -207,7 +207,7 @@ view and toggle display of merged commits.
 The
 .Fl b
 option determines whether merged commits are displayed initially.
-.It Cm r
+.It Cm R
 Open a
 .Cm ref
 view listing all references in the repository.
@@ -487,11 +487,11 @@ Move the selection cursor to the last entry.
 Enter the currently selected directory, or switch to the
 .Cm blame
 view for the currently selected file.
-.It Cm l
+.It Cm L
 Open a
 .Cm log
 view for the currently selected tree entry.
-.It Cm r
+.It Cm R
 Open a
 .Cm ref
 view listing all references in the repository.
@@ -564,7 +564,7 @@ Open a
 .Cm log
 view which begins traversing history at the commit resolved via the
 currently selected reference.
-.It Cm t
+.It Cm T
 Open a
 .Cm tree
 view showing the tree resolved via the currently selected reference.
blob - 491d7334d3a574341848941ad1da39adb80cd6f7
file + tog/tog.c
--- tog/tog.c
+++ tog/tog.c
@@ -3367,7 +3367,7 @@ input_log_view(struct tog_view **new_view, struct tog_
 		} else
 			*new_view = diff_view;
 		break;
-	case 't':
+	case 'T':
 		view->count = 0;
 		if (s->selected_entry == NULL)
 			break;
@@ -3464,7 +3464,7 @@ input_log_view(struct tog_view **new_view, struct tog_
 		s->matched_entry = NULL;
 		s->search_entry = NULL;
 		break;
-	case 'r':
+	case 'R':
 		view->count = 0;
 		if (view_is_parent_view(view))
 			view_get_split(view, &begin_y, &begin_x);
@@ -6793,7 +6793,7 @@ input_tree_view(struct tog_view **new_view, struct tog
 		s->show_ids = !s->show_ids;
 		view->count = 0;
 		break;
-	case 'l':
+	case 'L':
 		view->count = 0;
 		if (!s->selected_entry)
 			break;
@@ -6822,7 +6822,7 @@ input_tree_view(struct tog_view **new_view, struct tog
 		} else
 			*new_view = log_view;
 		break;
-	case 'r':
+	case 'R':
 		view->count = 0;
 		if (view_is_parent_view(view))
 			view_get_split(view, &begin_y, &begin_x);
@@ -7790,7 +7790,7 @@ input_ref_view(struct tog_view **new_view, struct tog_
 		} else
 			*new_view = log_view;
 		break;
-	case 't':
+	case 'T':
 		view->count = 0;
 		if (!s->selected_entry)
 			break;

-- 
Mark Jamsek <fnc.bsdbox.org>
GPG: F2FF 13DE 6A06 C471 CA80  E6E2 2930 DC66 86EE CF68