Helix Select Mode (#37748)
Please credit @eliaperantoni, for the original PR (#34136). Merge after (#34060) to avoid conflicts. Closes https://github.com/zed-industries/zed/issues/33838 Closes https://github.com/zed-industries/zed/issues/33906 Release Notes: - Helix will no longer sometimes fall out into "normal" mode, will remain in "helix normal" (example: vv) - Added dedicated "helix select" mode that can be targeted by keybindings Known issues: - [ ] Helix motion, especially surround-add will not properly work in visual mode, as it won't call `helix_move_cursor`. It is possible however to respect self.mode in change_selection now. - [ ] Some operations, such as `Ctrl+A` (increment) or `>` (indent) will collapse selection also. I haven't found a way to avoid it. --------- Co-authored-by: fantacell <ghub@giggo.de> Co-authored-by: Conrad Irwin <conrad.irwin@gmail.com>
This commit is contained in:
co-authored by
fantacell
Conrad Irwin
parent
a577128163
commit
cba9ff55c7
@@ -212,7 +212,7 @@ impl Vim {
|
||||
}
|
||||
}
|
||||
|
||||
Mode::HelixNormal => {
|
||||
Mode::HelixNormal | Mode::HelixSelect => {
|
||||
if selection.is_empty() {
|
||||
// Handle empty selection by operating on the whole word
|
||||
let (word_range, _) = snapshot.surrounding_word(selection.start, false);
|
||||
|
||||
Reference in New Issue
Block a user