From 999bb983f0f44b16126b79ba105f079ac1df21ff Mon Sep 17 00:00:00 2001 From: luukvbaal <31730729+luukvbaal@users.noreply.github.com> Date: Fri, 20 Jan 2023 00:47:02 +0100 Subject: perf(statuscolumn): only fill click defs array once per redraw (#21884) Problem: 'statuscolumn' click definitions are cleared, evaluated, allocated and filled each redraw for every row in a window. This despite the fact that we only store a single click definition array for the entire column as opposed to one for each row. Solution: Only fill the 'statuscolumn' click definition array once per window per redraw. Resolve https://github.com/neovim/neovim/issues/21767. --- runtime/doc/options.txt | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'runtime') diff --git a/runtime/doc/options.txt b/runtime/doc/options.txt index 169ec95b03..0c078b7bba 100644 --- a/runtime/doc/options.txt +++ b/runtime/doc/options.txt @@ -6027,6 +6027,11 @@ A jump table for the options with a short description can be found at |Q_op|. when drawing the actual buffer line, and positive when drawing the wrapped part of a buffer line. + NOTE: The %@ click execute function item is supported as well but the + specified function will be the same for each row in the same column. + It cannot be switched out through a dynamic 'statuscolumn' format, the + handler should be written with this in mind. + Examples: >vim " Relative number with bar separator and click handlers: :set statuscolumn=%@SignCb@%s%=%T%@NumCb@%r│%T -- cgit