diff options
author | Rory Dudley | 2025-01-06 16:22:48 -0700 |
---|---|---|
committer | Rory Dudley | 2025-01-06 23:37:58 -0700 |
commit | bfbd5b7e5d2dcf6fde1c44b475ea12f09bc23fdc (patch) | |
tree | b82a26f2677223906b41179860bfafb546939afd /src/buffer.rs | |
parent | 2af8e55e87c172d707a728a9739f800048e1ed0a (diff) | |
download | dwarvish-bfbd5b7e5d2dcf6fde1c44b475ea12f09bc23fdc.tar.gz |
Escape some common special characters
In addition to the space character (' '), escape the follow characters
when (path) completion is invoked by the user: #, ', and ".
Signed-off-by: Rory Dudley <rory@netc.lu>
Diffstat (limited to 'src/buffer.rs')
-rw-r--r-- | src/buffer.rs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/buffer.rs b/src/buffer.rs index 7ed05ba..174218a 100644 --- a/src/buffer.rs +++ b/src/buffer.rs @@ -349,7 +349,7 @@ fn comp( let mut j = 0; let mut chars = path.chars().collect::<Vec<char>>(); for (i, c) in chars.clone().iter().enumerate() { - if *c == ' ' { + if *c == ' ' || *c == '#' || *c == '\'' || *c == '"' { chars.insert(i + j, '\\'); j += 1; } |