void (@NotNull DocumentEvent event) { myCaretOffset = updateOffset(event, myCaretOffset, myCaretOffset == mySelection.getStartOffset() && mySelection.getLength() > 0); mySelection = updateRange(event, mySelection); myHighlightInfos.replaceAll(info -> info.withRange(updateRange(event, info.range()))); myTemplateFields.replaceAll(info -> info.withRange(updateRange(event, info.range()))); myTrackedDeclarations.replaceAll(range -> range.withNewRange(updateRange(event, range.newRange()))); if (myRenameSymbol != null) { ModRenameSymbol.RenameSymbolRange renameSymbolRange = myRenameSymbol.symbolRange(); myRenameSymbol = myRenameSymbol.withRange(updateRange(event, renameSymbolRange)); } }