@@ -2031,8 +2031,8 @@ ImGui::EndMenu();
20312031// Editor Area
20322032// ============================================================================
20332033void EditorApp::render_editor_area () {
2034- // Editor window - dockable and can float
2035- ImGui::Begin (" Editor" , nullptr , ImGuiWindowFlags_NoTitleBar | ImGuiWindowFlags_NoCollapse | ImGuiWindowFlags_NoResize | ImGuiWindowFlags_NoMove );
2034+ // Editor window - can float and dock
2035+ ImGui::Begin (" Editor" , nullptr , ImGuiWindowFlags_NoTitleBar | ImGuiWindowFlags_NoCollapse);
20362036
20372037 if (ImGui::IsWindowFocused (ImGuiFocusedFlags_RootWindow)) {
20382038 editor_focused_ = true ;
@@ -2688,7 +2688,6 @@ void EditorApp::render_status_bar() {
26882688 auto pos = editor ? editor->GetCursorPosition () : TextEditor::Coordinates ();
26892689
26902690 const char * mode_str = get_vim_mode_str ();
2691- const char * sep = " | " ;
26922691
26932692 // Get directory info
26942693 std::string dir_info = " ." ;
@@ -2704,29 +2703,75 @@ void EditorApp::render_status_bar() {
27042703 }
27052704 }
27062705
2706+ // Status bar sections
2707+ const char * sep = " | " ;
2708+
2709+ // Mode: NORMAL/INSERT
27072710 ImGui::Text (" %s" , mode_str);
27082711 ImGui::SameLine ();
27092712 ImGui::Text (" %s" , sep);
27102713 ImGui::SameLine ();
2714+
2715+ // Filename with dirty indicator
2716+ std::string display = tab.display_name + (tab.dirty ? " *" : " " );
2717+ ImGui::Text (" %s" , display.c_str ());
2718+ ImGui::SameLine ();
2719+ ImGui::Text (" %s" , sep);
2720+ ImGui::SameLine ();
2721+
2722+ // Line and column
27112723 ImGui::Text (" Ln %d, Col %d" , pos.mLine + 1 , pos.mColumn + 1 );
27122724 ImGui::SameLine ();
27132725 ImGui::Text (" %s" , sep);
27142726 ImGui::SameLine ();
2715- ImGui::Text (" %s" , tab.file_encoding .c_str ());
2727+
2728+ // Git branch or directory
2729+ ImGui::Text (" Git: %s" , dir_info.c_str ());
27162730 ImGui::SameLine ();
27172731 ImGui::Text (" %s" , sep);
27182732 ImGui::SameLine ();
2719- ImGui::Text (" %s" , tab.line_ending .c_str ());
2733+
2734+ // Encoding (read-only display)
2735+ ImGui::Text (" %s" , tab.file_encoding .c_str ());
27202736 ImGui::SameLine ();
27212737 ImGui::Text (" %s" , sep);
27222738 ImGui::SameLine ();
2723- ImGui::Text (" %d%%" , tabs_[active_tab_].zoom_pct );
2739+
2740+ // Line ending - clickable popup
2741+ std::string le_id = tab.line_ending ;
2742+ if (ImGui::Selectable (le_id.c_str (), false )) {
2743+ ImGui::OpenPopup (" LineEndingPopup" );
2744+ }
2745+ if (ImGui::BeginPopup (" LineEndingPopup" )) {
2746+ if (ImGui::MenuItem (" LF" , nullptr , tab.line_ending == " LF" )) { tab.line_ending = " LF" ; }
2747+ if (ImGui::MenuItem (" CRLF" , nullptr , tab.line_ending == " CRLF" )) { tab.line_ending = " CRLF" ; }
2748+ if (ImGui::MenuItem (" CR" , nullptr , tab.line_ending == " CR" )) { tab.line_ending = " CR" ; }
2749+ ImGui::EndPopup ();
2750+ }
27242751 ImGui::SameLine ();
27252752 ImGui::Text (" %s" , sep);
27262753 ImGui::SameLine ();
2727- ImGui::Text (" %s" , tab.display_name .c_str ());
2754+
2755+ // Tab size - clickable popup
2756+ std::string tab_id = " Tab: " + std::to_string (settings_.tab_size );
2757+ if (ImGui::Selectable (tab_id.c_str (), false )) {
2758+ ImGui::OpenPopup (" TabSizePopup" );
2759+ }
2760+ if (ImGui::BeginPopup (" TabSizePopup" )) {
2761+ for (int i = 1 ; i <= 8 ; i++) {
2762+ if (ImGui::MenuItem ((" Tab: " + std::to_string (i)).c_str (), nullptr , settings_.tab_size == i)) {
2763+ settings_.tab_size = i;
2764+ for (auto & t : tabs_) t.editor ->SetTabSize (i);
2765+ }
2766+ }
2767+ ImGui::EndPopup ();
2768+ }
27282769 ImGui::SameLine ();
2729- ImGui::Text (" | v0.2.28" );
2770+ ImGui::Text (" %s" , sep);
2771+ ImGui::SameLine ();
2772+
2773+ // Version
2774+ ImGui::Text (" v0.2.28" );
27302775 }
27312776
27322777 ImGui::PopStyleColor ();
0 commit comments