summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChristian Duerr <contact@christianduerr.com>2023-02-27 08:30:39 +0100
committerChristian Duerr <contact@christianduerr.com>2023-03-06 08:19:58 +0100
commit038d508c34ba69fc8d98dbf830a001c1bfbdd93e (patch)
tree2353607da5e3ce10cdfca6ba9e59510eb4c6cf74
parentea93d7f4518bb78b57f71311df1728dfd45b9055 (diff)
Send D&D input through paste action
Treating D&D like paste allows using D&D to input text into areas other than the PTY, like the search bar.
-rw-r--r--CHANGELOG.md1
-rw-r--r--alacritty/src/event.rs2
2 files changed, 2 insertions, 1 deletions
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 38c410b8..ae8c4b5d 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -48,6 +48,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/).
- Window clipping when maximizing a window without decorations on Windows
- Quadrants not aligned with half blocks with built-in font
- EOT (`\x03`) escaping bracketed paste mode
+- Drag & Drop not working for the search bar
### Removed
diff --git a/alacritty/src/event.rs b/alacritty/src/event.rs
index 3ecca5e8..02309188 100644
--- a/alacritty/src/event.rs
+++ b/alacritty/src/event.rs
@@ -1320,7 +1320,7 @@ impl input::Processor<EventProxy, ActionContext<'_, Notifier, EventProxy>> {
},
WindowEvent::DroppedFile(path) => {
let path: String = path.to_string_lossy().into();
- self.ctx.write_to_pty((path + " ").into_bytes());
+ self.ctx.paste(&(path + " "));
},
WindowEvent::CursorLeft { .. } => {
self.ctx.mouse.inside_text_area = false;