diff options
author | Justin M. Keyes <justinkz@gmail.com> | 2024-09-23 06:05:58 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-09-23 06:05:58 -0700 |
commit | 47e6b2233feffc6e9d94f6086fb904eb5688fa25 (patch) | |
tree | f3c3e062ecd7aafef95ac0c77d038eb143aab074 /runtime/lua/vim/lsp/rpc.lua | |
parent | 5acdc4499e2036c90172b2b085f207ee4d5cfee4 (diff) | |
download | rneovim-47e6b2233feffc6e9d94f6086fb904eb5688fa25.tar.gz rneovim-47e6b2233feffc6e9d94f6086fb904eb5688fa25.tar.bz2 rneovim-47e6b2233feffc6e9d94f6086fb904eb5688fa25.zip |
fix(vim.fs): dirname() returns "." on mingw/msys2 #30480
Problem:
`vim.fs.dirname([[C:\User\XXX\AppData\Local]])` returns "." on
mingw/msys2.
Solution:
- Check for "mingw" when deciding `iswin`.
- Use `has("win32")` where possible, it works in "fast" contexts since
b02eeb6a7281df0561a021d7ae595c84be9a01be.
Diffstat (limited to 'runtime/lua/vim/lsp/rpc.lua')
-rw-r--r-- | runtime/lua/vim/lsp/rpc.lua | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/runtime/lua/vim/lsp/rpc.lua b/runtime/lua/vim/lsp/rpc.lua index d81eae20d1..bc24501eae 100644 --- a/runtime/lua/vim/lsp/rpc.lua +++ b/runtime/lua/vim/lsp/rpc.lua @@ -3,7 +3,7 @@ local log = require('vim.lsp.log') local protocol = require('vim.lsp.protocol') local validate, schedule, schedule_wrap = vim.validate, vim.schedule, vim.schedule_wrap -local is_win = uv.os_uname().version:find('Windows') +local is_win = vim.fn.has('win32') == 1 --- Checks whether a given path exists and is a directory. ---@param filename string path to check |