diff src/getchar.c @ 30825:c7983f593fa7 v9.0.0747

patch 9.0.0747: too many #ifdefs Commit: https://github.com/vim/vim/commit/ba43e76fcd5b2da57dbaa4d9a555793fe8ac344e Author: Martin Tournoij <martin@arp242.net> Date: Thu Oct 13 22:12:15 2022 +0100 patch 9.0.0747: too many #ifdefs Problem: Too many #ifdefs. Solution: Gradudate the +cmdline_info feature. (Martin Tournoij, closes #11330)
author Bram Moolenaar <Bram@vim.org>
date Thu, 13 Oct 2022 23:15:05 +0200
parents 71137f73c94d
children 6a2a38b26caf
line wrap: on
line diff
--- a/src/getchar.c
+++ b/src/getchar.c
@@ -3077,9 +3077,7 @@ vgetorpeek(int advance)
 					// 'ttimeoutlen' for complete key code
     int		mapdepth = 0;		// check for recursive mapping
     int		mode_deleted = FALSE;   // set when mode has been deleted
-#ifdef FEAT_CMDL_INFO
     int		new_wcol, new_wrow;
-#endif
 #ifdef FEAT_GUI
     int		shape_changed = FALSE;  // adjusted cursor shape
 #endif
@@ -3149,9 +3147,7 @@ vgetorpeek(int advance)
 	    {
 		long	wait_time;
 		int	keylen = 0;
-#ifdef FEAT_CMDL_INFO
 		int	showcmd_idx;
-#endif
 		check_end_reg_executing(advance);
 		/*
 		 * ui_breakcheck() is slow, don't use it too often when
@@ -3249,10 +3245,8 @@ vgetorpeek(int advance)
 		 * place does not matter.
 		 */
 		c = 0;
-#ifdef FEAT_CMDL_INFO
 		new_wcol = curwin->w_wcol;
 		new_wrow = curwin->w_wrow;
-#endif
 		if (	   advance
 			&& typebuf.tb_len == 1
 			&& typebuf.tb_buf[typebuf.tb_off] == ESC
@@ -3351,10 +3345,8 @@ vgetorpeek(int advance)
 		    }
 		    setcursor();
 		    out_flush();
-#ifdef FEAT_CMDL_INFO
 		    new_wcol = curwin->w_wcol;
 		    new_wrow = curwin->w_wrow;
-#endif
 		    curwin->w_wcol = old_wcol;
 		    curwin->w_wrow = old_wrow;
 		}
@@ -3442,9 +3434,7 @@ vgetorpeek(int advance)
 		 * input from the user), show the partially matched characters
 		 * to the user with showcmd.
 		 */
-#ifdef FEAT_CMDL_INFO
 		showcmd_idx = 0;
-#endif
 		c1 = 0;
 		if (typebuf.tb_len > 0 && advance && !exmode_active)
 		{
@@ -3462,7 +3452,6 @@ vgetorpeek(int advance)
 			    setcursor(); // put cursor back where it belongs
 			    c1 = 1;
 			}
-#ifdef FEAT_CMDL_INFO
 			// need to use the col and row from above here
 			old_wcol = curwin->w_wcol;
 			old_wrow = curwin->w_wrow;
@@ -3476,7 +3465,6 @@ vgetorpeek(int advance)
 			       typebuf.tb_buf[typebuf.tb_off + showcmd_idx++]);
 			curwin->w_wcol = old_wcol;
 			curwin->w_wrow = old_wrow;
-#endif
 		    }
 
 		    // this looks nice when typing a dead character map
@@ -3521,10 +3509,8 @@ vgetorpeek(int advance)
 			typebuf.tb_buflen - typebuf.tb_off - typebuf.tb_len - 1,
 			wait_time);
 
-#ifdef FEAT_CMDL_INFO
 		if (showcmd_idx != 0)
 		    pop_showcmd();
-#endif
 		if (c1 == 1)
 		{
 		    if (State & MODE_INSERT)