diff src/insexpand.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 b423bd231f33
children 8ca20b0a3dc3
line wrap: on
line diff
--- a/src/insexpand.c
+++ b/src/insexpand.c
@@ -13,7 +13,6 @@
 
 #include "vim.h"
 
-#ifdef FEAT_INS_EXPAND
 /*
  * Definitions used for CTRL-X submode.
  * Note: If you change CTRL-X submode, you must also maintain ctrl_x_msgs[] and
@@ -209,14 +208,12 @@ static int  ins_compl_pum_key(int c);
 static int  ins_compl_key2count(int c);
 static void show_pum(int prev_w_wrow, int prev_w_leftcol);
 static unsigned  quote_meta(char_u *dest, char_u *str, int len);
-#endif // FEAT_INS_EXPAND
 
 #ifdef FEAT_SPELL
 static void spell_back_to_badword(void);
 static int  spell_bad_len = 0;	// length of located bad word
 #endif
 
-#if defined(FEAT_INS_EXPAND) || defined(PROTO)
 /*
  * CTRL-X pressed in Insert mode.
  */
@@ -288,9 +285,9 @@ ctrl_x_mode_not_defined_yet(void)
 has_compl_option(int dict_opt)
 {
     if (dict_opt ? (*curbuf->b_p_dict == NUL && *p_dict == NUL
-# ifdef FEAT_SPELL
+#ifdef FEAT_SPELL
 							&& !curwin->w_p_spell
-# endif
+#endif
 							)
 		 : (*curbuf->b_p_tsr == NUL && *p_tsr == NUL))
     {
@@ -4154,15 +4151,15 @@ quote_meta(char_u *dest, char_u *src, in
     return m;
 }
 
-# if defined(EXITFREE) || defined(PROTO)
+#if defined(EXITFREE) || defined(PROTO)
     void
 free_insexpand_stuff(void)
 {
     VIM_CLEAR(compl_orig_text);
 }
-# endif
-
-# ifdef FEAT_SPELL
+#endif
+
+#ifdef FEAT_SPELL
 /*
  * Called when starting CTRL_X_SPELL mode: Move backwards to a previous badly
  * spelled word, if there is one.
@@ -4176,6 +4173,4 @@ spell_back_to_badword(void)
     if (curwin->w_cursor.col != tpos.col)
 	start_arrow(&tpos);
 }
-# endif
-
-#endif // FEAT_INS_EXPAND
+#endif