diff options
author | Bram Moolenaar <Bram@vim.org> | 2019-08-21 14:37:09 +0200 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2019-08-21 14:37:09 +0200 |
commit | e2c453d38f6512ac4cff7cd26aa7780b4e2534d7 (patch) | |
tree | 8458a35d59ac43121bfd2d24d5e9f7f54969d0dc /src/screen.c | |
parent | d933c82ff4e2c910bd533ed9a50377699c3f5ec9 (diff) | |
download | vim-git-e2c453d38f6512ac4cff7cd26aa7780b4e2534d7.tar.gz |
patch 8.1.1901: the +insert_expand feature is not always availablev8.1.1901
Problem: The +insert_expand feature is not always available.
Solution: Graduate the +insert_expand feature.
Diffstat (limited to 'src/screen.c')
-rw-r--r-- | src/screen.c | 30 |
1 files changed, 6 insertions, 24 deletions
diff --git a/src/screen.c b/src/screen.c index cb2d07b02..5043c0d7f 100644 --- 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_pum UNUSED) 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 col) 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, int ignore_pum) 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, int ignore_pum) // Except when the popup menu will be redrawn anyway. if (!ignore_pum && pum_visible()) return; -#endif #ifdef FEAT_STL_OPT if (*p_ruf) |