[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

@ -36,7 +36,7 @@ module namespace set = "http://qt4cg.org/atomic-set";
except as fn($set as set:atomic-set, $value as set:atomic-set) as set:atomic-set,
* );
declare %private variable DATA := "'_data'";
declare %private variable $DATA := "'_data'";
(:
The private function set:replaceData processes the internal map

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 => {