@@ -175,7 +175,7 @@ std::string EditorApp::get_version() {
175175 } else {
176176 version = " BUG-merang!!!" ; // fallback if VERSION file missing
177177 }
178- return " pCode Editor version " + version;
178+ return " pCode Editor version 0.2.72 (8c21f94) " + version;
179179}
180180
181181// ============================================================================
@@ -2576,47 +2576,51 @@ bool show_margins = settings_.show_bookmark_margin || settings_.show_change_hist
25762576 }
25772577
25782578// ============================================================================
2579- // Sidebar - file explorer, git changes, and symbol outline
2579+ // Explorer - file tree with split pane behavior
25802580// ============================================================================
25812581void EditorApp::render_sidebar () {
25822582 if (!show_file_tree_) return ;
25832583
2584- static float sidebar_width = 200 ;
2584+ static float explorer_width = 250 ;
25852585 static bool dragging = false ;
25862586
2587- // Sidebar with resize handle
2588- ImGui::BeginChild (" ##Explorer" , ImVec2 (sidebar_width , -1 ), false , ImGuiWindowFlags_NoTitleBar);
2587+ // Explorer as a child window - fills full height
2588+ ImGui::BeginChild (" ##Explorer" , ImVec2 (explorer_width , -1 ), true , ImGuiWindowFlags_NoTitleBar);
25892589
2590- if (ImGui::BeginTabBar (" ##SidebarTabs" , ImGuiTabBarFlags_None)) {
2591- if (ImGui::BeginTabItem (" Files" , nullptr , ImGuiTabItemFlags_None)) {
2592- render_file_tree ();
2593- ImGui::EndTabItem ();
2594- }
2595- if (show_git_changes_ && ImGui::BeginTabItem (" Git" , nullptr , ImGuiTabItemFlags_None)) {
2596- render_git_changes ();
2597- ImGui::EndTabItem ();
2598- }
2599- if (show_symbol_outline_ && ImGui::BeginTabItem (" Symbols" , nullptr , ImGuiTabItemFlags_None)) {
2600- render_symbol_outline ();
2601- ImGui::EndTabItem ();
2602- }
2603- ImGui::EndTabBar ();
2590+ // Header with title and close button
2591+ ImGui::Text (" Explorer" );
2592+ ImGui::SameLine (ImGui::GetWindowWidth () - 30 );
2593+ if (ImGui::Button (" X" )) {
2594+ show_file_tree_ = false ;
26042595 }
2596+ ImGui::Separator ();
2597+
2598+ // File tree
2599+ render_file_tree ();
26052600
26062601 ImGui::EndChild ();
26072602
2608- // Resizable splitter - drag to resize sidebar
2609- float available_height = ImGui::GetContentRegionAvail ().y ;
2610- ImGui::InvisibleButton (" ##Splitter" , ImVec2 (6 , available_height > 0 ? available_height : 200 ));
2603+ // Draggable splitter between explorer and editor
2604+ float avail_h = ImGui::GetContentRegionAvail ().y ;
2605+ ImGui::SameLine ();
2606+ ImGui::PushStyleVar (ImGuiStyleVar_FramePadding, ImVec2 (0 , avail_h / 2 ));
2607+ ImGui::InvisibleButton (" ##ExplorerSplitter" , ImVec2 (4 , -1 ));
2608+ ImGui::PopStyleVar ();
2609+
26112610 if (ImGui::IsItemHovered ()) {
2612- ImGui::SetMouseCursor (ImGuiMouseCursor_ResizeEW);
2611+ ImGui::SetMouseCursor (settings_. explorer_left ? ImGuiMouseCursor_ResizeEW : ImGuiMouseCursor_ResizeEW);
26132612 }
26142613 if (ImGui::IsItemClicked (0 )) {
26152614 dragging = true ;
26162615 }
26172616 if (dragging && ImGui::IsMouseDown (0 )) {
2618- sidebar_width += ImGui::GetIO ().MouseDelta .x ;
2619- sidebar_width = (sidebar_width < 100 ) ? 100 : (sidebar_width > 400 ) ? 400 : sidebar_width;
2617+ float delta = ImGui::GetIO ().MouseDelta .x ;
2618+ if (settings_.explorer_left ) {
2619+ explorer_width += delta;
2620+ } else {
2621+ explorer_width -= delta;
2622+ }
2623+ explorer_width = std::clamp (explorer_width, 150 .0f , 500 .0f );
26202624 } else {
26212625 dragging = false ;
26222626 }
0 commit comments