diff options
Diffstat (limited to 'src/nvim/ex_cmds.c')
-rw-r--r-- | src/nvim/ex_cmds.c | 52 |
1 files changed, 15 insertions, 37 deletions
diff --git a/src/nvim/ex_cmds.c b/src/nvim/ex_cmds.c index ad49153a1e..3dde055c2a 100644 --- a/src/nvim/ex_cmds.c +++ b/src/nvim/ex_cmds.c @@ -62,7 +62,7 @@ #include "nvim/syntax.h" #include "nvim/tag.h" #include "nvim/tempfile.h" -#include "nvim/term.h" +#include "nvim/ui.h" #include "nvim/undo.h" #include "nvim/window.h" #include "nvim/os/os.h" @@ -946,7 +946,7 @@ void do_bang(int addr_count, exarg_T *eap, int forceit, int do_in, int do_out) msg_putchar('!'); msg_outtrans(newcmd); msg_clr_eos(); - windgoto(msg_row, msg_col); + ui_cursor_goto(msg_row, msg_col); do_shell(newcmd, 0); } else { /* :range! */ @@ -1064,8 +1064,8 @@ do_filter ( /* Create the shell command in allocated memory. */ cmd_buf = make_filter_cmd(cmd, itmp, otmp); - windgoto((int)Rows - 1, 0); - cursor_on(); + ui_cursor_goto((int)Rows - 1, 0); + ui_cursor_on(); /* * When not redirecting the output the command can write anything to the @@ -1245,23 +1245,18 @@ do_shell ( } } - /* This windgoto is required for when the '\n' resulted in a "delete line - * 1" command to the terminal. */ - if (!swapping_screen()) - windgoto(msg_row, msg_col); - cursor_on(); + // This ui_cursor_goto is required for when the '\n' resulted in a "delete line + // 1" command to the terminal. + ui_cursor_goto(msg_row, msg_col); + ui_cursor_on(); (void)call_shell(cmd, flags, NULL); did_check_timestamps = FALSE; need_check_timestamps = TRUE; - /* - * put the message cursor at the end of the screen, avoids wait_return() - * to overwrite the text that the external command showed - */ - if (!swapping_screen()) { - msg_row = Rows - 1; - msg_col = 0; - } + // put the message cursor at the end of the screen, avoids wait_return() + // to overwrite the text that the external command showed + msg_row = Rows - 1; + msg_col = 0; if (autocmd_busy) { if (msg_silent == 0) @@ -1284,8 +1279,6 @@ do_shell ( * want to wait for "hit return to continue". */ save_nwr = no_wait_return; - if (swapping_screen()) - no_wait_return = FALSE; wait_return(msg_silent == 0); no_wait_return = save_nwr; } @@ -1945,21 +1938,6 @@ void viminfo_writestring(FILE *fd, char_u *p) putc('\n', fd); } -/* - * Implementation of ":fixdel", also used by get_stty(). - * <BS> resulting <Del> - * ^? ^H - * not ^? ^? - */ -void do_fixdel(exarg_T *eap) -{ - char_u *p; - - p = find_termcode((char_u *)"kb"); - add_termcode((char_u *)"kD", p != NULL - && *p == DEL ? (char_u *)CTRL_H_STR : DEL_STR, FALSE); -} - void print_line_no_prefix(linenr_T lnum, int use_number, int list) { char_u numbuf[30]; @@ -1985,8 +1963,8 @@ void print_line(linenr_T lnum, int use_number, int list) print_line_no_prefix(lnum, use_number, list); if (save_silent) { msg_putchar('\n'); - cursor_on(); /* msg_start() switches it off */ - out_flush(); + ui_cursor_on(); /* msg_start() switches it off */ + ui_flush(); silent_mode = save_silent; } info_message = FALSE; @@ -3971,7 +3949,7 @@ void do_sub(exarg_T *eap) msg_no_more = FALSE; msg_scroll = i; showruler(TRUE); - windgoto(msg_row, msg_col); + ui_cursor_goto(msg_row, msg_col); RedrawingDisabled = temp; #ifdef USE_ON_FLY_SCROLL |