The XPM(2) syntax files that ship with vim currently do special highlighting 
when `has("gui_running")` - it colorizes the display according to the colors of 
the image.

Now that vim supports truecolor in the terminal, I'd like to see that same 
support used when `termguicolors` is set.

I've attached a diff that Works On My Machine (TM).


I'm very new to this, so please let me know if you need anything from me.

Thanks,
--Jemma

-- 
-- 
You received this message from the "vim_dev" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

--- 
You received this message because you are subscribed to the Google Groups 
"vim_dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.
diff --git a/runtime/syntax/xpm.vim b/runtime/syntax/xpm.vim
index 2021c3a..35f23dd 100644
--- a/runtime/syntax/xpm.vim
+++ b/runtime/syntax/xpm.vim
@@ -15,7 +15,7 @@ syn keyword xpmTodo           TODO FIXME XXX  contained
 syn region  xpmComment         start="/\*"  end="\*/"  contains=xpmTodo
 syn region  xpmPixelString     start=+"+  skip=+\\\\\|\\"+  end=+"+  
contains=@xpmColors
 
-if has("gui_running")
+if has("gui_running") || has("termguicolors") && &termguicolors
 
 let color  = ""
 let chars  = ""
@@ -120,7 +120,7 @@ endwhile
 
 unlet color chars colors cpp n i s
 
-endif          " has("gui_running")
+endif          " has("gui_running") || has("termguicolors") && &termguicolors
 
 " Define the default highlighting.
 " Only when an item doesn't have highlighting yet
diff --git a/runtime/syntax/xpm2.vim b/runtime/syntax/xpm2.vim
index 1d0eb57..7d38e5a 100644
--- a/runtime/syntax/xpm2.vim
+++ b/runtime/syntax/xpm2.vim
@@ -22,7 +22,7 @@ syn match   xpm2Comment               "\!.*$"  
contains=@Spell,xpm2Todo
 
 command -nargs=+ Hi hi def <args>
 
-if has("gui_running")
+if has("gui_running") || has("termguicolors") && &termguicolors
 
   let color  = ""
   let chars  = ""
@@ -132,7 +132,7 @@ if has("gui_running")
 
   unlet color chars colors cpp n i s
 
-endif          " has("gui_running")
+endif          " has("gui_running") || has("termguicolors") && &termguicolors
 
 " Define the default highlighting.
 " Only when an item doesn't have highlighting yet

Raspunde prin e-mail lui