Skip to content

Commit

Permalink
Do a initial render in ansi-enable and avoid duplicated hooks
Browse files Browse the repository at this point in the history
Remove the existing ansi hooks in ansi-enable so that the following
config: `hook global BufOpenFifo .* ansi-enable` does not accumulate
the rendering hooks every time the same buffer is re-used for a fifo
which leads to progressively slower and slower performance.
  • Loading branch information
Maxime Coste committed Mar 22, 2024
1 parent c4e6f6a commit 1e201d9
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions rc/ansi.kak
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,8 @@ define-command \
-params 0 \
ansi-enable %{
try ansi-setup-buffer
ansi-render
remove-hooks buffer ansi
hook -group ansi buffer BufReadFifo .* %{
evaluate-commands -draft %{
select "%val{hook_param}"
Expand Down

0 comments on commit 1e201d9

Please sign in to comment.