Skip to content

Commit e1048ff

Browse files
committed
wip
wip
1 parent bd45d29 commit e1048ff

2 files changed

Lines changed: 9 additions & 0 deletions

File tree

static/js/editor.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -838,6 +838,10 @@ async function switchTab(idx) {
838838
id('ifdef-ui').style.display = isC ? 'flex' : 'none';
839839
if(!isC) clearIfdefHighlight();
840840
renderTabs();
841+
// エクスプローラパネルが表示中なら連動してファイルを選択
842+
if(document.getElementById('explorer-panel')?.classList.contains('visible')) {
843+
window.explorerRevealFile?.(tab.file);
844+
}
841845
}
842846

843847
function closeTab(idx) {

static/js/explorer.js

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -448,6 +448,11 @@ window.initExplorer = async function() {
448448
updateRootName();
449449
};
450450

451+
window.explorerRevealFile = function(absPath) {
452+
if (!absPath) return;
453+
revealFolderInTree(absPath);
454+
};
455+
451456
window.explorerShow = async function() {
452457
_scrollEl = document.getElementById('explorer-tree');
453458
await explorerLoad();

0 commit comments

Comments
 (0)