Mercurial > vim
diff src/screen.c @ 17809:59f8948b7590 v8.1.1901
patch 8.1.1901: the +insert_expand feature is not always available
Commit: https://github.com/vim/vim/commit/e2c453d38f6512ac4cff7cd26aa7780b4e2534d7
Author: Bram Moolenaar <Bram@vim.org>
Date: Wed Aug 21 14:37:09 2019 +0200
patch 8.1.1901: the +insert_expand feature is not always available
Problem: The +insert_expand feature is not always available.
Solution: Graduate the +insert_expand feature.
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Wed, 21 Aug 2019 14:45:04 +0200 |
parents | 4bd21046902b |
children | ba63a184e6b6 |
line wrap: on
line diff
--- a/src/screen.c +++ b/src/screen.c @@ -785,10 +785,8 @@ update_screen(int type_arg) #if defined(FEAT_SEARCH_EXTRA) end_search_hl(); #endif -#ifdef FEAT_INS_EXPAND /* May need to redraw the popup menu. */ pum_may_redraw(); -#endif /* Reset b_mod_set flags. Going through all windows is probably faster * than going through all buffers (there could be many buffers). */ @@ -6877,12 +6875,9 @@ win_redr_status(win_T *wp, int ignore_pu redraw_cmdline = TRUE; } else if (!redrawing() -#ifdef FEAT_INS_EXPAND // don't update status line when popup menu is visible and may be // drawn over it, unless it will be redrawn later - || (!ignore_pum && pum_visible()) -#endif - ) + || (!ignore_pum && pum_visible())) { /* Don't redraw right now, do it later. */ wp->w_redr_status = TRUE; @@ -7968,16 +7963,14 @@ screen_char(unsigned off, int row, int c if (row >= screen_Rows || col >= screen_Columns) return; -#ifdef FEAT_INS_EXPAND // Skip if under the popup menu. // Popup windows with zindex higher than POPUPMENU_ZINDEX go on top. if (pum_under_menu(row, col) -# ifdef FEAT_TEXT_PROP +#ifdef FEAT_TEXT_PROP && screen_zindex <= POPUPMENU_ZINDEX -# endif +#endif ) return; -#endif #ifdef FEAT_TEXT_PROP if (blocked_by_popup(row, col)) return; @@ -9953,9 +9946,7 @@ showmode(void) int do_mode; int attr; int nwr_save; -#ifdef FEAT_INS_EXPAND int sub_attr; -#endif do_mode = ((p_smd && msg_silent == 0) && ((State & INSERT) @@ -10010,7 +10001,6 @@ showmode(void) } } #endif -#ifdef FEAT_INS_EXPAND /* CTRL-X in Insert mode */ if (edit_submode != NULL && !shortmess(SHM_COMPLETIONMENU)) { @@ -10041,7 +10031,6 @@ showmode(void) } } else -#endif { if (State & VREPLACE_FLAG) msg_puts_attr(_(" VREPLACE"), attr); @@ -10106,10 +10095,7 @@ showmode(void) need_clear = TRUE; } if (reg_recording != 0 -#ifdef FEAT_INS_EXPAND - && edit_submode == NULL /* otherwise it gets too long */ -#endif - ) + && edit_submode == NULL) // otherwise it gets too long { recording_mode(attr); need_clear = TRUE; @@ -10566,14 +10552,12 @@ showruler(int always) { if (!always && !redrawing()) return; -#ifdef FEAT_INS_EXPAND if (pum_visible()) { /* Don't redraw right now, do it later. */ curwin->w_redr_status = TRUE; return; } -#endif #if defined(FEAT_STL_OPT) if ((*p_stl != NUL || *curwin->w_p_stl != NUL) && curwin->w_status_height) redraw_custom_statusline(curwin); @@ -10626,9 +10610,8 @@ win_redr_ruler(win_T *wp, int always, in if (wp->w_cursor.lnum > wp->w_buffer->b_ml.ml_line_count) return; -#ifdef FEAT_INS_EXPAND - /* Don't draw the ruler while doing insert-completion, it might overwrite - * the (long) mode message. */ + // Don't draw the ruler while doing insert-completion, it might overwrite + // the (long) mode message. if (wp == lastwin && lastwin->w_status_height == 0) if (edit_submode != NULL) return; @@ -10636,7 +10619,6 @@ win_redr_ruler(win_T *wp, int always, in // Except when the popup menu will be redrawn anyway. if (!ignore_pum && pum_visible()) return; -#endif #ifdef FEAT_STL_OPT if (*p_ruf)