From 541eaf598c25e0b853ef441b57c9f7d1bbf3450c Mon Sep 17 00:00:00 2001 From: Thiago de Arruda Date: Thu, 27 Nov 2014 12:54:26 -0300 Subject: 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. --- src/nvim/getchar.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/nvim/getchar.c') diff --git a/src/nvim/getchar.c b/src/nvim/getchar.c index 1bec0fa1bb..a3c87806b2 100644 --- a/src/nvim/getchar.c +++ b/src/nvim/getchar.c @@ -2481,7 +2481,7 @@ inchar ( char_u dum[DUM_LEN + 1]; for (;; ) { - len = ui_inchar(dum, DUM_LEN, 0L, 0); + len = os_inchar(dum, DUM_LEN, 0L, 0); if (len == 0 || (len == 1 && dum[0] == 3)) break; } @@ -2498,7 +2498,7 @@ inchar ( * Fill up to a third of the buffer, because each character may be * tripled below. */ - len = ui_inchar(buf, maxlen / 3, wait_time, tb_change_cnt); + len = os_inchar(buf, maxlen / 3, wait_time, tb_change_cnt); } if (typebuf_changed(tb_change_cnt)) -- cgit From 1865b8c1c115b639a4a12b5a9cb287a62a82ac76 Mon Sep 17 00:00:00 2001 From: Thiago de Arruda Date: Thu, 27 Nov 2014 14:10:42 -0300 Subject: ui: Remove ui_delay, ui_breakcheck and ui_set_shellsize These functions only used to call another os_* function, so remove them and replace all occurences in the project. --- src/nvim/getchar.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/nvim/getchar.c') diff --git a/src/nvim/getchar.c b/src/nvim/getchar.c index a3c87806b2..63ae5b4d4f 100644 --- a/src/nvim/getchar.c +++ b/src/nvim/getchar.c @@ -1702,14 +1702,14 @@ static int vgetorpeek(int advance) */ for (;; ) { /* - * ui_breakcheck() is slow, don't use it too often when + * os_breakcheck() is slow, don't use it too often when * inside a mapping. But call it each time for typed * characters. */ if (typebuf.tb_maplen) line_breakcheck(); else - ui_breakcheck(); /* check for CTRL-C */ + os_breakcheck(); /* check for CTRL-C */ keylen = 0; if (got_int) { /* flush all input */ -- cgit From bf6bb27e79f53646309ba075655465919bc2e60c Mon Sep 17 00:00:00 2001 From: Thiago de Arruda Date: Thu, 27 Nov 2014 14:58:04 -0300 Subject: ui: Remove redundant ui.h includes Also move read_error_exit to os/input.c --- src/nvim/getchar.c | 1 - 1 file changed, 1 deletion(-) (limited to 'src/nvim/getchar.c') diff --git a/src/nvim/getchar.c b/src/nvim/getchar.c index 63ae5b4d4f..6c70773fcf 100644 --- a/src/nvim/getchar.c +++ b/src/nvim/getchar.c @@ -47,7 +47,6 @@ #include "nvim/screen.h" #include "nvim/strings.h" #include "nvim/term.h" -#include "nvim/ui.h" #include "nvim/undo.h" #include "nvim/os/event.h" #include "nvim/os/input.h" -- cgit