diff src/popupmenu.c @ 28773:d770568e6c98 v8.2.4911

patch 8.2.4911: the mode #defines are not clearly named Commit: https://github.com/vim/vim/commit/249591057b4840785c50e41dd850efb8a8faf435 Author: Bram Moolenaar <Bram@vim.org> Date: Sat May 7 20:01:16 2022 +0100 patch 8.2.4911: the mode #defines are not clearly named Problem: The mode #defines are not clearly named. Solution: Prepend MODE_. Renumber them to put the mapped modes first.
author Bram Moolenaar <Bram@vim.org>
date Sat, 07 May 2022 21:15:06 +0200
parents 4dcccb2673fe
children 86eac190ec42
line wrap: on
line diff
--- a/src/popupmenu.c
+++ b/src/popupmenu.c
@@ -101,7 +101,7 @@ pum_display(
     win_T	*pvwin;
 #endif
 #ifdef FEAT_RIGHTLEFT
-    int		right_left = State == CMDLINE ? FALSE : curwin->w_p_rl;
+    int		right_left = State == MODE_CMDLINE ? FALSE : curwin->w_p_rl;
 #endif
 
     do
@@ -119,7 +119,7 @@ pum_display(
 	// Remember the essential parts of the window position and size, so we
 	// can decide when to reposition the popup menu.
 	pum_window = curwin;
-	if (State == CMDLINE)
+	if (State == MODE_CMDLINE)
 	    // cmdline completion popup menu
 	    pum_win_row = cmdline_row;
 	else
@@ -159,7 +159,7 @@ pum_display(
 	{
 	    // pum above "pum_win_row"
 
-	    if (State == CMDLINE)
+	    if (State == MODE_CMDLINE)
 		// for cmdline pum, no need for context lines
 		context_lines = 0;
 	    else
@@ -191,7 +191,7 @@ pum_display(
 	{
 	    // pum below "pum_win_row"
 
-	    if (State == CMDLINE)
+	    if (State == MODE_CMDLINE)
 		// for cmdline pum, no need for context lines
 		context_lines = 0;
 	    else
@@ -235,7 +235,7 @@ pum_display(
 
 	// Calculate column
 #ifdef FEAT_WILDMENU
-	if (State == CMDLINE)
+	if (State == MODE_CMDLINE)
 	    // cmdline completion popup menu
 	    cursor_col = cmdline_compl_startcol();
 	else