summaryrefslogtreecommitdiffstats
path: root/eval.c
diff options
context:
space:
mode:
authorKaz Kylheku <kaz@kylheku.com>2018-11-01 06:26:40 -0700
committerKaz Kylheku <kaz@kylheku.com>2018-11-01 06:26:40 -0700
commit0aa0c547cd586ad2871bbb9487dcde0ac5bf273b (patch)
treea7bb5036c2ccac70e96a038a880741db5f46925c /eval.c
parentdd0546bbc205601423d5281133c73f83196d1aaa (diff)
downloadtxr-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