Fix f,t on soft-wrapped lines

Also remove the (dangerously confusing) display_map.find_while
This commit is contained in:
Conrad Irwin 2023-09-07 10:42:47 -06:00
parent c2c04616b4
commit 5f897f45a8
6 changed files with 76 additions and 132 deletions

View file

@ -295,14 +295,20 @@ impl Vim {
match Vim::read(cx).active_operator() {
Some(Operator::FindForward { before }) => {
let find = Motion::FindForward { before, text };
let find = Motion::FindForward {
before,
char: text.chars().next().unwrap(),
};
Vim::update(cx, |vim, _| {
vim.workspace_state.last_find = Some(find.clone())
});
motion::motion(find, cx)
}
Some(Operator::FindBackward { after }) => {
let find = Motion::FindBackward { after, text };
let find = Motion::FindBackward {
after,
char: text.chars().next().unwrap(),
};
Vim::update(cx, |vim, _| {
vim.workspace_state.last_find = Some(find.clone())
});