Attached is an updated patch, that fixes an error.
Christian
--
Der guten Menschen Hauptbestreben ist, andern auch was abzugeben.
-- Wilhelm Busch
--
--
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/doc/syntax.txt b/runtime/doc/syntax.txt
index 8f887c428..fd776c5ee 100644
--- a/runtime/doc/syntax.txt
+++ b/runtime/doc/syntax.txt
@@ -1165,7 +1165,14 @@ to standard by placing this in your vimrc file: >
:let enforce_freedesktop_standard = 1
-DIFF *diff.vim*
+DIFF *diff.vim* *ft-diff-syntax*
+
+To display deleted lines using strikethrough attribute (only works in the Gui),
+set the variable: >
+
+ :let diff_use_strikethrough = 1
+<
+Default is off, for better readability.
The diff highlighting normally finds translated headers. This can be slow if
there are very long lines in the file. To disable translations: >
diff --git a/runtime/syntax/diff.vim b/runtime/syntax/diff.vim
index b656cd97a..afc88ada5 100644
--- a/runtime/syntax/diff.vim
+++ b/runtime/syntax/diff.vim
@@ -357,6 +357,15 @@ syn match diffIndexLine "^index \x\x\x\x.*"
syn match diffComment "^#.*"
+" support for strikethrough
+if get(g:, 'diff_use_strikethrough', 0) &&
+ \ (v:version > 800 || v:version == 800 && has("patch1038"))
+ let special = substitute(execute(':hi Special'), '.*xxx\s\+', '', '').
+ \ ' gui=strikethrough'
+ exe "hi def diffRemoved" special
+else
+ hi def link diffRemoved Special
+endif
" Define the default highlighting.
" Only used when an item doesn't have highlighting yet
hi def link diffOldFile diffFile
@@ -370,7 +379,6 @@ hi def link diffBDiffer Constant
hi def link diffIsA Constant
hi def link diffNoEOL Constant
hi def link diffCommon Constant
-hi def link diffRemoved Special
hi def link diffChanged PreProc
hi def link diffAdded Identifier
hi def link diffLine Statement