MCPcopy
hub / github.com/witheve/Eve / lastChangeEvent

Function lastChangeEvent

src/codemirror.js:7936–7946  ·  view source on GitHub ↗
(hist, force)

Source from the content-addressed store, hash-verified

7934 // Find the top change event in the history. Pop off selection
7935 // events that are in the way.
7936 function lastChangeEvent(hist, force) {
7937 if (force) {
7938 clearSelectionEvents(hist.done);
7939 return lst(hist.done);
7940 } else if (hist.done.length && !lst(hist.done).ranges) {
7941 return lst(hist.done);
7942 } else if (hist.done.length > 1 && !hist.done[hist.done.length - 2].ranges) {
7943 hist.done.pop();
7944 return lst(hist.done);
7945 }
7946 }
7947
7948 // Register a change in the history. Merges changes that are within
7949 // a single operation, ore are close together with an origin that

Callers 1

addChangeToHistoryFunction · 0.85

Calls 2

clearSelectionEventsFunction · 0.85
lstFunction · 0.85

Tested by

no test coverage detected