Make word deletions less greedy (#37352)
Closes https://github.com/zed-industries/zed/issues/37144 Adjusts `editor::DeleteToPreviousWordStart`, `editor::DeleteToNextWordEnd`, `editor::DeleteToNextSubwordEnd` and `editor::DeleteToPreviousSubwordStart` actions to * take whitespace sequences with length >= 2 into account and stop after removing them (whilst movement would also include the word after such sequences) * take current language's brackets into account and stop after removing the text before them The latter is configurable and can be disabled with `"ignore_brackets": true` parameter in the action. Release Notes: - Improved word deletions to consider whitespace sequences and brackets by default
This commit is contained in:
@@ -1250,6 +1250,7 @@ struct InjectionPatternConfig {
|
||||
combined: bool,
|
||||
}
|
||||
|
||||
#[derive(Debug)]
|
||||
struct BracketsConfig {
|
||||
query: Query,
|
||||
open_capture_ix: u32,
|
||||
|
||||
Reference in New Issue
Block a user