Fix 0 used in a count

This commit is contained in:
Conrad Irwin 2023-09-12 09:56:23 -06:00
parent c2c521015a
commit 7daed1b2c3
15 changed files with 73 additions and 29 deletions

View file

@ -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.take_count().map(|c| c as f32));
let amount = by(vim.take_count(cx).map(|c| c as f32));
vim.update_active_editor(cx, |editor, cx| scroll_editor(editor, &amount, cx));
})
}