@@ -175,7 +175,7 @@ std::string EditorApp::get_version() {
175175 } else {
176176 version = " 0.0.0 (unknown)" ; // fallback if VERSION file missing
177177 }
178- return " pCode Editor version 0.2.74 (d6226fa )" + version;
178+ return " pCode Editor version 0.2.75 (814478e )" + version;
179179}
180180
181181// ============================================================================
@@ -481,6 +481,19 @@ void EditorApp::new_tab() {
481481 tabs_[active_tab_].active_split = 0 ;
482482}
483483
484+ void EditorApp::new_terminal_tab () {
485+ EditorTab tab;
486+ tab.display_name = " Terminal" ;
487+ tab.is_terminal = true ;
488+ tab.editor = nullptr ;
489+
490+ tabs_.push_back (std::move (tab));
491+ active_tab_ = (int )tabs_.size () - 1 ;
492+
493+ // Start terminal process for this tab
494+ if (!terminal_process_) start_terminal ();
495+ }
496+
484497void EditorApp::new_window () {
485498 // Launch a new instance of the same executable
486499 // Using execl is safer than system()
@@ -1990,6 +2003,12 @@ if (editor_open) {
19902003 ImGui::Separator ();
19912004 if (ImGui::MenuItem (" Toggle Explorer" , " Ctrl+B" )) show_file_tree_ = !show_file_tree_;
19922005 if (ImGui::MenuItem (" Toggle Terminal" , " Ctrl+`" )) show_terminal_ = !show_terminal_;
2006+ ImGui::Separator ();
2007+ if (ImGui::MenuItem (" Toggle Git" )) show_git_changes_ = !show_git_changes_;
2008+ if (ImGui::MenuItem (" Toggle Symbol" )) show_symbol_outline_ = !show_symbol_outline_;
2009+ ImGui::Separator ();
2010+ if (ImGui::MenuItem (" Toggle Line Numbers" , nullptr , (bool *)&settings_.show_line_numbers )) settings_.show_line_numbers = !settings_.show_line_numbers ;
2011+ if (ImGui::MenuItem (" Toggle Minimap" , nullptr , (bool *)&settings_.show_minimap )) settings_.show_minimap = !settings_.show_minimap ;
19932012 ImGui::EndPopup ();
19942013 }
19952014
@@ -2027,6 +2046,7 @@ void EditorApp::render_menu_bar() {
20272046void EditorApp::render_menu_file () {
20282047 if (ImGui::BeginMenu (" File" )) {
20292048 if (ImGui::MenuItem (" New Tab" , " Ctrl+N" )) new_tab ();
2049+ if (ImGui::MenuItem (" New Terminal" , " Ctrl+Shift+T" )) new_terminal_tab ();
20302050 if (ImGui::MenuItem (" New Window" , " Ctrl+Shift+N" )) new_window ();
20312051 if (ImGui::BeginMenu (" Open..." )) {
20322052 if (ImGui::MenuItem (" In New Tab" , " Ctrl+O" )) open_file (" " );
@@ -2289,6 +2309,11 @@ void EditorApp::render_about_dialog() {
22892309// Editor Area
22902310// ============================================================================
22912311void EditorApp::render_editor_area () {
2312+ if (active_tab_ >= 0 && active_tab_ < (int )tabs_.size () && tabs_[active_tab_].is_terminal ) {
2313+ render_terminal ();
2314+ return ;
2315+ }
2316+
22922317 // Editor area inside the Editor window (already opened)
22932318 if (ImGui::IsWindowFocused (ImGuiFocusedFlags_RootWindow)) {
22942319 editor_focused_ = true ;
@@ -2637,20 +2662,31 @@ void EditorApp::render_sidebar() {
26372662
26382663 static float explorer_width = 250 ;
26392664 static bool dragging = false ;
2665+ static int sidebar_view = 0 ; // 0=Files, 1=Git, 2=Symbol
26402666
26412667 // Explorer as a child window - fills full height
26422668 ImGui::BeginChild (" ##Explorer" , ImVec2 (explorer_width, -1 ), true , ImGuiWindowFlags_NoTitleBar);
26432669
2644- // Header with title and close button
2645- ImGui::Text (" Explorer" );
2670+ // Header with tabs and close button
2671+ if (ImGui::Button (" F##view" )) sidebar_view = 0 ;
2672+ ImGui::SameLine ();
2673+ if (ImGui::Button (" G##view" )) sidebar_view = 1 ;
2674+ ImGui::SameLine ();
2675+ if (ImGui::Button (" S##view" )) sidebar_view = 2 ;
26462676 ImGui::SameLine (ImGui::GetWindowWidth () - 30 );
26472677 if (ImGui::Button (" X" )) {
26482678 show_file_tree_ = false ;
26492679 }
26502680 ImGui::Separator ();
26512681
2652- // File tree
2653- render_file_tree ();
2682+ // Show selected view
2683+ if (sidebar_view == 0 ) {
2684+ render_file_tree ();
2685+ } else if (sidebar_view == 1 ) {
2686+ render_git_changes ();
2687+ } else {
2688+ render_symbol_outline ();
2689+ }
26542690
26552691 ImGui::EndChild ();
26562692
0 commit comments