From ad70c9892d5b5ebcc106742386c99524f074bcea Mon Sep 17 00:00:00 2001 From: Luuk van Baal Date: Sat, 15 Jun 2024 05:46:43 +0200 Subject: feat(column)!: rework 'statuscolumn' %r/l items Problem: A custom 'statuscolumn' needs to check a bunch of options and placed signs to replicate the default number column. Solution: Rework %l item to include the necessary logic to mimic the default number column. Remove now redundant %r item. --- test/functional/api/vim_spec.lua | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'test/functional/api/vim_spec.lua') diff --git a/test/functional/api/vim_spec.lua b/test/functional/api/vim_spec.lua index b32f2b1cb2..d28064447c 100644 --- a/test/functional/api/vim_spec.lua +++ b/test/functional/api/vim_spec.lua @@ -3887,11 +3887,11 @@ describe('API', function() )) eq( { - str = '3 ', - width = 2, + str = ' 3 ', + width = 9, highlights = { { group = 'LineNr', start = 0 }, - { group = 'ErrorMsg', start = 1 }, + { group = 'ErrorMsg', start = 8 }, }, }, api.nvim_eval_statusline('%l%#ErrorMsg# ', { use_statuscol_lnum = 3, highlights = true }) -- cgit