We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent da326d0 commit 89a2568Copy full SHA for 89a2568
lua/harpoon/config.lua
@@ -4,8 +4,8 @@ local Path = require("plenary.path")
4
local function normalize_path(buf_name, root)
5
return Path:new(buf_name):make_relative(root)
6
end
7
-local function to_exact_name(value)
8
- return "^" .. value .. "$"
+local function to_absolute_path(value)
+ return vim.loop.fs_realpath(value)
9
10
11
local M = {}
@@ -106,7 +106,7 @@ function M.get_default_config()
106
107
options = options or {}
108
109
- local bufnr = vim.fn.bufnr(to_exact_name(list_item.value))
+ local bufnr = vim.fn.bufnr(to_absolute_path(list_item.value))
110
local set_position = false
111
if bufnr == -1 then -- must create a buffer!
112
set_position = true
0 commit comments