aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/os/input.c
diff options
context:
space:
mode:
authorThiago de Arruda <tpadilha84@gmail.com>2014-11-27 12:54:26 -0300
committerThiago de Arruda <tpadilha84@gmail.com>2014-11-27 14:12:59 -0300
commit541eaf598c25e0b853ef441b57c9f7d1bbf3450c (patch)
tree62919511c5968a76b8add898b812aeaf2edc02a5 /src/nvim/os/input.c
parentf6c89ec70409badb7ca477de47dd1f8dbf3de376 (diff)
downloadrneovim-541eaf598c25e0b853ef441b57c9f7d1bbf3450c.tar.gz
rneovim-541eaf598c25e0b853ef441b57c9f7d1bbf3450c.tar.bz2
rneovim-541eaf598c25e0b853ef441b57c9f7d1bbf3450c.zip
ui: Remove ui_inchar/ui_char_avail
Also: - Remove NO_CONSOLE_INPUT/NO_CONSULE preprocessor conditionals - Remove ctrl_c_interrupts variable, check for mapped_ctrl_c directly in process_interrupts() - Move ui_inchar profiling to input_poll which is where Nvim blocks for input.
Diffstat (limited to 'src/nvim/os/input.c')
-rw-r--r--src/nvim/os/input.c12
1 files changed, 11 insertions, 1 deletions
diff --git a/src/nvim/os/input.c b/src/nvim/os/input.c
index d10d20b20e..d413921a5f 100644
--- a/src/nvim/os/input.c
+++ b/src/nvim/os/input.c
@@ -17,6 +17,7 @@
#include "nvim/keymap.h"
#include "nvim/mbyte.h"
#include "nvim/fileio.h"
+#include "nvim/ex_cmds2.h"
#include "nvim/getchar.h"
#include "nvim/term.h"
@@ -184,7 +185,16 @@ size_t input_enqueue(String keys)
static bool input_poll(int ms)
{
+ if (do_profiling == PROF_YES && ms) {
+ prof_inchar_enter();
+ }
+
event_poll_until(ms, input_ready());
+
+ if (do_profiling == PROF_YES && ms) {
+ prof_inchar_exit();
+ }
+
return input_ready();
}
@@ -282,7 +292,7 @@ static void convert_input(void)
static void process_interrupts(void)
{
- if (!ctrl_c_interrupts) {
+ if (mapped_ctrl_c) {
return;
}