diff --git a/docs/_coverpage.md b/docs/_coverpage.md index 33c0611..63f770e 100644 --- a/docs/_coverpage.md +++ b/docs/_coverpage.md @@ -1,4 +1,4 @@ -# kulala.nvim 1.5.0 +# kulala.nvim 1.5.1 > A minimal 🤏 HTTP-client 🐼 interface 🖥️ for Neovim ❤️. diff --git a/lua/kulala/globals/init.lua b/lua/kulala/globals/init.lua index d5a9db1..c792665 100644 --- a/lua/kulala/globals/init.lua +++ b/lua/kulala/globals/init.lua @@ -2,7 +2,7 @@ local FS = require("kulala.utils.fs") local M = {} -M.VERSION = "1.5.0" +M.VERSION = "1.5.1" M.UI_ID = "kulala://ui" M.HEADERS_FILE = FS.get_plugin_tmp_dir() .. "/headers.txt" M.BODY_FILE = FS.get_plugin_tmp_dir() .. "/body.txt" diff --git a/lua/kulala/utils/fs.lua b/lua/kulala/utils/fs.lua index c682531..bb0b8ec 100644 --- a/lua/kulala/utils/fs.lua +++ b/lua/kulala/utils/fs.lua @@ -6,7 +6,12 @@ local M = {} -- @usage local p = fs.find_file_in_parent_dirs('Makefile') M.find_file_in_parent_dirs = function(filename) local dir = vim.fn.expand('%:p:h') - while dir ~= '/' and dir ~= '' do + -- make sure we don't go into an infinite loop + -- if the file is in the root directory of windows or unix + -- we should stop at the root directory + -- for linux, the root directory is '/' + -- for windows, the root directory is '[SOME_LETTER]:\' + while dir ~= '/' and dir:match('[A-Z]:\\') == nil do local parent = dir .. '/' .. filename if vim.fn.filereadable(parent) == 1 then return parent diff --git a/package.json b/package.json index b42913e..c9e8020 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "kulala.nvim", - "version": "1.5.0", + "version": "1.5.1", "scripts": { "docs": "docsify serve docs" },