Remove 2 suffix for vim, diagnostics, go_to_line, theme_selector, command_palette, file_finder
Co-authored-by: Mikayla <mikayla@zed.dev>
This commit is contained in:
parent
37e6533b28
commit
252694390a
185 changed files with 1933 additions and 29192 deletions
|
@ -1,7 +1,7 @@
|
|||
use std::ops::Range;
|
||||
|
||||
use editor::{scroll::autoscroll::Autoscroll, MultiBufferSnapshot, ToOffset, ToPoint};
|
||||
use gpui::{impl_actions, AppContext, WindowContext};
|
||||
use gpui::{impl_actions, ViewContext, WindowContext};
|
||||
use language::{Bias, Point};
|
||||
use serde::Deserialize;
|
||||
use workspace::Workspace;
|
||||
|
@ -24,8 +24,8 @@ struct Decrement {
|
|||
|
||||
impl_actions!(vim, [Increment, Decrement]);
|
||||
|
||||
pub fn init(cx: &mut AppContext) {
|
||||
cx.add_action(|_: &mut Workspace, action: &Increment, cx| {
|
||||
pub fn register(workspace: &mut Workspace, _: &mut ViewContext<Workspace>) {
|
||||
workspace.register_action(|_: &mut Workspace, action: &Increment, cx| {
|
||||
Vim::update(cx, |vim, cx| {
|
||||
vim.record_current_action(cx);
|
||||
let count = vim.take_count(cx).unwrap_or(1);
|
||||
|
@ -33,7 +33,7 @@ pub fn init(cx: &mut AppContext) {
|
|||
increment(vim, count as i32, step, cx)
|
||||
})
|
||||
});
|
||||
cx.add_action(|_: &mut Workspace, action: &Decrement, cx| {
|
||||
workspace.register_action(|_: &mut Workspace, action: &Decrement, cx| {
|
||||
Vim::update(cx, |vim, cx| {
|
||||
vim.record_current_action(cx);
|
||||
let count = vim.take_count(cx).unwrap_or(1);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue