vim: Support za (#18421)
Closes #6822 Updates #5142 Release Notes: - Added new fold actions to toggle folds (`cmd-k cmd-l`), fold every fold (`cmd-k cmd-0`) unfold every fold (`cmd-k cmd-j`) to fold recursively (`cmd-k cmd-[`) and unfold recursively (`cmd-k cmd-]`). - vim: Added `za` to toggle fold under cursor. - vim: Added `zO`/`zC`/`zA` to open, close and toggle folds recursively (and fixed `zc` to not recurse into selections). - vim: Added `zR`/`zM` to open/close all folds in the buffer.
This commit is contained in:
parent
32605e9ea4
commit
1be3c44550
7 changed files with 179 additions and 6 deletions
|
@ -852,7 +852,7 @@ fn test_fold_action(cx: &mut TestAppContext) {
|
|||
_ = view.update(cx, |view, cx| {
|
||||
view.change_selections(None, cx, |s| {
|
||||
s.select_display_ranges([
|
||||
DisplayPoint::new(DisplayRow(8), 0)..DisplayPoint::new(DisplayRow(12), 0)
|
||||
DisplayPoint::new(DisplayRow(7), 0)..DisplayPoint::new(DisplayRow(12), 0)
|
||||
]);
|
||||
});
|
||||
view.fold(&Fold, cx);
|
||||
|
@ -940,7 +940,7 @@ fn test_fold_action_whitespace_sensitive_language(cx: &mut TestAppContext) {
|
|||
_ = view.update(cx, |view, cx| {
|
||||
view.change_selections(None, cx, |s| {
|
||||
s.select_display_ranges([
|
||||
DisplayPoint::new(DisplayRow(7), 0)..DisplayPoint::new(DisplayRow(10), 0)
|
||||
DisplayPoint::new(DisplayRow(6), 0)..DisplayPoint::new(DisplayRow(10), 0)
|
||||
]);
|
||||
});
|
||||
view.fold(&Fold, cx);
|
||||
|
@ -1022,7 +1022,7 @@ fn test_fold_action_multiple_line_breaks(cx: &mut TestAppContext) {
|
|||
_ = view.update(cx, |view, cx| {
|
||||
view.change_selections(None, cx, |s| {
|
||||
s.select_display_ranges([
|
||||
DisplayPoint::new(DisplayRow(7), 0)..DisplayPoint::new(DisplayRow(11), 0)
|
||||
DisplayPoint::new(DisplayRow(6), 0)..DisplayPoint::new(DisplayRow(11), 0)
|
||||
]);
|
||||
});
|
||||
view.fold(&Fold, cx);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue