From 2c29fcea1769bbcdfccfd8d0f6cd5778679fccfc Mon Sep 17 00:00:00 2001 From: Denis Zhdanov Date: Thu, 7 Oct 2010 11:06:04 +0400 Subject: [PATCH] IDEA-59220 IAE at com.intellij.openapi.editor.impl.DocumentImpl.a Algorithm of calculation caret location during 'auto hard wrap' is corrected --- .../intellij/codeInsight/editorActions/AutoHardWrapHandler.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/platform/lang-impl/src/com/intellij/codeInsight/editorActions/AutoHardWrapHandler.java b/platform/lang-impl/src/com/intellij/codeInsight/editorActions/AutoHardWrapHandler.java index c3b37c768c4d..25f2e8669a9e 100644 --- a/platform/lang-impl/src/com/intellij/codeInsight/editorActions/AutoHardWrapHandler.java +++ b/platform/lang-impl/src/com/intellij/codeInsight/editorActions/AutoHardWrapHandler.java @@ -163,7 +163,7 @@ public class AutoHardWrapHandler { DocumentListener listener = new DocumentListener() { @Override public void beforeDocumentChange(DocumentEvent event) { - if (event.getOffset() <= baseCaretOffset) { + if (event.getOffset() <= baseCaretOffset + caretOffsetDiff[0]) { caretOffsetDiff[0] += event.getNewLength() - event.getOldLength(); }