Re-implement actions as derive macros instead of blanket impls
This commit is contained in:
parent
a0e976599c
commit
4de2c0f7ef
22 changed files with 360 additions and 288 deletions
|
@ -9,7 +9,7 @@ pub mod terminal_panel;
|
|||
// use crate::terminal_element::TerminalElement;
|
||||
use editor::{scroll::autoscroll::Autoscroll, Editor};
|
||||
use gpui::{
|
||||
actions, div, img, red, register_action, AnyElement, AppContext, Component, DispatchPhase, Div,
|
||||
actions, div, img, red, Action, AnyElement, AppContext, Component, DispatchPhase, Div,
|
||||
EventEmitter, FocusEvent, FocusHandle, Focusable, FocusableComponent, FocusableView,
|
||||
InputHandler, InteractiveComponent, KeyDownEvent, Keystroke, Model, MouseButton,
|
||||
ParentComponent, Pixels, Render, SharedString, Styled, Task, View, ViewContext, VisualContext,
|
||||
|
@ -55,12 +55,10 @@ const CURSOR_BLINK_INTERVAL: Duration = Duration::from_millis(500);
|
|||
#[derive(Clone, Debug, PartialEq)]
|
||||
pub struct ScrollTerminal(pub i32);
|
||||
|
||||
#[register_action]
|
||||
#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
|
||||
#[derive(Clone, Debug, Default, Deserialize, PartialEq, Action)]
|
||||
pub struct SendText(String);
|
||||
|
||||
#[register_action]
|
||||
#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
|
||||
#[derive(Clone, Debug, Default, Deserialize, PartialEq, Action)]
|
||||
pub struct SendKeystroke(String);
|
||||
|
||||
actions!(Clear, Copy, Paste, ShowCharacterPalette, SearchTest);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue