diff options
author | Christian Duerr <contact@christianduerr.com> | 2018-05-11 17:31:06 +0200 |
---|---|---|
committer | Joe Wilm <jwilm@users.noreply.github.com> | 2018-05-11 16:54:19 -0700 |
commit | 57281363503ddd1ebb373ed5de2b84c79d5aa3aa (patch) | |
tree | abf8bbde57c54f441aca383a83bd64743704259d | |
parent | 5be0e3ad8fcde5d8dec98c0e71a2b495294d03be (diff) | |
download | alacritty-57281363503ddd1ebb373ed5de2b84c79d5aa3aa.tar.gz alacritty-57281363503ddd1ebb373ed5de2b84c79d5aa3aa.zip |
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.
-rw-r--r-- | src/event.rs | 5 |
1 files changed, 5 insertions, 0 deletions
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<N: Notify> Processor<N> { } 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()); } _ => (), } |