refactor: move modal paste policy into editor input
This commit is contained in:
+1
-10
@@ -5,7 +5,7 @@ use std::{
|
||||
};
|
||||
|
||||
use crate::{
|
||||
editor::{Editor, Effect, Input, Invocation},
|
||||
editor::{Editor, Input, Invocation},
|
||||
ruby::{Config, RubyPlugin, load_config},
|
||||
};
|
||||
|
||||
@@ -77,15 +77,6 @@ impl EditorSession {
|
||||
}
|
||||
}
|
||||
|
||||
/// Applies frontend effects, such as the TUI's existing Insert-mode paste.
|
||||
/// Plugin results are applied internally by dispatch, with owner retirement
|
||||
/// on rejection; frontend effects have no plugin owner to retire.
|
||||
pub fn apply(&mut self, effects: Vec<Effect>) {
|
||||
if let Err(error) = self.editor.apply(effects) {
|
||||
self.editor.set_message(error);
|
||||
}
|
||||
}
|
||||
|
||||
fn dispatch(&mut self, invocation: Invocation) {
|
||||
let result = match self.plugins.get_mut(&invocation.plugin) {
|
||||
Some(plugin) => plugin
|
||||
|
||||
Reference in New Issue
Block a user