diff --git a/src/nvim/macros.h b/src/nvim/macros.h index bbbce7ab58..d42997650c 100644 --- a/src/nvim/macros.h +++ b/src/nvim/macros.h @@ -12,6 +12,13 @@ * macros.h: macro definitions for often used code */ +#ifndef MIN +# define MIN(X, Y) ((X) < (Y) ? (X) : (Y)) +#endif +#ifndef MAX +# define MAX(X, Y) ((X) > (Y) ? (X) : (Y)) +#endif + /* * Position comparisons */ diff --git a/src/nvim/vim.h b/src/nvim/vim.h index 9fbc6dd300..48d53369de 100644 --- a/src/nvim/vim.h +++ b/src/nvim/vim.h @@ -8,9 +8,6 @@ #ifndef NVIM_VIM_H #define NVIM_VIM_H -#define MIN(X, Y) (X < Y ? X : Y) -#define MAX(X, Y) (X > Y ? X : Y) - #include "nvim/types.h" #include "nvim/pos.h" // for linenr_T, MAXCOL, etc...