MCPcopy Index your code
hub / github.com/witheve/Eve / onChange

Function onChange

src/codemirror.js:14204–14219  ·  view source on GitHub ↗

* Listens for changes made in insert mode. * Should only be active in insert mode.

(_cm, changeObj)

Source from the content-addressed store, hash-verified

14202 * Should only be active in insert mode.
14203 */
14204 function onChange(_cm, changeObj) {
14205 var macroModeState = vimGlobalState.macroModeState;
14206 var lastChange = macroModeState.lastInsertModeChanges;
14207 if (!macroModeState.isPlaying) {
14208 while(changeObj) {
14209 lastChange.expectCursorActivityForChange = true;
14210 if (changeObj.origin == '+input' || changeObj.origin == 'paste'
14211 || changeObj.origin === undefined /* only in testing */) {
14212 var text = changeObj.text.join('\n');
14213 lastChange.changes.push(text);
14214 }
14215 // Change objects may be chained with next.
14216 changeObj = changeObj.next;
14217 }
14218 }
14219 }
14220
14221 /**
14222 * Listens for any kind of cursor activity on CodeMirror.

Callers

nothing calls this directly

Calls 2

updateBottomMarginFunction · 0.85
lastLineMethod · 0.80

Tested by

no test coverage detected