@@ -188,6 +188,10 @@ pub struct Editor {
188188 /// Whether file explorer is visible
189189 file_explorer_visible : bool ,
190190
191+ /// Whether file explorer is being synced to active file (async operation in progress)
192+ /// When true, we still render the file explorer area even if file_explorer is temporarily None
193+ file_explorer_sync_in_progress : bool ,
194+
191195 /// File explorer width as percentage (0.0 to 1.0)
192196 /// This is the runtime value that can be modified by dragging the border
193197 file_explorer_width_percent : f32 ,
@@ -693,6 +697,7 @@ impl Editor {
693697 file_explorer : None ,
694698 fs_manager,
695699 file_explorer_visible : false ,
700+ file_explorer_sync_in_progress : false ,
696701 file_explorer_width_percent : file_explorer_width,
697702 mouse_enabled : true ,
698703 mouse_cursor_position : None ,
@@ -2567,8 +2572,8 @@ impl Editor {
25672572 // Use effective_tabs_width() to account for file explorer taking 30% of width
25682573 self . ensure_active_tab_visible ( active_split, buffer_id, self . effective_tabs_width ( ) ) ;
25692574
2570- // Sync file explorer to the new active file (if visible and applicable)
2571- self . sync_file_explorer_to_active_file ( ) ;
2575+ // Note: We don't sync file explorer here to avoid flicker during tab switches.
2576+ // File explorer syncs when explicitly focused via focus_file_explorer().
25722577
25732578 // Emit buffer_activated hook for plugins
25742579 self . plugin_manager . run_hook (
@@ -2622,7 +2627,8 @@ impl Editor {
26222627 view_state. add_buffer ( buffer_id) ;
26232628 view_state. previous_buffer = Some ( previous_buffer) ;
26242629 }
2625- self . sync_file_explorer_to_active_file ( ) ;
2630+ // Note: We don't sync file explorer here to avoid flicker during split focus changes.
2631+ // File explorer syncs when explicitly focused via focus_file_explorer().
26262632 }
26272633 } else {
26282634 // Same split, different buffer (tab switch) - use set_active_buffer for terminal resume
0 commit comments