mirror of
https://github.com/neovim/neovim.git
synced 2025-09-16 00:08:19 +00:00
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.
This commit is contained in:
@@ -8037,8 +8037,7 @@ return {
|
||||
Some of the items from the 'statusline' format are different for
|
||||
'statuscolumn':
|
||||
|
||||
%l line number of currently drawn line
|
||||
%r relative line number of currently drawn line
|
||||
%l line number column for currently drawn line
|
||||
%s sign column for currently drawn line
|
||||
%C fold column for currently drawn line
|
||||
|
||||
@@ -8065,11 +8064,8 @@ return {
|
||||
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
|
||||
|
||||
" Right aligned relative cursor line number:
|
||||
let &stc='%=%{v:relnum?v:relnum:v:lnum} '
|
||||
" Line number with bar separator and click handlers:
|
||||
set statuscolumn=%@SignCb@%s%=%T%@NumCb@%l│%T
|
||||
|
||||
" Line numbers in hexadecimal for non wrapped part of lines:
|
||||
let &stc='%=%{v:virtnum>0?"":printf("%x",v:lnum)} '
|
||||
|
Reference in New Issue
Block a user