Closed VasylMarchuk closed 1 week ago
That style doesn't indicate 'inline modified', it indicates that that specific text is deleted/inserted, and I feel it'd be inconsistent to not apply it to entirely inserted/deleted lines. This really works as intended.
Describe the issue
When
highlightChanges
option is enabled and whole chunks of code get removed or inserted, it highlights them all with red/green as if they were all "inline-modified", when in reality they really weren't.Details
It looks great for true inline changes as in example below, but unfortunately we had to disable this beautiful feature for now because it looks confusing (and quite ugly!) when multiple complete lines of code get inserted/deleted in bulk :(
More details
We have been able to fix the visual look for the inserted lines with a sneaky
.cm-insertedLine > .cm-changedText:only-child
css rule, because an inserted line will always have one.cm-changedText
if it's a completely new line... But for deletions that's not possible, because all deleted lines get crammed into one big.cm-deletedChunk
👀Example document, to reproduce:
Reproduction link
We have a complete functioning demo of CodeMirror, wrapped into an Ember.js component over at https://app.codecrafters.io/demo/code-mirror, configurable with most of the standard extensions & their options in realtime, please feel free to test over there. It's ok if people discover the link here on GitHub, but please don't link to it, yet :)
All of the documents used as examples in the Demo's
document
drop-down can be found here. The Ember.js component itself, which wraps CodeMirror, passes it all enabled extensions, and handles updates is here, just in case.Our current CodeMirror & Merge versions