We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 8d2f1af commit d76be3dCopy full SHA for d76be3d
lua/gp/init.lua
@@ -1376,8 +1376,10 @@ end
1376
---@param file_name string # file name
1377
---@return string | nil # reason for not being a chat or nil if it is a chat
1378
M.not_chat = function(buf, file_name)
1379
- if not _H.starts_with(file_name, M.config.chat_dir) then
1380
- return "not in chat directory (" .. M.config.chat_dir .. ")"
+ file_name = vim.fn.resolve(file_name)
+ local chat_dir = vim.fn.resolve(M.config.chat_dir)
1381
+ if not _H.starts_with(file_name, chat_dir) then
1382
+ return "resolved file (" .. file_name .. ") not in chat dir (" .. chat_dir .. ")"
1383
end
1384
1385
local lines = vim.api.nvim_buf_get_lines(buf, 0, -1, false)
0 commit comments