MCPcopy
hub / github.com/csev/py4e / lastChangeEvent

Function lastChangeEvent

tools/pythonauto/static/codemirrorepl/codemirror.js:6571–6581  ·  view source on GitHub ↗
(hist, force)

Source from the content-addressed store, hash-verified

6569 // Find the top change event in the history. Pop off selection
6570 // events that are in the way.
6571 function lastChangeEvent(hist, force) {
6572 if (force) {
6573 clearSelectionEvents(hist.done);
6574 return lst(hist.done);
6575 } else if (hist.done.length && !lst(hist.done).ranges) {
6576 return lst(hist.done);
6577 } else if (hist.done.length > 1 && !hist.done[hist.done.length - 2].ranges) {
6578 hist.done.pop();
6579 return lst(hist.done);
6580 }
6581 }
6582
6583 // Register a change in the history. Merges changes that are within
6584 // a single operation, ore are close together with an origin that

Callers 1

addChangeToHistoryFunction · 0.85

Calls 2

clearSelectionEventsFunction · 0.85
lstFunction · 0.70

Tested by

no test coverage detected