From 319e8ed8922e072f83adb9a7899d39db03dccd31 Mon Sep 17 00:00:00 2001 From: YIQUN Date: Thu, 19 Nov 2020 16:03:08 +0800 Subject: [PATCH] Fix: cwd detection of builtin.git_ (#264) --- lua/telescope/builtin/git.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lua/telescope/builtin/git.lua b/lua/telescope/builtin/git.lua index 4fc10f1..16d4554 100644 --- a/lua/telescope/builtin/git.lua +++ b/lua/telescope/builtin/git.lua @@ -147,7 +147,7 @@ local set_opts_cwd = function(opts) if opts.cwd then opts.cwd = vim.fn.expand(opts.cwd) else - opts.cwd = vim.fn.expand('%:p:h') + opts.cwd = vim.loop.cwd() end -- Find root of git directory and remove trailing newline characters