From cedf155fb5c4d687747e59f5d3fdad76a40aa069 Mon Sep 17 00:00:00 2001 From: zshuzh <40901142+zshuzh@users.noreply.github.com> Date: Wed, 20 Nov 2024 22:01:59 +0000 Subject: refactor(options): impl default 'titlestring' by format flags #30843 Problem: Unnecessary C impl of default 'titlestring'. Solutin: Define it using format flags. --- runtime/lua/vim/_meta/options.lua | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'runtime/lua/vim') diff --git a/runtime/lua/vim/_meta/options.lua b/runtime/lua/vim/_meta/options.lua index cb783720ac..e485009ca2 100644 --- a/runtime/lua/vim/_meta/options.lua +++ b/runtime/lua/vim/_meta/options.lua @@ -7122,6 +7122,13 @@ vim.go.titleold = vim.o.titleold --- expanded according to the rules used for 'statusline'. If it contains --- an invalid '%' format, the value is used as-is and no error or warning --- will be given when the value is set. +--- +--- The default behaviour is equivalent to: +--- +--- ```vim +--- set titlestring=%t%(\ %M%)%(\ \(%{expand(\"%:~:h\")}\)%)%a\ -\ Nvim +--- ``` +--- --- This option cannot be set in a modeline when 'modelineexpr' is off. --- --- Example: -- cgit