fix(buffer): escape hyphens in infer_status Lua patterns (#119)
* fix(buffer): escape hyphens in `infer_status` Lua patterns Problem: `infer_status` used `/-` in its Lua patterns, which is a lazy quantifier on `/` rather than a literal hyphen. This caused the function to always return `nil` for lines with an `/id/` prefix, so status was never inferred from buffer text during `reapply_dirty_inline`. Solution: escape hyphens as `%-` in both patterns. Also add debug logging to `on_bytes`, `reapply_dirty_inline`, `apply_extmarks`, and the `TextChanged`/`TextChangedI`/`InsertLeave` autocmds. * ci: format
This commit is contained in:
parent
979c4339b8
commit
b9b0b233d9
2 changed files with 34 additions and 2 deletions
|
|
@ -268,6 +268,7 @@ function M._setup_autocmds(bufnr)
|
|||
if not vim.bo[bufnr].modified then
|
||||
return
|
||||
end
|
||||
log.debug('autocmd: TextChangedI')
|
||||
for row in pairs(buffer.dirty_rows()) do
|
||||
buffer.clear_inline_row(bufnr, row)
|
||||
end
|
||||
|
|
@ -280,6 +281,7 @@ function M._setup_autocmds(bufnr)
|
|||
if not vim.bo[bufnr].modified then
|
||||
return
|
||||
end
|
||||
log.debug('autocmd: TextChanged')
|
||||
buffer.reapply_dirty_inline(bufnr)
|
||||
end,
|
||||
})
|
||||
|
|
@ -288,6 +290,7 @@ function M._setup_autocmds(bufnr)
|
|||
buffer = bufnr,
|
||||
callback = function()
|
||||
if vim.bo[bufnr].modified then
|
||||
log.debug('autocmd: InsertLeave')
|
||||
buffer.reapply_dirty_inline(bufnr)
|
||||
end
|
||||
end,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue