void (@NotNull DocumentEvent e) { ThreadingAssertions.assertEventDispatchThread(); myDocumentChangeInProgress = true; if (isStickySelection()) { setStickySelection(false); } if (myDocument.isInBulkUpdate()) { // Assuming that the job is done at bulk listener callback methods. return; } myRangeToRepaintStart = Integer.MAX_VALUE; myRangeToRepaintEnd = 0; myRestoreScrollingPosition = getCaretModel().getOffset() < e.getOffset() || getCaretModel().getOffset() > e.getOffset() + e.getOldLength(); if (myRestoreScrollingPosition && myScrollingPositionKeeper != null) { myScrollingPositionKeeper.savePosition(); } }