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:
Max Brunsfeld 2024-01-03 10:42:49 -08:00
parent 37e6533b28
commit 252694390a
185 changed files with 1933 additions and 29192 deletions

View file

@ -1,5 +1,5 @@
use editor::movement;
use gpui::{actions, AppContext, WindowContext};
use gpui::{actions, ViewContext, WindowContext};
use language::Point;
use workspace::Workspace;
@ -7,8 +7,8 @@ use crate::{motion::Motion, utils::copy_selections_content, Mode, Vim};
actions!(vim, [Substitute, SubstituteLine]);
pub(crate) fn init(cx: &mut AppContext) {
cx.add_action(|_: &mut Workspace, _: &Substitute, cx| {
pub(crate) fn register(workspace: &mut Workspace, _: &mut ViewContext<Workspace>) {
workspace.register_action(|_: &mut Workspace, _: &Substitute, cx| {
Vim::update(cx, |vim, cx| {
vim.start_recording(cx);
let count = vim.take_count(cx);
@ -16,7 +16,7 @@ pub(crate) fn init(cx: &mut AppContext) {
})
});
cx.add_action(|_: &mut Workspace, _: &SubstituteLine, cx| {
workspace.register_action(|_: &mut Workspace, _: &SubstituteLine, cx| {
Vim::update(cx, |vim, cx| {
vim.start_recording(cx);
if matches!(vim.state().mode, Mode::VisualBlock | Mode::Visual) {