Skip to content

Commit

Permalink
Unselect symbol item after select so can be reselected
Browse files Browse the repository at this point in the history
  • Loading branch information
jeremypw committed Jan 8, 2025
1 parent dc70732 commit c5c32fd
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/SymbolPane/C/CtagsSymbolOutline.vala
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,11 @@ public class Scratch.Services.CtagsSymbolOutline : Scratch.Services.SymbolOutlin
}
construct {
store.item_selected.connect ((selected) => {
if (selected == null) {
return;
}
doc.goto (((CtagsSymbol)selected).line);
store.selected = null;
});
}

Expand Down
5 changes: 5 additions & 0 deletions src/SymbolPane/Vala/ValaSymbolOutline.vala
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,12 @@ public class Scratch.Services.ValaSymbolOutline : Scratch.Services.SymbolOutline
resolver = new Code.Plugins.ValaSymbolResolver ();

store.item_selected.connect ((selected) => {
if (selected == null) {
return;
}

doc.goto (((ValaSymbolItem)selected).symbol.source_reference.begin.line);
store.selected = null;
});

doc.doc_closed.connect (doc_closed);
Expand Down

0 comments on commit c5c32fd

Please sign in to comment.