[fix] symbol center

This commit is contained in:
Andy Bunce 2025-11-19 23:03:51 +00:00
parent bc4b12fa6d
commit 04134c720b
3 changed files with 11 additions and 3 deletions

View file

@ -85,7 +85,14 @@ $("symList").addEventListener("itemSelected", e => {
console.log("SYM selection range", sel);
const an = plugin.fromPosition(sel.start)
const hd = plugin.fromPosition(sel.end)
view.dispatch({ selection: { anchor: an, head: hd }, scrollIntoView: true });
//view.dispatch({ selection: { anchor: an, head: hd }, scrollIntoView: true });
view.dispatch({
selection: { anchor: an, head: hd },
scrollIntoView: true ,
effects: [lsp.EditorView.scrollIntoView(an,{y:"center"})]
});
});
$("lint").onclick = async e => {