mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
IDEA-136798 Switching between editors does not restore scroll position properly when soft-wraps are involved
This commit is contained in:
@@ -185,6 +185,7 @@ public class SoftWrapModelImpl implements SoftWrapModelEx, PrioritizedDocumentLi
|
||||
if ((myUseSoftWraps ^ softWrapsUsedBefore) || (tabWidthBefore >= 0 && myTabWidth != tabWidthBefore) || fontsChanged) {
|
||||
myApplianceManager.reset();
|
||||
myDeferredFoldRegions.clear();
|
||||
myStorage.removeAll();
|
||||
myEditor.getScrollingModel().scrollToCaret(ScrollType.CENTER);
|
||||
}
|
||||
}
|
||||
@@ -286,9 +287,6 @@ public class SoftWrapModelImpl implements SoftWrapModelEx, PrioritizedDocumentLi
|
||||
* @return total number of soft wrap-introduced new visual lines
|
||||
*/
|
||||
public int getSoftWrapsIntroducedLinesNumber() {
|
||||
if (!isSoftWrappingEnabled()) {
|
||||
return 0;
|
||||
}
|
||||
return myStorage.getSoftWraps().size(); // Assuming that soft wrap has single line feed all the time
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user