vim: Fix count handling to allow pre/post counts
Fixes 2yy, d3d, etc. For zed-industries/community#970 For zed-industries/community#1496
This commit is contained in:
parent
e8a6ecd6ac
commit
cee549e1ef
13 changed files with 175 additions and 54 deletions
|
@ -48,7 +48,7 @@ pub fn init(cx: &mut AppContext) {
|
|||
|
||||
fn scroll(cx: &mut ViewContext<Workspace>, by: fn(c: Option<f32>) -> ScrollAmount) {
|
||||
Vim::update(cx, |vim, cx| {
|
||||
let amount = by(vim.pop_number_operator(cx).map(|c| c as f32));
|
||||
let amount = by(vim.take_count().map(|c| c as f32));
|
||||
vim.update_active_editor(cx, |editor, cx| scroll_editor(editor, &amount, cx));
|
||||
})
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue