From f98899605941bb75aed6193ea0a3211981f99503 Mon Sep 17 00:00:00 2001 From: Barrett Ruth <62671086+barrettruth@users.noreply.github.com> Date: Wed, 18 Mar 2026 12:06:48 -0400 Subject: [PATCH] fix(view): reapply column highlights after paste and buffer edits (#170) * fix(view): reapply column highlights after paste and buffer edits Problem: Column extmarks (icon color, per-character permissions) are applied via `util.set_highlights` only during `render_buffer`. Neovim does not duplicate extmarks on yank/paste, so lines inserted via `yyp` or `p` render without any column highlights. Solution: Store `col_width` and `col_align` in `session[bufnr]` after each render. Add `M.reapply_highlights` which re-parses all buffer lines, reconstructs the column chunk table, and re-applies extmarks via `util.set_highlights`. Wire it to a `TextChanged` autocmd (guarded by `_rendering[bufnr]` to skip oil's own `nvim_buf_set_lines` calls). * fix(view): resolve LuaLS warnings in `reapply_highlights`