-
-
Notifications
You must be signed in to change notification settings - Fork 5.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Diff highlighing not replaced by text property highlighting when combine
false
#14966
Comments
As mentioned, with |
I believe diff-highlighting works on a different level than syntax highlighting. I am not sure, if diff highlighting can be overridden by text-properties at all (haven't used it much yet). Can you try your example with some real syntax highlighting, e.g. vim script files? |
I didn't understand what What does combine mean? Using a modified test file, see below, with Here's the two files in the diff: The updated test file
|
Here's an example with which looks a lot like expected. Comparing it with |
Yes, when |
Could/should diff highlighting interact is a well defined way with text-props? Yes, it may not apply, but should it? I vaguely recall having seen a comment about this somewhere some time ago, but couldn't find anything in todo. One possibility is to have diff behave like syntax when it comes to text properties. Best case (simplest I think) it would only mean adjusting the diff combiner. Maybe treating the diff highlight like a prop, at least for combining, would work. There could even be an option for what priority for it to use. |
Right. But as the last examples show, with |
BTW, I haven't looked at any code. Wanted to explore first and see if some new behavior would be acceptable. |
Steps to reproduce
In help's
syntax.txt
, there is a section labeled "DIFF". This seemsto imply that the diff highlighing is syntax highlighting. In
textprop.txt
it says:
NOTE: "text property highlighting replaces the syntax highlighting"
To see the problem do
gvim -d f1 f2
with files that have differences.:source <test-file>
, can do it for both sides of the diff.Note to clear can do: :vim9cmd prop_remove({id: 555})
Test file
Expected behaviour
I may be reading the docs wrong.
When editing a file with syntax highlighting, sourcing the test-file overrides the highlighting as expected.
How can I set a text property that overrides the diff highlights. (this is for a tool that allows merge conflict editing).
Version of Vim
9.1.474
Environment
linux/gtk3
Logs and stack traces
No response
The text was updated successfully, but these errors were encountered: