-
Notifications
You must be signed in to change notification settings - Fork 626
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
vim.tigrc: G move-last-line does not work in main view #594
Comments
Add |
Thanks. @jonas Do you mind adding this by default to |
@kiryph The current behaviour is a bug. Do you want to make a PR? |
@jonas Thanks for you response. I am not sure if you refer to tig itself or the vim.tigrc configuration file. I would assume if I If you mean that this is unintentional and should be fixed in something like https://github.com/jonas/tig/blob/master/src/keys.c#L155-L183, I am afraid I would have to understand your source code to create a PR without screwing something up. Naively, I would expect something like this ❯ git diff
diff --git a/src/keys.c b/src/keys.c
index e405320..594227d 100644
--- a/src/keys.c
+++ b/src/keys.c
@@ -177,6 +177,8 @@ get_keybinding(const struct keymap *keymap, const struct key key[], size_t keys,
(*matches) += generic_matches;
if (request == REQ_UNKNOWN)
request = generic_request;
+ if (request == REQ_NONE && generic_matches == 1)
+ request = generic_request;
}
return request == REQ_NONE ? REQ_UNKNOWN : request; |
I think it should be fixed in the vim.tigrc file. Your proposed fix will break the ability to unassigned a generic keybinding in a specific keymap. This was one of the motivations for introducing |
I have configured tig to use to the vim bindings defined in
contrib/vim.tigrc
in~/tigrc
:Why does it not work in the main view but in the diff view?
The text was updated successfully, but these errors were encountered: