diff options
author | Lukas Fleischer <calcurse@cryptocrack.de> | 2011-10-04 00:13:09 +0000 |
---|---|---|
committer | Lukas Fleischer <calcurse@cryptocrack.de> | 2011-10-06 12:37:06 +0200 |
commit | 98651a549f6fc43d96207734fb0f02b240354a4c (patch) | |
tree | 1a89355f2f0ddf3aa543fe8c01b21d37a13cd664 /src/custom.c | |
parent | ba2aa5167b2157c99f3be4861c11717cd1b4cc6f (diff) | |
download | calcurse-98651a549f6fc43d96207734fb0f02b240354a4c.zip |
Add count buffer to keys_getch()
Key commands can be prefixed with a natural number - keys_getch() will
store this number in the buffer pointed to by the second parameter. Set
this parameter to NULL to disable count prefixes.
Signed-off-by: Lukas Fleischer <calcurse@cryptocrack.de>
Diffstat (limited to 'src/custom.c')
-rw-r--r-- | src/custom.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/custom.c b/src/custom.c index 50c2e82..90e28be 100644 --- a/src/custom.c +++ b/src/custom.c @@ -390,7 +390,7 @@ custom_load_conf (struct conf *conf) status_mesg (mesg_line1, mesg_line2); wnoutrefresh (win[STA].p); wins_doupdate (); - (void)keys_getch (win[STA].p); + (void)keys_getch (win[STA].p, NULL); } pthread_mutex_lock (&nbar.mutex); @@ -579,7 +579,7 @@ custom_layout_config (void) display_layout_config (&conf_win, mark, cursor); clear (); - while ((ch = keys_getch (win[STA].p)) != KEY_GENERIC_QUIT) + while ((ch = keys_getch (win[STA].p, NULL)) != KEY_GENERIC_QUIT) { need_reset = 0; switch (ch) @@ -663,7 +663,7 @@ custom_sidebar_config (void) keys_display_bindings_bar (win[STA].p, binding, 0, binding_size); wins_doupdate (); - while ((ch = keys_getch (win[STA].p)) != KEY_GENERIC_QUIT) + while ((ch = keys_getch (win[STA].p, NULL)) != KEY_GENERIC_QUIT) { switch (ch) { @@ -902,7 +902,7 @@ custom_color_config (void) display_color_config (&conf_win, &mark_fore, &mark_back, cursor, theme_changed); clear (); - while ((ch = keys_getch (win[STA].p)) != KEY_GENERIC_QUIT) + while ((ch = keys_getch (win[STA].p, NULL)) != KEY_GENERIC_QUIT) { need_reset = 0; theme_changed = 0; @@ -1379,7 +1379,7 @@ custom_keys_config (void) { int ch; - ch = keys_getch (win[STA].p); + ch = keys_getch (win[STA].p, NULL); switch (ch) { case KEY_MOVE_UP: |