Fix displaying diff line when instant applying in jetbrains extensions (#10627)
This commit is contained in:
parent
37e86e18a1
commit
86b074e3e2
2 changed files with 8 additions and 1 deletions
|
|
@ -247,7 +247,7 @@ class DiffStreamHandler(
|
|||
currentBlock = createDiffBlock()
|
||||
currentBlock!!.startLine = currentLine
|
||||
}
|
||||
currentBlock!!.addedLines.add(text)
|
||||
currentBlock.addNewLineForHighlightOnly(text, currentLine);
|
||||
currentLine++
|
||||
}
|
||||
DiffLineType.SAME -> {
|
||||
|
|
|
|||
|
|
@ -91,6 +91,13 @@ class VerticalDiffBlock(
|
|||
addedLines.add(text)
|
||||
}
|
||||
|
||||
fun addNewLineForHighlightOnly(text: String, line: Int) {
|
||||
val greenKey = EditorUtils(editor).createTextAttributesKey("CONTINUE_DIFF_NEW_LINE", 0x3000FF00)
|
||||
editor.markupModel.addLineHighlighter(greenKey, line, HighlighterLayer.LAST)
|
||||
|
||||
addedLines.add(text)
|
||||
}
|
||||
|
||||
fun onLastDiffLine() {
|
||||
// Handles the case where we are invoking one last time on last line of diff stream, but the block has
|
||||
// already been rendered
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue