MCPcopy Create free account
hub / github.com/Acode-Foundation/Acode / apply

Function apply

src/lib/editorManager.js:1613–1630  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

1611 const left = hasLeft ? file.lastScrollLeft : undefined;
1612
1613 const apply = () => {
1614 if (manager.activeFile?.id !== fileId) return;
1615 suppressCursorReveal(450);
1616 setScrollPosition(editor, top, left);
1617
1618 const scroller = editor?.scrollDOM;
1619 if (scroller) {
1620 if (hasTop) lastScrollTop = scroller.scrollTop;
1621 if (hasLeft) lastScrollLeft = scroller.scrollLeft;
1622 lockScrollbarScrollPosition(
1623 {
1624 top: hasTop ? scroller.scrollTop : undefined,
1625 left: hasLeft ? scroller.scrollLeft : undefined,
1626 },
1627 450,
1628 );
1629 }
1630 };
1631
1632 apply();
1633 scrollRestoreFrame = requestAnimationFrame(() => {

Callers 1

Calls 3

setScrollPositionFunction · 0.90
suppressCursorRevealFunction · 0.85

Tested by

no test coverage detected