aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorJan Edmund Lazo <jan.lazo@mail.utoronto.ca>2021-03-01 22:07:48 -0500
committerJan Edmund Lazo <jan.lazo@mail.utoronto.ca>2021-03-01 23:41:10 -0500
commita5bacdbfb4f10652598d45e339c9f670b477ac8d (patch)
treefe2a0ae3ac839732665573cc7a018d69c7e4ca38 /src
parente50875b3e321428b88b5f2313246995811a82fac (diff)
downloadrneovim-a5bacdbfb4f10652598d45e339c9f670b477ac8d.tar.gz
rneovim-a5bacdbfb4f10652598d45e339c9f670b477ac8d.tar.bz2
rneovim-a5bacdbfb4f10652598d45e339c9f670b477ac8d.zip
vim-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. https://github.com/vim/vim/commit/e2c453d38f6512ac4cff7cd26aa7780b4e2534d7
Diffstat (limited to 'src')
-rw-r--r--src/nvim/globals.h9
-rw-r--r--src/nvim/screen.c10
2 files changed, 11 insertions, 8 deletions
diff --git a/src/nvim/globals.h b/src/nvim/globals.h
index 22f06941aa..4733a24d5a 100644
--- a/src/nvim/globals.h
+++ b/src/nvim/globals.h
@@ -180,6 +180,11 @@ EXTERN int compl_cont_status INIT(= 0);
# define CONT_LOCAL 32 // for ctrl_x_mode 0, ^X^P/^X^N do a local
// expansion, (eg use complete=.)
+EXTERN char_u *edit_submode INIT(= NULL); // msg for CTRL-X submode
+EXTERN char_u *edit_submode_pre INIT(= NULL); // prepended to edit_submode
+EXTERN char_u *edit_submode_extra INIT(= NULL); // appended to edit_submode
+EXTERN hlf_T edit_submode_highl; // highl. method for extra info
+
// state for putting characters in the message area
EXTERN int cmdmsg_rl INIT(= false); // cmdline is drawn right to left
EXTERN int msg_col;
@@ -639,10 +644,6 @@ EXTERN int arrow_used; // Normally false, set to true after
// to call u_sync()
EXTERN bool ins_at_eol INIT(= false); // put cursor after eol when
// restarting edit after CTRL-O
-EXTERN char_u *edit_submode INIT(= NULL); // msg for CTRL-X submode
-EXTERN char_u *edit_submode_pre INIT(= NULL); // prepended to edit_submode
-EXTERN char_u *edit_submode_extra INIT(= NULL); // appended to edit_submode
-EXTERN hlf_T edit_submode_highl; // highl. method for extra info
EXTERN int no_abbr INIT(= true); // true when no abbreviations loaded
diff --git a/src/nvim/screen.c b/src/nvim/screen.c
index dd28c6fb35..20e3cc0a2e 100644
--- a/src/nvim/screen.c
+++ b/src/nvim/screen.c
@@ -7152,11 +7152,13 @@ static void win_redr_ruler(win_T *wp, int always)
if (wp->w_cursor.lnum > wp->w_buffer->b_ml.ml_line_count)
return;
- /* 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)
+ // 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;
+ }
+ }
if (*p_ruf) {
int save_called_emsg = called_emsg;