aboutsummaryrefslogtreecommitdiff
path: root/runtime/lua/vim/treesitter/_fold.lua
diff options
context:
space:
mode:
authorLuuk van Baal <luukvbaal@gmail.com>2025-01-16 16:03:06 +0100
committerluukvbaal <luukvbaal@gmail.com>2025-01-20 15:11:33 +0100
commit92556be33d04668c58a37794de5562af6297b3ac (patch)
tree33df41589c4a85982704c7932531cd469426f4fe /runtime/lua/vim/treesitter/_fold.lua
parentded15ca8c210965442d39ab214d4838b80a3fdc6 (diff)
downloadrneovim-92556be33d04668c58a37794de5562af6297b3ac.tar.gz
rneovim-92556be33d04668c58a37794de5562af6297b3ac.tar.bz2
rneovim-92556be33d04668c58a37794de5562af6297b3ac.zip
fix(messages): compute msg_col after last newline in ext_messages
Problem: We want to keep track of the current message column, which is done very rudimentary for ext_messages; only checking if the message ends in a newline to reset the column, while computing the entire cellwidth of the message, which may contain (multiple) newlines not necessarily at the end (since 21718c6). This introduced a noticeable delay for large messages (e.g. :=vim). Solution: Calculate the cellwidth of the message after the last newline. Use it to keep track of the current message column. This might not be a functional change currently, since it only affects messages with (multiple) newlines not at the end of a message, which I don't think we emit internally, and msg_col is reset for a new kind. It does fix the performance problem.
Diffstat (limited to 'runtime/lua/vim/treesitter/_fold.lua')
0 files changed, 0 insertions, 0 deletions