java.lang.IndexOutOfBoundsException: Wrong startOffset: 80; documentLength: 76
at com.intellij.openapi.editor.impl.DocumentImpl.assertBounds(DocumentImpl.java:670)
at com.intellij.openapi.editor.impl.DocumentImpl.deleteString(DocumentImpl.java:567)
at com.github.lppedd.cc.liveTemplate.CCTemplateEditingListener.repositionCursorAfterSubjectAndCleanUp$lambda-0(CCTemplateEditingListener.kt:80)
at com.intellij.openapi.command.WriteCommandAction.lambda$runWriteCommandAction$4(WriteCommandAction.java:362)
at com.intellij.openapi.command.WriteCommandAction$BuilderImpl.lambda$doRunWriteCommandAction$1(WriteCommandAction.java:150)
at com.intellij.openapi.application.impl.ApplicationImpl.runWriteAction(ApplicationImpl.java:1023)
at com.intellij.openapi.command.WriteCommandAction$BuilderImpl.lambda$doRunWriteCommandAction$2(WriteCommandAction.java:148)
at com.intellij.openapi.command.impl.CoreCommandProcessor.executeCommand(CoreCommandProcessor.java:210)
at com.intellij.openapi.command.impl.CoreCommandProcessor.executeCommand(CoreCommandProcessor.java:184)
at com.intellij.openapi.command.WriteCommandAction$BuilderImpl.doRunWriteCommandAction(WriteCommandAction.java:157)
at com.intellij.openapi.command.WriteCommandAction$BuilderImpl.run(WriteCommandAction.java:124)
at com.intellij.openapi.command.WriteCommandAction.runWriteCommandAction(WriteCommandAction.java:362)
at com.github.lppedd.cc.liveTemplate.CCTemplateEditingListener.repositionCursorAfterSubjectAndCleanUp(CCTemplateEditingListener.kt:84)
at com.github.lppedd.cc.liveTemplate.CCTemplateEditingListener.beforeTemplateFinished(CCTemplateEditingListener.kt:65)
at com.github.lppedd.cc.liveTemplate.CCTemplateEditingListener.currentVariableChanged(CCTemplateEditingListener.kt:41)
at com.intellij.codeInsight.template.impl.TemplateState.fireCurrentVariableChanged(TemplateState.java:1361)
at com.intellij.codeInsight.template.impl.TemplateState.cleanupTemplateState(TemplateState.java:1037)
at com.intellij.codeInsight.template.impl.TemplateState.cancelTemplate(TemplateState.java:1027)
at com.intellij.codeInsight.template.impl.InteractiveTemplateStateProcessor$MyBasicUndoableAction.undo(InteractiveTemplateStateProcessor.java:304)
at com.intellij.openapi.command.impl.UndoableGroup.performActions(UndoableGroup.java:193)
at com.intellij.openapi.command.impl.UndoableGroup.lambda$doUndoOrRedo$0(UndoableGroup.java:163)
at com.intellij.openapi.application.impl.ApplicationImpl.runWriteAction(ApplicationImpl.java:1023)
at com.intellij.openapi.command.impl.UndoableGroup.doUndoOrRedo(UndoableGroup.java:140)
at com.intellij.openapi.command.impl.UndoableGroup.undoOrRedo(UndoableGroup.java:129)
at com.intellij.openapi.command.impl.UndoableGroup.undo(UndoableGroup.java:108)
at com.intellij.openapi.command.impl.Undo.performAction(Undo.java:51)
at com.intellij.openapi.command.impl.UndoRedo.execute(UndoRedo.java:158)
at com.intellij.openapi.command.impl.CommandMerger.undoOrRedo(CommandMerger.java:298)
at com.intellij.openapi.command.impl.UndoManagerImpl.lambda$undoOrRedo$1(UndoManagerImpl.java:416)
at com.intellij.openapi.command.impl.CoreCommandProcessor.executeCommand(CoreCommandProcessor.java:219)
at com.intellij.openapi.command.impl.CoreCommandProcessor.executeCommand(CoreCommandProcessor.java:174)
at com.intellij.openapi.command.impl.CoreCommandProcessor.executeCommand(CoreCommandProcessor.java:164)
at com.intellij.openapi.command.impl.UndoManagerImpl.undoOrRedo(UndoManagerImpl.java:424)
at com.intellij.openapi.command.impl.UndoManagerImpl.undo(UndoManagerImpl.java:395)
at com.intellij.ide.actions.UndoAction.perform(UndoAction.java:31)
at com.intellij.ide.actions.UndoRedoAction.actionPerformed(UndoRedoAction.java:50)
at com.intellij.openapi.actionSystem.ex.ActionUtil.doPerformActionOrShowPopup(ActionUtil.java:315)
at com.intellij.openapi.keymap.impl.ActionProcessor.performAction(ActionProcessor.java:47)
at com.intellij.openapi.keymap.impl.IdeKeyEventDispatcher$1.performAction(IdeKeyEventDispatcher.java:595)
at com.intellij.openapi.keymap.impl.IdeKeyEventDispatcher.lambda$doPerformActionInner$9(IdeKeyEventDispatcher.java:717)
at com.intellij.openapi.application.TransactionGuardImpl.performActivity(TransactionGuardImpl.java:105)
at com.intellij.openapi.application.TransactionGuardImpl.performUserActivity(TransactionGuardImpl.java:94)
at com.intellij.openapi.keymap.impl.IdeKeyEventDispatcher.lambda$doPerformActionInner$10(IdeKeyEventDispatcher.java:717)
at com.intellij.openapi.actionSystem.ex.ActionUtil.performDumbAwareWithCallbacks(ActionUtil.java:337)
at com.intellij.openapi.keymap.impl.IdeKeyEventDispatcher.doPerformActionInner(IdeKeyEventDispatcher.java:714)
at com.intellij.openapi.keymap.impl.IdeKeyEventDispatcher.processAction(IdeKeyEventDispatcher.java:658)
at com.intellij.openapi.keymap.impl.IdeKeyEventDispatcher.processAction(IdeKeyEventDispatcher.java:606)
at com.intellij.openapi.keymap.impl.IdeKeyEventDispatcher.processActionOrWaitSecondStroke(IdeKeyEventDispatcher.java:489)
at com.intellij.openapi.keymap.impl.IdeKeyEventDispatcher.inInitState(IdeKeyEventDispatcher.java:478)
at com.intellij.openapi.keymap.impl.IdeKeyEventDispatcher.dispatchKeyEvent(IdeKeyEventDispatcher.java:229)
at com.intellij.ide.IdeEventQueue.dispatchKeyEvent(IdeEventQueue.java:824)
at com.intellij.ide.IdeEventQueue._dispatchEvent(IdeEventQueue.java:760)
at com.intellij.ide.IdeEventQueue.lambda$dispatchEvent$6(IdeEventQueue.java:450)
at com.intellij.openapi.progress.impl.CoreProgressManager.computePrioritized(CoreProgressManager.java:791)
at com.intellij.ide.IdeEventQueue.lambda$dispatchEvent$7(IdeEventQueue.java:449)
at com.intellij.openapi.application.TransactionGuardImpl.performActivity(TransactionGuardImpl.java:113)
at com.intellij.ide.IdeEventQueue.performActivity(IdeEventQueue.java:624)
at com.intellij.ide.IdeEventQueue.lambda$dispatchEvent$8(IdeEventQueue.java:447)
at com.intellij.openapi.application.impl.ApplicationImpl.runIntendedWriteActionOnCurrentThread(ApplicationImpl.java:881)
at com.intellij.ide.IdeEventQueue.dispatchEvent(IdeEventQueue.java:493)
at java.desktop/java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:207)
at java.desktop/java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:128)
at java.desktop/java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:117)
at java.desktop/java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:113)
at java.desktop/java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:105)
at java.desktop/java.awt.EventDispatchThread.run(EventDispatchThread.java:92)