diff options
author | Kaz Kylheku <kaz@kylheku.com> | 2018-11-01 06:26:40 -0700 |
---|---|---|
committer | Kaz Kylheku <kaz@kylheku.com> | 2018-11-01 06:26:40 -0700 |
commit | 0aa0c547cd586ad2871bbb9487dcde0ac5bf273b (patch) | |
tree | a7bb5036c2ccac70e96a038a880741db5f46925c /eval.c | |
parent | dd0546bbc205601423d5281133c73f83196d1aaa (diff) | |
download | txr-0aa0c547cd586ad2871bbb9487dcde0ac5bf273b.tar.gz txr-0aa0c547cd586ad2871bbb9487dcde0ac5bf273b.tar.bz2 txr-0aa0c547cd586ad2871bbb9487dcde0ac5bf273b.zip |
linenoise: improve efficiency of warning flash.
* linenoise/linenoise.c (usec_delay): return a Boolean
indicator whether the delay was prematurely canceled by input.
(flash): Use the return value of usec_delay to bail out of the
loop early, canceling the flashing. Instead of doing full
line refreshes to display and hide the exclamation mark,
perform the flash by simply printing the exclamation mark at
the current location and then erasing it with
backspace-space-backspace.
Diffstat (limited to 'eval.c')
0 files changed, 0 insertions, 0 deletions