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.

Prevent inbuilt focus commands from running

+13 -7
+4 -1
jj_tui/bin/file_view.ml
··· 82 82 83 83 let hovered_var = ref "./" 84 84 85 - let file_view focus = 85 + let file_view ~focus summary_focus = 86 86 let file_uis = 87 87 let$ files = Lwd.get Vars.ui_state.jj_change_files in 88 88 files ··· 113 113 Show_view.(push_status (File_preview (Vars.get_hovered_rev (), hovered)))) 114 114 ~custom_handler:(fun ~selected:_ ~selectable_items:_ key -> 115 115 match key with 116 + | `Enter, [] -> 117 + Focus.request_reversable summary_focus; 118 + `Handled 116 119 | `ASCII k, [] -> 117 120 handleInputs command_mapping k 118 121 | _ ->
+4 -1
jj_tui/bin/graph_view.ml
··· 351 351 352 352 (*TODO:make a custom widget the renders the commit with and without selection. 353 353 with selection replace the dot with a blue version and slightly blue tint the background *) 354 - let graph_view ~focus () = 354 + let graph_view ~focus summary_focus () = 355 355 (*We have a seperate error var here instead of using a result type. This allows us to avoid using Lwd.bind which would cause our list selection to get reset anytime the content changes *) 356 356 let error_var = Lwd.var None in 357 357 let revset_ui = ··· 417 417 in 418 418 (* run commands when there is keybaord input*) 419 419 let handleKeys = function 420 + | `Enter, [] -> 421 + Focus.request_reversable summary_focus; 422 + `Handled 420 423 | `ASCII k, [] -> 421 424 handleInputs command_mapping k 422 425 | _ ->
+5 -5
jj_tui/bin/jj_ui.ml
··· 97 97 (*left side window stack*) 98 98 W.vbox 99 99 [ 100 - File_view.file_view file_focus 100 + File_view.file_view ~focus:file_focus summary_focus 101 101 (* |>$ Ui.resize ~w:5 ~sw:1 ~mw:1000 *) 102 102 |> W.is_focused ~focus:file_focus (fun ui focused -> 103 103 ui ··· 110 110 ~mh:(if focused then Int.min (ui |> Ui.layout_max_height) 12 else 2) 111 111 ~mw:1000) 112 112 |> W.Box.focusable ~focus:file_focus ~pad_h:0 ~pad_w:1 113 - ; Graph_view.graph_view ~focus:graph_focus () 113 + ; Graph_view.graph_view ~focus:graph_focus summary_focus () 114 114 |>$ Ui.resize ~sh:3 ~w:5 ~sw:1 ~mw:1000 ~h:10 ~mh:1000 115 115 |> W.Box.focusable ~focus:graph_focus ~pad_h:0 ~pad_w:1 116 116 ; W.Scroll.v_area (ui_state.jj_branches $-> Ui.atom) ··· 144 144 |> W.Overlay.selection_list_prompt_filterable 145 145 ~show_prompt_var:ui_state.show_string_selection_prompt 146 146 |> inputs ~custom:(function 147 - | `Enter, [] -> 148 - Focus.request_reversable summary_focus; 149 - `Handled 150 147 | `ASCII k, [] -> 151 148 Jj_commands.handleInputs Jj_commands.default_list k 149 + |`Arrow _,[`Meta]| `Tab, [`Meta]|`Tab, [`Meta;`Shift]-> 150 + (* block all normal focus keys *) 151 + `Handled 152 152 | _ -> 153 153 `Unhandled) 154 154 ;;