@@ -991,14 +991,16 @@ class Highlighter
991
991
styles += L" .wwd-deleted { " + getDiffStyleValue (colorSettings.clrDiffText , colorSettings.clrDiffDeleted ) + L" }\n " ;
992
992
styles += L" .wwd-snpchanged { " + getDiffStyleValue (colorSettings.clrSNPText , colorSettings.clrSNP ) + L" }\n " ;
993
993
styles += L" .wwd-snpdeleted { " + getDiffStyleValue (colorSettings.clrSNPText , colorSettings.clrSNPDeleted ) + L" }\n " ;
994
- styles += L" .wwd-word { " + getDiffStyleValue (colorSettings.clrWordDiffText , colorSettings.clrWordDiff ) + L" }\n " ;
994
+ styles += L" .wwd-wordchanged { " + getDiffStyleValue (colorSettings.clrWordDiffText , colorSettings.clrWordDiff ) + L" }\n " ;
995
+ styles += L" .wwd-worddeleted { " + getDiffStyleValue (colorSettings.clrWordDiffText , colorSettings.clrWordDiffDeleted ) + L" }\n " ;
995
996
996
997
std::wstring datawwdid = L" [data-wwdid=\" " + std::to_wstring (diffIndex) + L" \" ]" ;
997
998
styles += L" .wwd-changed" + datawwdid + L" { " + getDiffStyleValue (colorSettings.clrSelDiffText , colorSettings.clrSelDiff ) + L" }\n " ;
998
999
styles += L" .wwd-deleted" + datawwdid + L" { " + getDiffStyleValue (colorSettings.clrSelDiffText , colorSettings.clrSelDiffDeleted ) + L" }\n " ;
999
1000
styles += L" .wwd-snpchanged" + datawwdid + L" { " + getDiffStyleValue (colorSettings.clrSelSNPText , colorSettings.clrSelSNP ) + L" }\n " ;
1000
1001
styles += L" .wwd-snpdeleted" + datawwdid + L" { " + getDiffStyleValue (colorSettings.clrSelSNPText , colorSettings.clrSelSNPDeleted ) + L" }\n " ;
1001
- styles += L" .wwd-diff" + datawwdid + L" .wwd-word { " + getDiffStyleValue (colorSettings.clrSelWordDiffText , colorSettings.clrSelWordDiff ) + L" }\n " ;
1002
+ styles += L" .wwd-diff" + datawwdid + L" .wwd-wordchanged { " + getDiffStyleValue (colorSettings.clrSelWordDiffText , colorSettings.clrSelWordDiff ) + L" }\n " ;
1003
+ styles += L" .wwd-diff" + datawwdid + L" .wwd-worddeleted { " + getDiffStyleValue (colorSettings.clrSelWordDiffText , colorSettings.clrSelWordDiffDeleted ) + L" }\n " ;
1002
1004
return styles;
1003
1005
}
1004
1006
@@ -1137,6 +1139,10 @@ class Highlighter
1137
1139
size_t begin = 0 ;
1138
1140
for (const auto & diffInfo: wordDiffInfoList)
1139
1141
{
1142
+ bool deleted = false ;
1143
+ for (size_t pane = 0 ; pane < m_documents.size (); ++pane)
1144
+ if (diffInfo.end [pane] < diffInfo.begin [pane])
1145
+ deleted = true ;
1140
1146
auto it = textSegments.segments .begin ();
1141
1147
std::advance (it, diffInfo.begin [pane]);
1142
1148
if (it != textSegments.segments .end ())
@@ -1162,7 +1168,7 @@ class Highlighter
1162
1168
1163
1169
if (!textDiff.empty ())
1164
1170
{
1165
- std::wstring className = L" wwd-wdiff wwd-word " ;
1171
+ std::wstring className = deleted ? L" wwd-wdiff wwd-worddeleted " : L" wwd-wdiff wwd-wordchanged " ;
1166
1172
WValue spanNode, diffTextNode, attributes, spanChildren;
1167
1173
WValue textDiffValue (textDiff.c_str (), static_cast <unsigned >(textDiff.size ()), allocator);
1168
1174
WValue classNameValue (className.c_str (), static_cast <unsigned >(className.size ()), allocator);
0 commit comments