MCPcopy Create free account
hub / github.com/Auto-Plugin/milkup / setSelection

Method setSelection

src/core/nodeviews/code-block.ts:1822–1827  ·  view source on GitHub ↗

* 设置选区

(anchor: number, head: number)

Source from the content-addressed store, hash-verified

1820 * 设置选区
1821 */
1822 setSelection(anchor: number, head: number): void {
1823 this.cm.focus();
1824 this.cm.dispatch({
1825 selection: { anchor, head },
1826 });
1827 }
1828
1829 /**
1830 * 选区是否在此节点内

Calls 1

focusMethod · 0.80

Tested by

no test coverage detected