feat: add insert command to paste spotify links (#277)

* feat: add insert command to paste spotify links

- use Ctrl-v to paste from clipboard or use :insert without an argument

* fix: handle paste on disabled clipboard feature

* fix: handle wrong URIs

Co-authored-by: Henrik Friedrichsen <henrik@affekt.org>
This commit is contained in:
Bolli
2020-10-09 19:26:52 +02:00
committed by GitHub
parent f2b4f01242
commit 79093eca1e
6 changed files with 81 additions and 0 deletions

View File

@@ -184,6 +184,7 @@ impl CommandManager {
| Command::Delete
| Command::Back
| Command::Open(_)
| Command::Insert(_)
| Command::Goto(_) => Ok(None),
_ => Err("Unknown Command".into()),
}
@@ -372,6 +373,7 @@ impl CommandManager {
kb.insert("Shift+Up".into(), Command::Shift(ShiftMode::Up, None));
kb.insert("Shift+Down".into(), Command::Shift(ShiftMode::Down, None));
kb.insert("Ctrl+v".into(), Command::Insert(None));
kb
}