File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff 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
843847function closeTab ( idx ) {
Original file line number Diff line number Diff 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+
451456window . explorerShow = async function ( ) {
452457 _scrollEl = document . getElementById ( 'explorer-tree' ) ;
453458 await explorerLoad ( ) ;
You can’t perform that action at this time.
0 commit comments