From 3baba1e7bc6698e6bc9f1d37fce88b30d6274bc9 Mon Sep 17 00:00:00 2001 From: Thiago de Arruda Date: Mon, 16 Feb 2015 23:47:56 -0300 Subject: refactor: Remove term modules and termcap options - Removed term.c, term.h and term_defs.h - Tests for T_* values were removed. screen.c was simplified as a consequence(the best strategy for drawing is implemented in the UI layer) - Redraw functions now call ui.c functions directly. Updates are flushed with `ui_flush()` - Removed all termcap options(they now return empty strings for compatibility) - &term/&ttybuiltin options return a constant value(nvim) - &t_Co is still available, but it mirrors t_colors directly - Remove cursor tracking from screen.c and the `screen_start` function. Now the UI is expected to maintain cursor state across any call, and reset it when resized. - Remove unused code --- src/nvim/os/shell.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'src/nvim/os/shell.c') diff --git a/src/nvim/os/shell.c b/src/nvim/os/shell.c index d481d6af56..32c7ea564d 100644 --- a/src/nvim/os/shell.c +++ b/src/nvim/os/shell.c @@ -17,7 +17,7 @@ #include "nvim/vim.h" #include "nvim/message.h" #include "nvim/memory.h" -#include "nvim/term.h" +#include "nvim/ui.h" #include "nvim/misc2.h" #include "nvim/screen.h" #include "nvim/memline.h" @@ -99,7 +99,7 @@ int os_call_shell(char_u *cmd, ShellOpts opts, char_u *extra_args) char *output = NULL, **output_ptr = NULL; int current_state = State; bool forward_output = true; - out_flush(); + ui_flush(); // While the child is running, ignore terminating signals signal_reject_deadly(); @@ -421,7 +421,7 @@ static size_t write_output(char *output, size_t remaining, bool to_buffer, if (to_buffer) { ml_append(curwin->w_cursor.lnum++, (char_u *)output, 0, false); } else { - screen_del_lines(0, 0, 1, (int)Rows, true, NULL); + screen_del_lines(0, 0, 1, (int)Rows, NULL); screen_puts_len((char_u *)output, (int)off, lastrow, 0, 0); } size_t skip = off + 1; @@ -446,7 +446,7 @@ static size_t write_output(char *output, size_t remaining, bool to_buffer, // remember that the NL was missing curbuf->b_no_eol_lnum = curwin->w_cursor.lnum; } else { - screen_del_lines(0, 0, 1, (int)Rows, true, NULL); + screen_del_lines(0, 0, 1, (int)Rows, NULL); screen_puts_len((char_u *)output, (int)remaining, lastrow, 0, 0); } output += remaining; @@ -455,7 +455,7 @@ static size_t write_output(char *output, size_t remaining, bool to_buffer, } } - out_flush(); + ui_flush(); return (size_t)(output - start); } -- cgit