commit 9701cbf036aecf18e7d88681040c07d61c314ca6
parent 4846bf05dc639592c73135fb6f1a69f410c1c40f
Author: zeertzjq <zeertzjq@outlook.com>
Date: Tue, 15 Oct 2024 08:16:56 +0800
vim-patch:7b5e52d: runtime(doc): add preview flag to statusline example
Problem: The standard statusline example is missing the preview flag
"%w"
Solution: Add the preview flag "%w"
closes: vim/vim#15874
https://github.com/vim/vim/commit/7b5e52d16fb457c90cc44340a6190712aab7e03b
Co-authored-by: saher <msaher.shair@gmail.com>
Diffstat:
3 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/runtime/doc/options.txt b/runtime/doc/options.txt
@@ -6275,7 +6275,7 @@ A jump table for the options with a short description can be found at |Q_op|.
Examples:
Emulate standard status line with 'ruler' set >vim
- set statusline=%<%f\ %h%m%r%=%-14.(%l,%c%V%)\ %P
+ set statusline=%<%f\ %h%w%m%r%=%-14.(%l,%c%V%)\ %P
< Similar, but add ASCII value of char under the cursor (like "ga") >vim
set statusline=%<%f%h%m%r%=%b\ 0x%B\ \ %l,%c%V\ %P
< Display byte count and byte value, modified flag in red. >vim
diff --git a/runtime/lua/vim/_meta/options.lua b/runtime/lua/vim/_meta/options.lua
@@ -6695,7 +6695,7 @@ vim.wo.stc = vim.wo.statuscolumn
--- Emulate standard status line with 'ruler' set
---
--- ```vim
---- set statusline=%<%f\ %h%m%r%=%-14.(%l,%c%V%)\ %P
+--- set statusline=%<%f\ %h%w%m%r%=%-14.(%l,%c%V%)\ %P
--- ```
--- Similar, but add ASCII value of char under the cursor (like "ga")
---
diff --git a/src/nvim/options.lua b/src/nvim/options.lua
@@ -8356,7 +8356,7 @@ return {
Examples:
Emulate standard status line with 'ruler' set >vim
- set statusline=%<%f\ %h%m%r%=%-14.(%l,%c%V%)\ %P
+ set statusline=%<%f\ %h%w%m%r%=%-14.(%l,%c%V%)\ %P
< Similar, but add ASCII value of char under the cursor (like "ga") >vim
set statusline=%<%f%h%m%r%=%b\ 0x%B\ \ %l,%c%V\ %P
< Display byte count and byte value, modified flag in red. >vim