fortrangoingonforty/sniffly / 7687260

Browse files

fix breadcrumb lookahead lookbehind

Authored by espadonne
SHA
76872604b470abf04b137f07dc379b6eb5831ba0
Parents
901312a
Tree
30bd299

1 changed file

StatusFile+-
M src/gui/gtk_app.f90 20 4
src/gui/gtk_app.f90modified
@@ -1016,8 +1016,16 @@ contains
10161016
 
10171017
     print *, "  Updating breadcrumb for: ", trim(current_view%path)
10181018
 
1019
-    ! Update breadcrumb cache
1020
-    call update_breadcrumb_cache(trim(current_view%path))
1019
+    ! Update breadcrumb cache (with forward lookahead if available)
1020
+    block
1021
+      character(len=512) :: fwd_path
1022
+      fwd_path = get_forward_path()
1023
+      if (len_trim(fwd_path) > 0) then
1024
+        call update_breadcrumb_cache(trim(current_view%path), trim(fwd_path))
1025
+      else
1026
+        call update_breadcrumb_cache(trim(current_view%path))
1027
+      end if
1028
+    end block
10211029
 
10221030
     ! Trigger treemap redraw
10231031
     if (c_associated(drawing_area_ptr)) then
@@ -2226,9 +2234,17 @@ contains
22262234
     ! Invalidate layout to force recalculation
22272235
     call invalidate_layout()
22282236
 
2229
-    ! Update breadcrumbs after scan (use pending_scan_path)
2237
+    ! Update breadcrumbs after scan (use pending_scan_path with forward lookahead if available)
22302238
     if (len_trim(pending_scan_path) > 0) then
2231
-      call update_breadcrumb_cache(trim(pending_scan_path))
2239
+      block
2240
+        character(len=512) :: fwd_path
2241
+        fwd_path = get_forward_path()
2242
+        if (len_trim(fwd_path) > 0) then
2243
+          call update_breadcrumb_cache(trim(pending_scan_path), trim(fwd_path))
2244
+        else
2245
+          call update_breadcrumb_cache(trim(pending_scan_path))
2246
+        end if
2247
+      end block
22322248
     end if
22332249
 
22342250
     ! Update status bar with file statistics