void () { init("aa bb cc dd ee ff<caret> gg hh ii jj", PlainTextFileType.INSTANCE); EditorTestUtil.configureSoftWraps(getEditor(), 8); verifySoftWrapPositions(8, 15, 21); final IncrementalCacheUpdateEvent[] event = new IncrementalCacheUpdateEvent[1]; ((SoftWrapModelImpl)getEditor().getSoftWrapModel()).getApplianceManager().addListener(new SoftWrapAwareDocumentParsingListenerAdapter() { @Override public void onRecalculationEnd(@NotNull IncrementalCacheUpdateEvent e) { assertNull(event[0]); event[0] = e; } }); type(' '); verifySoftWrapPositions(8, 15, 22); assertNotNull(event[0]); assertEquals(8, event[0].getStartOffset()); assertEquals(22, event[0].getActualEndOffset()); }