Fixed some neovim test context issues, added repeated commands in vim mode, and ported some tests to use the neovim testing strategy

This commit is contained in:
K Simmons 2022-10-08 21:20:47 -07:00
parent b82db3a254
commit 515c1ea123
971 changed files with 838 additions and 11898 deletions

View file

@ -3,7 +3,7 @@ use collections::{HashMap, HashSet};
use editor::{display_map::ToDisplayPoint, Autoscroll, Bias};
use gpui::MutableAppContext;
pub fn delete_motion(vim: &mut Vim, motion: Motion, cx: &mut MutableAppContext) {
pub fn delete_motion(vim: &mut Vim, motion: Motion, times: usize, cx: &mut MutableAppContext) {
vim.update_active_editor(cx, |editor, cx| {
editor.transact(cx, |editor, cx| {
editor.set_clip_at_line_ends(false, cx);
@ -11,8 +11,8 @@ pub fn delete_motion(vim: &mut Vim, motion: Motion, cx: &mut MutableAppContext)
editor.change_selections(Some(Autoscroll::Fit), cx, |s| {
s.move_with(|map, selection| {
let original_head = selection.head();
motion.expand_selection(map, selection, true);
original_columns.insert(selection.id, original_head.column());
motion.expand_selection(map, selection, times, true);
});
});
copy_selections_content(editor, motion.linewise(), cx);