Scratch: associate inlay with preceding text
This allow to avoid some unintentional movements of caret after inserting scratch output
This commit is contained in:
+5
-1
@@ -74,7 +74,11 @@ object InlayScratchOutputHandler : ScratchOutputHandler {
|
|||||||
if (shortText != text) {
|
if (shortText != text) {
|
||||||
printToToolWindow(file, expression, output)
|
printToToolWindow(file, expression, output)
|
||||||
}
|
}
|
||||||
editor.inlayModel.addInlineElement(lineEndOffset, InlayScratchFileRenderer(" ".repeat(spaceCount) + shortText, output.type))
|
editor.inlayModel.addInlineElement(
|
||||||
|
lineEndOffset,
|
||||||
|
true,
|
||||||
|
InlayScratchFileRenderer(" ".repeat(spaceCount) + shortText, output.type)
|
||||||
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
val existing = editor.inlayModel
|
val existing = editor.inlayModel
|
||||||
|
|||||||
Reference in New Issue
Block a user