diff options
-rw-r--r-- | pw.1 | 3 | ||||
-rw-r--r-- | pw.c | 16 |
2 files changed, 12 insertions, 7 deletions
@@ -216,6 +216,9 @@ recall using the up and down arrow keys or .B Ctrl-P and .BR Ctrl-N . +While the trigger pattern is being edited, the current trigger remains +in effect. Editing a trigger pattern may be canceled with +.BR ESC . .IP \fB+\fP Increases the display size by one line. This doesn't come into effect @@ -844,13 +844,6 @@ int main(int argc, char **argv) } break; case kbd_trig: - if (trigpat) { - regfree(&trigex); - dsdrop(trigpat); - trigpat = 0; - } - stat &= ~(stat_htmode | stat_ttmode); - // fallthrough case kbd_colon: switch (ch) { case ESC: @@ -875,6 +868,15 @@ int main(int argc, char **argv) } } + if (kbd_state == kbd_trig) { + if (trigpat) { + regfree(&trigex); + dsdrop(trigpat); + trigpat = 0; + } + stat &= ~(stat_htmode | stat_ttmode); + } + if (kbd_state == kbd_colon && cmdbuf[1]) { execute(cmdbuf, &stat); if (cmdbuf[0] != 0) { |