use std::ops::Range;
use gpui::Action;
#[derive(Clone, Debug, PartialEq)]
pub enum EditorAction {
Type(char),
Enter,
ShiftEnter,
ShiftAltEnter,
Tab,
ShiftTab,
Backspace,
Move(Direction),
Click {
offset: usize,
shift: bool,
click_count: usize,
},
Drag { offset: usize },
ToggleCheckbox { line_number: usize },
UpdateHover {
over_checkbox: bool,
over_link: bool,
hovered_github_ref_range: Option<Range<usize>>,
hovered_ref_position: Option<gpui::Point<gpui::Pixels>>,
},
OpenLink { url: String },
}
#[derive(Clone, Debug, PartialEq)]
pub enum Direction {
Left,
Right,
Up,
Down,
}
#[derive(Clone, PartialEq, Debug, Action)]
#[action(no_json)]
pub struct DispatchEditorAction(pub EditorAction);