when completing by tab, be prepared to invalid id end offset (EA-45428 - IAE: DocumentImpl.deleteString)

This commit is contained in:
peter
2015-07-22 15:47:41 +02:00
parent 36f19f9ca9
commit 836fa1ebde
@@ -691,7 +691,7 @@ public class CodeCompletionHandlerBase {
ApplicationManager.getApplication().runWriteAction(new Runnable() {
@Override
public void run() {
if (caretOffset != idEndOffset && completionChar == Lookup.REPLACE_SELECT_CHAR) {
if (caretOffset < idEndOffset && completionChar == Lookup.REPLACE_SELECT_CHAR) {
editor.getDocument().deleteString(caretOffset, idEndOffset);
}