mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-02-04 23:39:07 +07:00
[reader mode] fix an easy case of IJPL-29910
GitOrigin-RevId: 31fe02761e99c0824668cc59f1c04b9931c3da00
This commit is contained in:
committed by
intellij-monorepo-bot
parent
29bf8c213c
commit
eb09ab9d38
@@ -84,8 +84,7 @@ public class IndentGuideRenderer implements CustomHighlighterRenderer {
|
||||
var vfmtRightShift = 0;
|
||||
if (virtualGuideInfo.isVirtualFormattingEnabled(editor)) {
|
||||
vfmtRightShift = virtualGuideInfo
|
||||
.getVisualFormattingInlineInlays(editor, doc.getLineStartOffset(doc.getLineNumber(startOffset)),
|
||||
doc.getLineEndOffset(doc.getLineNumber(startOffset)))
|
||||
.getVisualFormattingInlineInlays(editor, startOffset, startOffset)
|
||||
.stream()
|
||||
.map(inlay -> inlay.getWidthInPixels())
|
||||
.reduce(0, Integer::sum);
|
||||
|
||||
@@ -193,7 +193,11 @@ class VisualFormattingLayerServiceImpl : VisualFormattingLayerService() {
|
||||
|
||||
val columnsDelta = replacementColumns - originalColumns
|
||||
when {
|
||||
columnsDelta > 0 -> yield(InlineInlay(originalEndOffset, columnsDelta))
|
||||
columnsDelta > 0 -> {
|
||||
// If we place the inlay at the right boundary, the inlay will stay even if the whitespace is folded. (as in IJPL-29910)
|
||||
// In the presence of tabs, however, things get too complicated
|
||||
yield(InlineInlay(if (originalContainsTabs) originalEndOffset else originalStartOffset, columnsDelta))
|
||||
}
|
||||
columnsDelta < 0 -> {
|
||||
val originalLength = originalEndOffset - originalStartOffset
|
||||
if (originalContainsTabs) {
|
||||
|
||||
Reference in New Issue
Block a user