Add Go to line feature for the blame view by andrea-berling · Pull Request #2262 · gitui-org/gitui
Add new stackable popup to get a line number to go to from the user Add a new internal event to change the selection in the most recent blame view as a result of using the go to line popup Add new keybinding for the go to line functionality (Shift-L) Add boolean to BlameFilePopup to check whether the view is currently shadowed by the go to line popup and, if so, let the key events bubble up to the go to line popup Add new command definition for the go to line functionality in BlameFilePopup Add clamping of the selected row in set_open_selection
Add Context enum to keep the blame status across line jumps Add a context field to the GotoLinePopup Add blame field to BlameFilePopup Use the blame field in BlameFilePopup.open if not None
Add a context struct for the go to line popup to keep the max line number allowed Add support for negative values for the go to line popup input (go to the -n-th to last line) Make the go to line input box red when invalid values are provided Add an error message to the Go to line popup when invalid values are used Allow arbitrarily large values in the Go to line input box
The "Go to Line" popup was previously managed as a stackable popup, which added unnecessary complexity. This commit changes it to be a non-stackable popup, simplifying the interaction and removing it from the main popup stack management. This makes the code easier to reason about and maintain. This also simplifies the BlameFilePopup API by removing the now-redundant BlameRequest enum.
This commit removes a number of unused `#[derive(Debug)]` implementations across the codebase to reduce code size and improve compile times.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters