summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: aa6d112)
raw | patch | inline | side by side (parent: aa6d112)
author | Jonas Fonseca <fonseca@diku.dk> | |
Thu, 22 Apr 2010 02:15:08 +0000 (22:15 -0400) | ||
committer | Jonas Fonseca <fonseca@diku.dk> | |
Thu, 22 Apr 2010 02:33:56 +0000 (22:33 -0400) |
By adding built-in run requests after loading config files and checking
if each of them conflicts with an existing keybinding.
Reported by Simon Ruderich.
if each of them conflicts with an existing keybinding.
Reported by Simon Ruderich.
NEWS | patch | blob | history | |
tig.c | patch | blob | history |
index 59d748947cdea0b7b5936c85c50ac04f4c5a19bb..d03fea86c5ababa7dfee109efe617bebde19f6ad 100644 (file)
--- a/NEWS
+++ b/NEWS
- Fix parsing of boolean show-date values.
- Fix relative date.
- Fix unbind to behave as if the keybinding was never defined.
+ - Fix unbind to also cover built-in run requests.
- Fix parsing of unknown keymap names.
tig-0.15
index 49ef43727a3925d409276907fe0241ecb7023261..7eb9f71b6827036fea61d811fedd0296d0a7dc28 100644 (file)
--- a/tig.c
+++ b/tig.c
int i;
for (i = 0; i < ARRAY_SIZE(reqs); i++) {
- enum request req;
+ enum request req = get_keybinding(reqs[i].keymap, reqs[i].key);
+ if (req != reqs[i].key)
+ continue;
req = add_run_request(reqs[i].keymap, reqs[i].key, reqs[i].argc, reqs[i].argv);
if (req != REQ_NONE)
add_keybinding(reqs[i].keymap, req, reqs[i].key);
const char *tigrc_system = getenv("TIGRC_SYSTEM");
char buf[SIZEOF_STR];
- add_builtin_run_requests();
-
if (!tigrc_system)
tigrc_system = SYSCONFDIR "/tigrc";
load_option_file(tigrc_system);
}
load_option_file(tigrc_user);
+ /* Add _after_ loading config files to avoid adding run requests
+ * that conflict with keybindings. */
+ add_builtin_run_requests();
+
return OK;
}