diff options
author | Bram Moolenaar <Bram@vim.org> | 2016-05-01 13:09:57 +0200 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2016-05-01 13:09:57 +0200 |
commit | 187147aedd588070d0676664d5076d046644094e (patch) | |
tree | b21c5724db3fa7d1b958ccbe13e3b4cc3b0f2736 /src/vim.h | |
parent | 3266c85a44a637862b0ed6e531680c6ab2897ab5 (diff) | |
download | vim-187147aedd588070d0676664d5076d046644094e.zip |
patch 7.4.1812
Problem: Failure on startup with Athena and Motif.
Solution: Check for INVALCOLOR. (Kazunobu Kuriyama)
Diffstat (limited to 'src/vim.h')
-rw-r--r-- | src/vim.h | 10 |
1 files changed, 10 insertions, 0 deletions
@@ -1561,14 +1561,23 @@ typedef UINT32_TYPEDEF UINT32_T; #ifdef FEAT_GUI # ifdef FEAT_TERMGUICOLORS # define GUI_FUNCTION(f) (gui.in_use ? gui_##f : termgui_##f) +# define GUI_FUNCTION2(f, pixel) (gui.in_use \ + ? ((pixel) != INVALCOLOR \ + ? gui_##f((pixel)) \ + : (long_u)INVALCOLOR) \ + : termgui_##f((pixel))) # define USE_24BIT (gui.in_use || p_tgc) # else # define GUI_FUNCTION(f) gui_##f +# define GUI_FUNCTION2(f,pixel) ((pixel) != INVALCOLOR \ + ? gui_##f((pixel)) \ + : (long_u)INVALCOLOR) # define USE_24BIT gui.in_use # endif #else # ifdef FEAT_TERMGUICOLORS # define GUI_FUNCTION(f) termgui_##f +# define GUI_FUNCTION2(f, pixel) termgui_##f((pixel)) # define USE_24BIT p_tgc # endif #endif @@ -1579,6 +1588,7 @@ typedef UINT32_TYPEDEF UINT32_T; #endif #ifdef GUI_FUNCTION # define GUI_MCH_GET_RGB GUI_FUNCTION(mch_get_rgb) +# define GUI_MCH_GET_RGB2(pixel) GUI_FUNCTION2(mch_get_rgb, (pixel)) # define GUI_MCH_GET_COLOR GUI_FUNCTION(mch_get_color) # define GUI_GET_COLOR GUI_FUNCTION(get_color) #endif |