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.

make update view fully async

+10 -2
+9 -1
jj_tui/bin/global_funcs.ml
··· 59 59 (* TODO: stop using dop last twice *) 60 60 Show_view.re_render (); 61 61 let files_list = Flock.fork_as_promise (fun _ -> list_files ~rev ()) in 62 - Vars.ui_state.jj_branches $= branches; 63 62 (*wait for all our tasks*) 64 63 let files_list = Promise.await files_list in 65 64 (*now we can assign our results*) 66 65 (* Vars.ui_state.jj_show $= log_res; *) 66 + Vars.ui_state.jj_branches $= branches; 67 67 Vars.ui_state.jj_change_files $= files_list) 68 68 ;; 69 + 70 + let current_computation = ref (Promise.of_value ()) 71 + 72 + let update_views_async ?(cause_snapshot = false) () = 73 + Promise.terminate_after ~seconds:0. !current_computation; 74 + let comp = Flock.fork_as_promise (fun () -> update_views ~cause_snapshot ()) in 75 + current_computation := comp 76 + ;;
+1 -1
jj_tui/bin/graph_view.ml
··· 437 437 (if Focus.peek_has_focus focus 438 438 then Show_view.(push_status (Graph_preview (Vars.get_hovered_rev ())))); 439 439 [%log debug "Hovered revision: '%s'" (Global_vars.get_unique_id hovered)]; 440 - Picos_std_structured.Flock.fork (fun () -> Global_funcs.update_views ())) 440 + Global_funcs.update_views_async ();) 441 441 ~custom_handler:(fun ~selected ~selectable_items key -> handleKeys key) 442 442 in 443 443 let final_ui =