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.
This commit is contained in:
Thiago de Arruda
2014-11-27 14:10:42 -03:00
parent 541eaf598c
commit 1865b8c1c1
29 changed files with 98 additions and 108 deletions

View File

@@ -59,6 +59,7 @@
#include "nvim/os/os.h"
#include "nvim/os/shell.h"
#include "nvim/os/input.h"
#include "nvim/os/time.h"
#ifdef INCLUDE_GENERATED_DECLARATIONS
# include "misc1.c.generated.h"
@@ -1841,7 +1842,7 @@ void changed(void)
* and don't let the emsg() set msg_scroll. */
if (need_wait_return && emsg_silent == 0) {
out_flush();
ui_delay(2000L, true);
os_delay(2000L, true);
wait_return(TRUE);
msg_scroll = save_msg_scroll;
}
@@ -2262,7 +2263,7 @@ change_warning (
(void)msg_end();
if (msg_silent == 0 && !silent_mode) {
out_flush();
ui_delay(1000L, true); /* give the user time to think about it */
os_delay(1000L, true); /* give the user time to think about it */
}
curbuf->b_did_warn = true;
redraw_cmdline = FALSE; /* don't redraw and erase the message */
@@ -3363,8 +3364,8 @@ void preserve_exit(void)
/*
* Check for CTRL-C pressed, but only once in a while.
* Should be used instead of ui_breakcheck() for functions that check for
* each line in the file. Calling ui_breakcheck() each time takes too much
* Should be used instead of os_breakcheck() for functions that check for
* each line in the file. Calling os_breakcheck() each time takes too much
* time, because it can be a system call.
*/
@@ -3378,7 +3379,7 @@ void line_breakcheck(void)
{
if (++breakcheck_count >= BREAKCHECK_SKIP) {
breakcheck_count = 0;
ui_breakcheck();
os_breakcheck();
}
}
@@ -3389,7 +3390,7 @@ void fast_breakcheck(void)
{
if (++breakcheck_count >= BREAKCHECK_SKIP * 10) {
breakcheck_count = 0;
ui_breakcheck();
os_breakcheck();
}
}