-
Notifications
You must be signed in to change notification settings - Fork 8.5k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add action for Quick Fix and key binding for Suggestions (#17502)
Adds a keybinding to open the quick fix menu, if one is available. When the action is used, we also open up the button (if it was collapsed) because that looks nice. The `showSuggestions` action is bound to `ctrl+shift+period` by default to align with VS' "quick actions" feature and VS Code's "quick fix" feature. This was chosen over binding to `quickFix` because it's more helpful. The quick fix button is a route for users that prefer to use the mouse. If users want to add a keybinding to activate the `quickFix` button, they can do that now. This PR also performs a bit of miscellaneous polish from the bug bash. This includes: - the suggestions UI now presents quick fixes first - scrolling may result in the button being drawn in the wrong place - The bug was tracked down this line: `TermControl::CursorPositionInDips()` --> `_core.CursorPosition()` --> `Terminal::GetViewportRelativeCursorPosition()`. The mutable viewport there does _not_ update when the user scrolls. Thus, the button would be drawn on the same position _on the screen_ even though we scrolled. To fix this, I include the `_scrollOffset` in the calculation. The only other place this function is used is with the suggestions UI, which does _not_ update the UIs position as we scroll (but if we're interested in doing that, we can now). Closes #17377
- Loading branch information
1 parent
1feb56e
commit 1999366
Showing
9 changed files
with
74 additions
and
21 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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