Rework mouse handling of git hunks diff (#14727)
Closes https://github.com/zed-industries/zed/issues/12404   Video: https://github.com/user-attachments/assets/58e62527-da75-4017-a43e-a37803bd7b49 * now shows a context menu on left click instead of expanding the hunk diff * hunk diffs can be toggled with a single cmd-click still * adds a X mark into gutter for every hunk expanded * makes `editor::ToggleDiffHunk` to work inside the deleted hunk editors Additionally, changes the way editor context menus behave when the editor is scrolled — right click and diff hunks context menu now will stick to the place it was invoked at, instead of staying onscreen at the same pixel positions. Release Notes: - Improved the way git hunks diff can be toggled with mouse ([#12404](https://github.com/zed-industries/zed/issues/12404)) --------- Co-authored-by: Nate Butler <nate@zed.dev> Co-authored-by: Conrad Irwin <conrad@zed.dev>
This commit is contained in:
parent
bf4645b1fe
commit
18c2e8f6ca
6 changed files with 628 additions and 169 deletions
|
@ -319,7 +319,7 @@ impl GroupedDiagnosticsEditor {
|
|||
|| server_to_update.map_or(false, |to_update| *server_id != to_update)
|
||||
});
|
||||
|
||||
// TODO kb change selections as in the old panel, to the next primary diagnostics
|
||||
// TODO change selections as in the old panel, to the next primary diagnostics
|
||||
// TODO make [shift-]f8 to work, jump to the next block group
|
||||
let _was_empty = self.path_states.is_empty();
|
||||
let path_ix = match self.path_states.binary_search_by(|probe| {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue