forked from aniani/vim
patch 9.1.0921: popupmenu logic is a bit convoluted
Problem: popupmenu logic is a bit convoluted Solution: slightly refactor logic and use MIN/MAX() macros to simplify (glepnir) Define the MAX/MIN macros. Since we support some older platforms, C compilers may not be as smart. This helps reduce unnecessary if statements and redundant ternary expressions. Pre-calculate some expressions by defining variables. Remove unnecessary parentheses. Adjust certain lines to avoid exceeding 80 columns. closes: #16205 Signed-off-by: glepnir <glephunter@gmail.com> Signed-off-by: Christian Brabandt <cb@256bit.org>
This commit is contained in:
committed by
Christian Brabandt
parent
95a03fc321
commit
c942f84aad
@@ -13,10 +13,6 @@
|
||||
|
||||
#include "vim.h"
|
||||
|
||||
#ifndef MAX
|
||||
# define MAX(x,y) ((x) > (y) ? (x) : (y))
|
||||
#endif
|
||||
|
||||
// Return value when handling keys in command-line mode.
|
||||
#define CMDLINE_NOT_CHANGED 1
|
||||
#define CMDLINE_CHANGED 2
|
||||
|
Reference in New Issue
Block a user