fix breadcrumb lookahead lookbehind
- SHA
76872604b470abf04b137f07dc379b6eb5831ba0- Parents
-
901312a - Tree
30bd299
7687260
76872604b470abf04b137f07dc379b6eb5831ba0901312a
30bd299| Status | File | + | - |
|---|---|---|---|
| M |
src/gui/gtk_app.f90
|
20 | 4 |
src/gui/gtk_app.f90modified@@ -1016,8 +1016,16 @@ contains | ||
| 1016 | 1016 | |
| 1017 | 1017 | print *, " Updating breadcrumb for: ", trim(current_view%path) |
| 1018 | 1018 | |
| 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 | |
| 1021 | 1029 | |
| 1022 | 1030 | ! Trigger treemap redraw |
| 1023 | 1031 | if (c_associated(drawing_area_ptr)) then |
@@ -2226,9 +2234,17 @@ contains | ||
| 2226 | 2234 | ! Invalidate layout to force recalculation |
| 2227 | 2235 | call invalidate_layout() |
| 2228 | 2236 | |
| 2229 | - ! Update breadcrumbs after scan (use pending_scan_path) | |
| 2237 | + ! Update breadcrumbs after scan (use pending_scan_path with forward lookahead if available) | |
| 2230 | 2238 | 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 | |
| 2232 | 2248 | end if |
| 2233 | 2249 | |
| 2234 | 2250 | ! Update status bar with file statistics |