summaryrefslogtreecommitdiffstats
path: root/regex.c
diff options
context:
space:
mode:
authorKaz Kylheku <kaz@kylheku.com>2015-09-14 06:33:19 -0700
committerKaz Kylheku <kaz@kylheku.com>2015-09-14 06:33:19 -0700
commit59c77ff3bda8e9b44b67a31ffc4f883e74e7e844 (patch)
tree2b5085036b5e2d8482ee27f5d9171eba5372412b /regex.c
parent56633b2640b1f58950d1e6781a2fb859d6a1d687 (diff)
downloadtxr-59c77ff3bda8e9b44b67a31ffc4f883e74e7e844.tar.gz
txr-59c77ff3bda8e9b44b67a31ffc4f883e74e7e844.tar.bz2
txr-59c77ff3bda8e9b44b67a31ffc4f883e74e7e844.zip
linenoise: handle SIGWINCH resize signal.
* linenoise/linenoise.c (struct lino_state): New member, need_resize. (lino_list_busy): New static variable. (handle_resize): New function. (complete_line, history_search, edit): Check for the tty read being interrupted, and in that case call handle_resize to put the resize into effect, and continue the loop to fetch another character. (sigwich_handler): New function. (linenoise): If we have SIGWINCH, install a handler for it temporarily. (link_into_list, unlink_from_list): Set global busy flag around list manipulations. The signal handler stays away if these are set. This means that if the user performs some action that requires a lino_t to be constructed (e.g. types Ctrl-R to search), while resizing the window at almost exactly the same time, we will lose the resize signal. Oh well!
Diffstat (limited to 'regex.c')
0 files changed, 0 insertions, 0 deletions