commit - 244157854d2ab9af6728127cdda70af4c5b83444
commit + fa502711bbf1a59b3e27e7fb6adc03b16a15892a
blob - ed0412fd13daaa1ea18139730716db483ba49274
blob + 18d37fe0f1b21d153863f1bcf024ecca990a307a
--- tog/tog.1
+++ tog/tog.1
Some command-specific key bindings may be prefixed with an integer, which is
denoted by N in the descriptions below, and is used as a modifier to the
operation as indicated.
-When the first integer for a count modifier is entered,
.Nm
-will wait 500 milliseconds for each successive integer or the compound sequence
-to complete.
-If this sequence should timeout or does not conclude with a valid key binding,
-the command is aborted and any preceding count is reset.
+will echo digits to the screen when count modifiers are entered, and complete
+the sequence upon input of the first non-numeric character.
+Count modifiers can be aborted by entering an unmapped key.
The global key bindings are:
.Bl -tag -width Ds
.It Cm Q
blob - 592da37bd19ed04539b7178e2b0ba0af627db8b7
blob + d22799a47ef9bd147f72ae35dbe392bcadb72680
--- tog/tog.c
+++ tog/tog.c
}
/*
- * Compute view->count from numeric user input. User has five-tenths of a
- * second to follow each numeric keypress with another number to form count.
- * Return first non-numeric input or ERR and assign total to view->count.
- * XXX Should we add support for user-defined timeout?
+ * Compute view->count from numeric input. Assign total to view->count and
+ * return first non-numeric key entered.
*/
static int
get_compound_key(struct tog_view *view, int c)
v = view->parent;
view->count = 0;
- halfdelay(5); /* block for half a second */
- wattron(v->window, A_BOLD);
+ cbreak(); /* block for input */
wmove(v->window, v->nlines - 1, 0);
wclrtoeol(v->window);
waddch(v->window, ':');
/* Massage excessive or inapplicable values at the input handler. */
view->count = n;
- wattroff(v->window, A_BOLD);
- cbreak(); /* return to blocking */
return c;
}