diff options
Diffstat (limited to 'platform/platform-impl/src/com/intellij/openapi/editor/impl/softwrap/mapping/OffsetToLogicalCalculationStrategy.java')
-rw-r--r-- | platform/platform-impl/src/com/intellij/openapi/editor/impl/softwrap/mapping/OffsetToLogicalCalculationStrategy.java | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/platform/platform-impl/src/com/intellij/openapi/editor/impl/softwrap/mapping/OffsetToLogicalCalculationStrategy.java b/platform/platform-impl/src/com/intellij/openapi/editor/impl/softwrap/mapping/OffsetToLogicalCalculationStrategy.java index 39fe252ec623..399406f2db32 100644 --- a/platform/platform-impl/src/com/intellij/openapi/editor/impl/softwrap/mapping/OffsetToLogicalCalculationStrategy.java +++ b/platform/platform-impl/src/com/intellij/openapi/editor/impl/softwrap/mapping/OffsetToLogicalCalculationStrategy.java @@ -16,7 +16,7 @@ package com.intellij.openapi.editor.impl.softwrap.mapping; import com.intellij.openapi.editor.*; -import com.intellij.openapi.editor.impl.EditorTextRepresentationHelper; +import com.intellij.openapi.editor.impl.SoftWrapModelImpl; import com.intellij.openapi.editor.impl.softwrap.SoftWrapsStorage; import org.jetbrains.annotations.NotNull; import org.jetbrains.annotations.Nullable; @@ -31,10 +31,9 @@ class OffsetToLogicalCalculationStrategy extends AbstractMappingStrategy<Logical private int myTargetOffset; - OffsetToLogicalCalculationStrategy(@NotNull Editor editor, @NotNull SoftWrapsStorage storage, @NotNull List<CacheEntry> cache, - @NotNull EditorTextRepresentationHelper representationHelper) + OffsetToLogicalCalculationStrategy(@NotNull Editor editor, @NotNull SoftWrapsStorage storage, @NotNull List<CacheEntry> cache) { - super(editor, storage, cache, representationHelper); + super(editor, storage, cache); } public void init(final int targetOffset, final List<CacheEntry> cache) { @@ -157,13 +156,13 @@ class OffsetToLogicalCalculationStrategy extends AbstractMappingStrategy<Logical int targetLogicalLine = document.getLineNumber(myTargetOffset); if (targetLogicalLine == position.logicalLine) { // Target offset is located on the same logical line as folding start. - position.logicalColumn += myRepresentationHelper.toVisualColumnSymbolsNumber( + position.logicalColumn += SoftWrapModelImpl.getEditorTextRepresentationHelper(myEditor).toVisualColumnSymbolsNumber( document.getCharsSequence(), foldRegion.getStartOffset(), myTargetOffset, position.x ); } else { // Target offset is located on a different line with folding start. - position.logicalColumn = myRepresentationHelper.toVisualColumnSymbolsNumber( + position.logicalColumn = SoftWrapModelImpl.getEditorTextRepresentationHelper(myEditor).toVisualColumnSymbolsNumber( document.getCharsSequence(), foldRegion.getStartOffset(), myTargetOffset, 0 ); position.softWrapColumnDiff = 0; |