mirror of
https://github.com/ckaczor/azuredatastudio.git
synced 2026-02-16 10:58:30 -05:00
open resource only when it's file (#11815)
This commit is contained in:
@@ -225,7 +225,7 @@ export class NotebookSearchView extends SearchView {
|
|||||||
this.toggleCollapseStateDelayer.trigger(() => this.toggleExpandAction.onTreeCollapseStateChange())
|
this.toggleCollapseStateDelayer.trigger(() => this.toggleExpandAction.onTreeCollapseStateChange())
|
||||||
));
|
));
|
||||||
this.treeSelectionChangeListener = this._register(this.tree.onDidChangeSelection(async (e) => {
|
this.treeSelectionChangeListener = this._register(this.tree.onDidChangeSelection(async (e) => {
|
||||||
if (this.tree.getSelection().length) {
|
if (this.tree.getSelection().length && this.tree.getSelection()[0] instanceof FileMatch) {
|
||||||
let element = this.tree.getSelection()[0] as Match;
|
let element = this.tree.getSelection()[0] as Match;
|
||||||
const resource = element instanceof Match ? element.parent().resource : (<FileMatch>element).resource;
|
const resource = element instanceof Match ? element.parent().resource : (<FileMatch>element).resource;
|
||||||
if (resource.fsPath.endsWith('.md')) {
|
if (resource.fsPath.endsWith('.md')) {
|
||||||
|
|||||||
Reference in New Issue
Block a user