aboutsummaryrefslogtreecommitdiff
path: root/runtime
diff options
context:
space:
mode:
Diffstat (limited to 'runtime')
-rw-r--r--runtime/doc/news.txt5
-rw-r--r--runtime/doc/options.txt10
-rw-r--r--runtime/lua/vim/_meta/options.lua10
3 files changed, 10 insertions, 15 deletions
diff --git a/runtime/doc/news.txt b/runtime/doc/news.txt
index 4addbf84c3..848a642774 100644
--- a/runtime/doc/news.txt
+++ b/runtime/doc/news.txt
@@ -62,7 +62,10 @@ LUA
OPTIONS
-• TODO
+• The 'statuscolumn' `%l` item can now be used as a number column segment that
+ changes according to related options. It takes care of alignment, 'number',
+ 'relativenumber' and 'signcolumn' set to "number". The now redundant `%r` item
+ is no longer treated specially for 'statuscolumn'.
PLUGINS
diff --git a/runtime/doc/options.txt b/runtime/doc/options.txt
index f02d3c9741..244465ed6e 100644
--- a/runtime/doc/options.txt
+++ b/runtime/doc/options.txt
@@ -5951,8 +5951,7 @@ A jump table for the options with a short description can be found at |Q_op|.
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
@@ -5979,11 +5978,8 @@ A jump table for the options with a short description can be found at |Q_op|.
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)} '
diff --git a/runtime/lua/vim/_meta/options.lua b/runtime/lua/vim/_meta/options.lua
index 155c93726b..befb56d3d5 100644
--- a/runtime/lua/vim/_meta/options.lua
+++ b/runtime/lua/vim/_meta/options.lua
@@ -6373,8 +6373,7 @@ vim.go.sol = vim.go.startofline
--- 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
---
@@ -6403,11 +6402,8 @@ vim.go.sol = vim.go.startofline
--- 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)} '