@@ -159,7 +159,7 @@ static void settings_load(AppSettings& s, const std::string& path) {
159159// Version
160160// ============================================================================
161161std::string EditorApp::get_version () {
162- return " pCode Editor version 0.2.34 " ;
162+ return " pCode Editor version 0.2.35 " ;
163163}
164164
165165// ============================================================================
@@ -2195,9 +2195,10 @@ bool show_margins = settings_.show_bookmark_margin || settings_.show_change_hist
21952195 int max_line = total_lines;
21962196 int digit_count = 1 ;
21972197 while (max_line >= 10 ) { max_line /= 10 ; digit_count++; }
2198- float gutter_width = 16 .0f + (digit_count * 8 .0f ) + 8 .0f ; // padding + digits + margin
2198+ float line_num_width = digit_count * 8 .0f + 8 .0f ;
2199+ float gutter_width = line_num_width + 48 .0f ; // line numbers + markers on right
21992200
2200- // Build markers for lookup (using vector search is fine for small sets)
2201+ // Build markers for lookup
22012202 auto & bookmarks = tab.bookmarks ;
22022203 auto & changed_lines = tab.changed_lines ;
22032204 auto & folds = tab.folds ;
@@ -2262,23 +2263,24 @@ bool show_margins = settings_.show_bookmark_margin || settings_.show_change_hist
22622263 for (int line = 0 ; line < total_lines; line++) {
22632264 ImGui::PushID (line);
22642265
2265- // Right-align line numbers with padding
2266+ // Line numbers on LEFT side
22662267 if (settings_.show_line_numbers ) {
22672268 int line_display = line + 1 ;
22682269 char line_num[16 ];
22692270 sprintf (line_num, " %*d" , digit_count, line_display);
22702271
2271- // Check if current line for highlight
22722272 bool is_current_line = (line == editor->GetCursorPosition ().mLine );
22732273 if (is_current_line) {
22742274 ImGui::TextColored (ImVec4 (1 .0f , 1 .0f , 0 .4f , 1 .0f ), line_num);
22752275 } else {
22762276 ImGui::TextColored (ImVec4 (0 .4f , 0 .4f , 0 .5f , 1 .0f ), line_num);
22772277 }
2278- ImGui::SameLine ();
22792278 }
22802279
2281- // Bookmark column (far left, 16px)
2280+ // Move to right side of gutter
2281+ ImGui::SetCursorPosX (ImGui::GetItemRectMin ().x + line_num_width);
2282+
2283+ // Bookmark column (right side)
22822284 if (settings_.show_bookmark_margin ) {
22832285 bool is_bookmarked = std::find (bookmarks.begin (), bookmarks.end (), line) != bookmarks.end ();
22842286 if (is_bookmarked) {
@@ -2289,7 +2291,7 @@ bool show_margins = settings_.show_bookmark_margin || settings_.show_change_hist
22892291 ImGui::SameLine ();
22902292 }
22912293
2292- // Change history indicator (shows modified lines in green/red )
2294+ // Change history indicator (right side )
22932295 if (settings_.show_change_history ) {
22942296 bool is_changed = std::find (changed_lines.begin (), changed_lines.end (), line) != changed_lines.end ();
22952297 if (is_changed) {
@@ -2298,7 +2300,7 @@ bool show_margins = settings_.show_bookmark_margin || settings_.show_change_hist
22982300 ImGui::SameLine ();
22992301 }
23002302
2301- // Fold indicator (+ or - )
2303+ // Fold indicator (rightmost )
23022304 bool is_fold_start = false , is_fold_end = false ;
23032305 for (const auto & f : folds) {
23042306 if (f.first == line) is_fold_start = true ;
@@ -2799,7 +2801,7 @@ void EditorApp::render_status_bar() {
27992801 ImGui::SameLine ();
28002802
28012803 // Version with git hash
2802- ImGui::Text (" v0.2.35 " );
2804+ ImGui::Text (" v0.2.36 " );
28032805 }
28042806
28052807ImGui::PopStyleColor ();
0 commit comments