From 57281363503ddd1ebb373ed5de2b84c79d5aa3aa Mon Sep 17 00:00:00 2001 From: Christian Duerr Date: Fri, 11 May 2018 17:31:06 +0200 Subject: Paste path into terminal when drag & dropping file It's now possible to insert the path of a file or directory by dropping it from the file manager into alacritty. This fixes #1301. --- src/event.rs | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'src/event.rs') diff --git a/src/event.rs b/src/event.rs index 72cc61e6..d85fab2b 100644 --- a/src/event.rs +++ b/src/event.rs @@ -338,6 +338,11 @@ impl Processor { } processor.on_focus_change(is_focused); + }, + DroppedFile(path) => { + use input::ActionContext; + let path: String = path.to_string_lossy().into(); + processor.ctx.write_to_pty(path.into_bytes()); } _ => (), } -- cgit