chiark
/
gitweb
/
~mdw
/
tig
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
8b534a1
)
Hardwire ERR to mean REQ_NONE in the main loop
author
Jonas Fonseca
<fonseca@diku.dk>
Thu, 28 Sep 2006 11:54:35 +0000
(13:54 +0200)
committer
Jonas Fonseca
<fonseca@antimatter.localdomain>
Thu, 28 Sep 2006 11:54:35 +0000
(13:54 +0200)
tig.c
patch
|
blob
|
blame
|
history
diff --git
a/tig.c
b/tig.c
index 6c2b7d08f8b460a286cc717363b4fb180ed03e02..8ccce74d9879efee58f2aca3c6dcd3fbafcffa96 100644
(file)
--- a/
tig.c
+++ b/
tig.c
@@
-730,9
+730,6
@@
static struct keybinding default_keybindings[] = {
{ 'g', REQ_TOGGLE_REV_GRAPH },
{ ':', REQ_PROMPT },
{ 'g', REQ_TOGGLE_REV_GRAPH },
{ ':', REQ_PROMPT },
- /* wgetch() with nodelay() enabled returns ERR when there's no input. */
- { ERR, REQ_NONE },
-
/* Using the ncurses SIGWINCH handler. */
{ KEY_RESIZE, REQ_SCREEN_RESIZE },
};
/* Using the ncurses SIGWINCH handler. */
{ KEY_RESIZE, REQ_SCREEN_RESIZE },
};
@@
-3531,8
+3528,13
@@
main(int argc, char *argv[])
/* Refresh, accept single keystroke of input */
key = wgetch(status_win);
/* Refresh, accept single keystroke of input */
key = wgetch(status_win);
- if (key == ERR)
+
+ /* wgetch() with nodelay() enabled returns ERR when there's no
+ * input. */
+ if (key == ERR) {
+ request = REQ_NONE;
continue;
continue;
+ }
request = get_keybinding(display[current_view]->keymap, key);
request = get_keybinding(display[current_view]->keymap, key);