diff --git a/config/src/config.rs b/config/src/config.rs index 8e7d61afe..0d2bcb600 100644 --- a/config/src/config.rs +++ b/config/src/config.rs @@ -1470,7 +1470,7 @@ impl Default for ExitBehavior { #[derive(Debug, Deserialize, Serialize, Clone, Copy, PartialEq, Eq)] pub enum DroppedFileQuoting { - /// Do no quoting at all, just pass through the name as-is + /// No quoting is performed, the file name is passed through as-is None, /// Backslash escape only spaces, leaving all other characters as-is SpacesOnly, diff --git a/docs/config/lua/config/quote_dropped_files.md b/docs/config/lua/config/quote_dropped_files.md new file mode 100644 index 000000000..560976432 --- /dev/null +++ b/docs/config/lua/config/quote_dropped_files.md @@ -0,0 +1,27 @@ +## quote_dropped_files = "SpacesOnly" + +*Since: nightly builds only* + +Controls how file names are quoted (or not) when dragging and dropping. +There are three possible values: + +* `"None"` - no quoting is performed, the file name is passed through as-is. +* `"SpacesOnly"` - backslash-escape only spaces, leaving all other characters as-is. This is the default. +* `"Posix"` - use POSIX style shell word escaping. + +For example: + +|`quote_dropped_files` |file name |quoted result | +|----------------------|-------------|---------------| +|`"None"` |`hello world`|`hello world` | +|`"SpacesOnly"` |`hello world`|`hello\ world` | +|`"Posix"` |`hello world`|`"hello world"`| + +Files drag and drop support is a platform dependent feature + +|Platform |Supported since | +|----------|-------------------| +|macOS |nightly builds only| +|Windows |Not yet | +|X11 |Not yet | +|Wayland |Not yet | diff --git a/window/src/lib.rs b/window/src/lib.rs index 178469689..57968c77b 100644 --- a/window/src/lib.rs +++ b/window/src/lib.rs @@ -177,10 +177,10 @@ pub enum WindowEvent { Notification(Box), - // Called when the files is being dragged into the window + // Called when the files are being dragged into the window DraggedFile(Vec), - // Called when the files is been dropped into the window + // Called when the files are dropped into the window DroppedFile(Vec), }