1
0
Fork 0
mirror of https://github.com/alacritty/alacritty.git synced 2024-11-11 13:51:01 -05:00

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.
This commit is contained in:
Christian Duerr 2018-05-11 17:31:06 +02:00 committed by Joe Wilm
parent 5be0e3ad8f
commit 5728136350

View file

@ -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());
}
_ => (),
}