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.
This commit is contained in:
Christian Duerr committed 2023-03-06 08:19:58 +01:00
1 parent ea93d7f451
commit 038d508c34
2 files changed
+2 -1

No files matched your search

+1
View File
@@ -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
+1 -1
View File
@@ -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;