Commit 8c539b9
committed
fix: use literal path comparison instead of bufnr pattern match
vim.fn.bufnr(name) treats the name as a file-pattern (partial+regex
match per :h bufname()), not a literal string. Paths with regex
metacharacters like [ ] * ? { } match the wrong buffer or fail.
Iterate nvim_list_bufs() and compare canonicalized paths via
fs_realpath (with fnamemodify as fallback for buffers whose on-disk
path doesn't exist yet). Also scope checktime to the matched buffer
number instead of checking all buffers.1 parent 6c9c52c commit 8c539b9
1 file changed
Lines changed: 5 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
23 | 23 | | |
24 | 24 | | |
25 | 25 | | |
26 | | - | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
27 | 30 | | |
28 | 31 | | |
29 | | - | |
| 32 | + | |
30 | 33 | | |
31 | 34 | | |
32 | 35 | | |
| |||
0 commit comments