terminal user interface to jujutsu. Focused on speed and clarity
9
fork

Configure Feed

Select the types of activity you want to include in your feed.

refresh file browser after commit updates

+14 -11
+5
jj_tui/bin/file_view.ml
··· 73 73 `Unhandled) 74 74 in 75 75 let$ ui = ui 76 + and$ files = Lwd.get Vars.ui_state.jj_change_files 76 77 and$ _ = 77 78 Focus.status focus |>$ fun focus -> 78 79 if Focus.has_focus focus 79 80 then Show_view.(push_status (File_preview (Vars.get_hovered_rev (), !hovered_var))) 80 81 in 82 + if files |> List.length = 0 && (Lwd.peek active_files <> [ "" ] || !hovered_var <> "") 83 + then ( 84 + Lwd.set active_files [ "" ]; 85 + hovered_var := ""); 81 86 ui 82 87 ;; 83 88 end
+9 -11
jj_tui/bin/global_funcs.ml
··· 37 37 result |> Lwd.get 38 38 ;; 39 39 40 - (**Updates the status windows; Without snapshotting the working copy by default 41 - This should be called after any command that performs a change *) 42 - let update_status ?(update_graph = true) ?(cause_snapshot = false) () = 43 - safe_jj (fun () -> 44 - let rev = Lwd.peek Vars.ui_state.hovered_revision in 45 - let log_res = jj_no_log ~snapshot:cause_snapshot [ "log" ] |> colored_string in 46 - (* TODO: chagne this because it makes us always a frame behind *) 47 - if update_graph then Vars.ui_state.trigger_update $= ()) 48 - ;; 40 + let current_computation = ref (Promise.of_value ()) 49 41 50 42 (**Updates the status windows; Without snapshotting the working copy by default 51 43 This should be called after any command that performs a change *) ··· 69 61 Vars.ui_state.jj_change_files $= files_list) 70 62 ;; 71 63 72 - let current_computation = ref (Promise.of_value ()) 73 - 74 64 let update_views_async ?(cause_snapshot = false) () = 75 65 Promise.terminate_after ~seconds:0. !current_computation; 76 66 let comp = Flock.fork_as_promise (fun () -> update_views ~cause_snapshot ()) in 77 67 current_computation := comp 68 + ;; 69 + 70 + (**Updates the status windows; Without snapshotting the working copy by default 71 + This should be called after any command that performs a change *) 72 + let update_status ?(update_graph = true) ?(cause_snapshot = false) () = 73 + (* Keep graph redraw immediate, and refresh file/browser state asynchronously. *) 74 + if update_graph then Vars.ui_state.trigger_update $= (); 75 + update_views_async ~cause_snapshot () 78 76 ;; 79 77 80 78 let last_op_id = ref ""