From: Jonas Fonseca Date: Fri, 8 Sep 2006 17:04:55 +0000 (+0200) Subject: Replace screen-update action with noop action named "none" X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=1d754561072b1e73f82098cf0265159a7fce495e;p=tig.git Replace screen-update action with noop action named "none" Promote it as a way to unbind built-in default key bindings. --- diff --git a/tig.c b/tig.c index 7b8fc7d..089a567 100644 --- a/tig.c +++ b/tig.c @@ -283,8 +283,8 @@ sq_quote(char buf[SIZEOF_STR], size_t bufsize, const char *src) REQ_(SCROLL_PAGE_DOWN, "Scroll one page down"), \ \ REQ_GROUP("Misc") \ + REQ_(NONE, "Do nothing"), \ REQ_(PROMPT, "Bring up the prompt"), \ - REQ_(SCREEN_UPDATE, "Update the screen"), \ REQ_(SCREEN_REDRAW, "Redraw the screen"), \ REQ_(SCREEN_RESIZE, "Resize the screen"), \ REQ_(SHOW_VERSION, "Show version information"), \ @@ -691,9 +691,9 @@ static struct keybinding default_keybindings[] = { { ':', REQ_PROMPT }, /* wgetch() with nodelay() enabled returns ERR when there's no input. */ - { ERR, REQ_SCREEN_UPDATE }, + { ERR, REQ_NONE }, - /* Use the ncurses SIGWINCH handler. */ + /* Using the ncurses SIGWINCH handler. */ { KEY_RESIZE, REQ_SCREEN_RESIZE }, }; @@ -1956,7 +1956,7 @@ view_driver(struct view *view, enum request request) redraw_display(); break; - case REQ_SCREEN_UPDATE: + case REQ_NONE: doupdate(); return TRUE; @@ -3016,7 +3016,7 @@ main(int argc, char *argv[]) break; } - request = REQ_SCREEN_UPDATE; + request = REQ_NONE; break; } case REQ_SCREEN_RESIZE: diff --git a/tigrc.5.txt b/tigrc.5.txt index 3b4b7a2..354d46f 100644 --- a/tigrc.5.txt +++ b/tigrc.5.txt @@ -110,6 +110,8 @@ Examples: bind diff a previous bind diff d next bind diff b move-first-line + # 'unbind' the default quit key binding + bind main Q none -------------------------------------------------------------------------- Keys are mapped by first searching the keybindings for the current view, then @@ -205,8 +207,8 @@ ifdef::backend-xhtml11[] endif::backend-xhtml11[] Misc: ------------------------------------------------------------------------------ +none Do nothing prompt Bring up the prompt -screen-update Update the screen screen-redraw Redraw the screen screen-resize Resize the screen show-version Show version information