fix(#2352): windows: escape special filename characters on edit (#2374)

* Fix escape special characters on windows

fixes #2362

* use utils for windows check

* Add function to escape special chars on windows

* Change escape string function to use and/or

* Add nil check in escape special chars function

---------

Co-authored-by: Davis Sanders <dsanders@smartlink.city>
Co-authored-by: Alexander Courtis <alex@courtis.org>
This commit is contained in:
davisthedev
2023-08-19 23:27:33 -04:00
committed by GitHub
parent 4e36850811
commit 7c4c7e4e98
2 changed files with 11 additions and 0 deletions

View File

@@ -270,6 +270,7 @@ local function open_in_new_window(filename, mode)
end
local fname = vim.fn.fnameescape(filename)
fname = utils.escape_special_chars(fname)
local cmd
if create_new_window then