commit 007ea3163e808d98030269b64e37e8181deb372053bbc0ee50141b976b4d403b from: Mark Jamsek date: Mon Jan 6 01:31:33 2025 UTC tog: don't apply count modifier to the H, &, p keymaps It's annoying to have the help (H) and limit (&) keymaps repeatedly fire after closing their respective views if accidentally preceded by a count modifier, and doesn't seem like a valid use case. Similarly, writing N patch files to /tmp is wasteful. ok stsp@ commit - f54645a294a325bc9160002b6a07bc409e77efa86e75c13855835bae3d1eaf01 commit + 007ea3163e808d98030269b64e37e8181deb372053bbc0ee50141b976b4d403b blob - 2c00a816a58b4dd0b7ca6f36906c047cec0baa8fa895306192ef5b3b57db2a9e blob + 9f1cf3cf1186f291e0fff5e5ebe6117edef0954ab1af4965c9bcf943757f23eb --- tog/tog.c +++ tog/tog.c @@ -1868,6 +1868,7 @@ view_input(struct tog_view **new, int *done, struct to case '?': case 'H': case KEY_F(1): + view->count = 0; if (view->type == TOG_VIEW_HELP) err = view->reset(view); else @@ -4899,6 +4900,7 @@ input_log_view(struct tog_view **new_view, struct tog_ switch (ch) { case '&': + view->count = 0; err = limit_log_view(view); break; case 'q': @@ -7390,6 +7392,7 @@ input_diff_view(struct tog_view **new_view, struct tog err = create_diff(s); break; case 'p': + view->count = 0; err = diff_write_patch(view); break; default: