Feat: UI / UX fixes
This commit is contained in:
@@ -383,19 +383,19 @@ pub(super) fn handle_modal_input(ctx: &mut InputContext, key: KeyEvent) -> Input
|
||||
KeyCode::Char('c') if ctrl => {
|
||||
ctx.app.editor_ctx.editor.copy();
|
||||
let text = ctx.app.editor_ctx.editor.yank_text();
|
||||
if let Some(clip) = &mut ctx.app.clipboard {
|
||||
if let Ok(mut clip) = arboard::Clipboard::new() {
|
||||
let _ = clip.set_text(text);
|
||||
}
|
||||
}
|
||||
KeyCode::Char('x') if ctrl => {
|
||||
ctx.app.editor_ctx.editor.cut();
|
||||
let text = ctx.app.editor_ctx.editor.yank_text();
|
||||
if let Some(clip) = &mut ctx.app.clipboard {
|
||||
if let Ok(mut clip) = arboard::Clipboard::new() {
|
||||
let _ = clip.set_text(text);
|
||||
}
|
||||
}
|
||||
KeyCode::Char('v') if ctrl => {
|
||||
if let Some(clip) = &mut ctx.app.clipboard {
|
||||
if let Ok(mut clip) = arboard::Clipboard::new() {
|
||||
if let Ok(text) = clip.get_text() {
|
||||
ctx.app.editor_ctx.editor.set_yank_text(text);
|
||||
}
|
||||
@@ -417,14 +417,6 @@ pub(super) fn handle_modal_input(ctx: &mut InputContext, key: KeyEvent) -> Input
|
||||
crate::services::stack_preview::update_cache(&ctx.app.editor_ctx);
|
||||
}
|
||||
}
|
||||
Modal::Preview => match key.code {
|
||||
KeyCode::Esc | KeyCode::Char('p') => ctx.dispatch(AppCommand::CloseModal),
|
||||
KeyCode::Left => ctx.dispatch(AppCommand::PrevStep),
|
||||
KeyCode::Right => ctx.dispatch(AppCommand::NextStep),
|
||||
KeyCode::Up => ctx.dispatch(AppCommand::StepUp),
|
||||
KeyCode::Down => ctx.dispatch(AppCommand::StepDown),
|
||||
_ => {}
|
||||
},
|
||||
Modal::PatternProps {
|
||||
bank,
|
||||
pattern,
|
||||
|
||||
Reference in New Issue
Block a user