aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThiago de Arruda <tpadilha84@gmail.com>2014-04-05 20:41:36 -0300
committerThiago de Arruda <tpadilha84@gmail.com>2014-04-06 11:43:23 -0300
commit3843fd3469062954c206a365d4b1d4bf78742a73 (patch)
treeb45ae5203694e41b313932de2fe7f4ba3223825e
parent0b826ef43e8ecb12bdf2ca4cd78ec193279cf6d4 (diff)
downloadrneovim-3843fd3469062954c206a365d4b1d4bf78742a73.tar.gz
rneovim-3843fd3469062954c206a365d4b1d4bf78742a73.tar.bz2
rneovim-3843fd3469062954c206a365d4b1d4bf78742a73.zip
Remove unneeded variable `in_os_delay`
This variable only existed for the old SIGQUIT handler. Now it's no longer necessary, especially when Neovim stops being a terminal program.
-rw-r--r--src/globals.h2
-rw-r--r--src/os/time.c5
2 files changed, 1 insertions, 6 deletions
diff --git a/src/globals.h b/src/globals.h
index b4bd72fc64..812a6f688c 100644
--- a/src/globals.h
+++ b/src/globals.h
@@ -1130,7 +1130,5 @@ EXTERN char *ignoredp;
/* Temporarily moved these static variables to assist in migrating from
* os_unix.c */
EXTERN int curr_tmode INIT(= TMODE_COOK); /* contains current terminal mode */
-/* volatile because it is used in signal handler deathtrap(). */
-EXTERN volatile bool in_os_delay INIT(= false); /* sleeping in os_delay() */
#endif /* NEOVIM_GLOBALS_H */
diff --git a/src/os/time.c b/src/os/time.c
index 2daf866cc7..0f7c990e23 100644
--- a/src/os/time.c
+++ b/src/os/time.c
@@ -29,9 +29,7 @@ void os_microdelay(uint64_t microseconds, bool ignoreinput)
if (ignoreinput) {
// Go to cooked mode without echo, to allow SIGINT interrupting us
- // here. But we don't want QUIT to kill us (CTRL-\ used in a
- // shell may produce SIGQUIT).
- in_os_delay = true;
+ // here
old_tmode = curr_tmode;
if (curr_tmode == TMODE_RAW)
@@ -40,7 +38,6 @@ void os_microdelay(uint64_t microseconds, bool ignoreinput)
microdelay(microseconds);
settmode(old_tmode);
- in_os_delay = false;
} else {
microdelay(microseconds);
}