From e0e41b30c61922e099a067ac5c137e745699a1aa Mon Sep 17 00:00:00 2001 From: Thiago de Arruda Date: Fri, 13 Feb 2015 12:06:01 -0300 Subject: ui: Remove/adapt some old code for a big UI refactor - Remove abstract_ui global, now it is always active - Remove some terminal handling code - Remove unused functions - Remove HAVE_TGETENT/TERMINFO/TERMIOS/IOCTL #ifdefs - Remove tgetent/terminfo from version.c - Remove curses/terminfo dependencies - Only start/stop termcap when starting/exiting the program - msg_use_printf will return true if there are no attached UIs( messages will be written to stdout) - Remove `ex_winpos`(implement `:winpos` with `ex_ni`) --- src/nvim/option.c | 30 +++++------------------------- 1 file changed, 5 insertions(+), 25 deletions(-) (limited to 'src/nvim/option.c') diff --git a/src/nvim/option.c b/src/nvim/option.c index 71d19e24f1..f026663ae5 100644 --- a/src/nvim/option.c +++ b/src/nvim/option.c @@ -4226,23 +4226,6 @@ did_set_string_option ( } - - -#if defined(FEAT_MOUSE_TTY) && defined(UNIX) - /* 'ttymouse' */ - else if (varp == &p_ttym) { - /* Switch the mouse off before changing the escape sequences used for - * that. */ - mch_setmouse(FALSE); - if (opt_strings_flags(p_ttym, p_ttym_values, &ttym_flags, FALSE) != OK) - errmsg = e_invarg; - else - check_mouse_termcode(); - if (termcap_active) - setmouse(); /* may switch it on again */ - } -#endif - /* 'selection' */ else if (varp == &p_sel) { if (*p_sel == NUL @@ -5439,8 +5422,7 @@ set_num_option ( curbuf->b_p_iminsert = B_IMODE_NONE; } p_iminsert = curbuf->b_p_iminsert; - if (termcap_active) /* don't do this in the alternate screen */ - showmode(); + showmode(); /* Show/unshow value of 'keymap' in status lines. */ status_redraw_curbuf(); } else if (pp == &p_window) { @@ -5559,12 +5541,11 @@ set_num_option ( */ if (old_Rows != Rows || old_Columns != Columns) { /* Changing the screen size is not allowed while updating the screen. */ - if (updating_screen) + if (updating_screen) { *pp = old_value; - else if (full_screen - ) - screen_resize((int)Columns, (int)Rows, TRUE); - else { + } else if (full_screen) { + screen_resize((int)Columns, (int)Rows); + } else { /* Postpone the resizing; check the size and cmdline position for * messages. */ check_shellsize(); @@ -6414,7 +6395,6 @@ void clear_termoptions(void) */ mch_setmouse(FALSE); /* switch mouse off */ mch_restore_title(3); /* restore window titles */ - stoptermcap(); /* stop termcap mode */ free_termoptions(); } -- cgit From 419da839e0cbdf6251bc31dc218fa629ccc91b44 Mon Sep 17 00:00:00 2001 From: Thiago de Arruda Date: Fri, 13 Feb 2015 12:06:19 -0300 Subject: cleanup: Remove unused functions and builtin termcaps --- src/nvim/option.c | 32 -------------------------------- 1 file changed, 32 deletions(-) (limited to 'src/nvim/option.c') diff --git a/src/nvim/option.c b/src/nvim/option.c index f026663ae5..7242c2d925 100644 --- a/src/nvim/option.c +++ b/src/nvim/option.c @@ -5951,27 +5951,6 @@ set_option_value ( return NULL; } -/* - * Get the terminal code for a terminal option. - * Returns NULL when not found. - */ -char_u *get_term_code(char_u *tname) -{ - int opt_idx; - char_u *varp; - - if (tname[0] != 't' || tname[1] != '_' || - tname[2] == NUL || tname[3] == NUL) - return NULL; - if ((opt_idx = findoption(tname)) >= 0) { - varp = get_varp(&(options[opt_idx])); - if (varp != NULL) - varp = *(char_u **)(varp); - return varp; - } - return find_termcode(tname + 2); -} - char_u *get_highlight_default(void) { int i; @@ -7811,17 +7790,6 @@ int option_was_set(char_u *name) return FALSE; } -/* - * Reset the flag indicating option "name" was set. - */ -void reset_option_was_set(char_u *name) -{ - int idx = findoption(name); - - if (idx >= 0) - options[idx].flags &= ~P_WAS_SET; -} - /* * fill_breakat_flags() -- called when 'breakat' changes value. */ -- cgit