mirror of
https://github.com/neovim/neovim.git
synced 2026-06-17 09:11:21 +00:00
fix(options): default 'titlestring' shows CWD #39233
Problem:
In the default 'titlestring', if the containing directory is the CWD, it renders as "."
Solution:
Add `:p` to the titlestring.
(cherry picked from commit e68e769352)
This commit is contained in:
committed by
github-actions[bot]
parent
b3b5674ac7
commit
4d4e196447
@@ -6939,7 +6939,7 @@ A jump table for the options with a short description can be found at |Q_op|.
|
||||
error will be given.
|
||||
|
||||
The default (empty) behaviour is equivalent to: >vim
|
||||
set titlestring=%t%(\ %M%)%(\ \(%{expand(\"%:~:h\")}\)%)%a\ -\ Nvim
|
||||
set titlestring=%t%(\ %M%)%(\ \(%{expand('%:p:~:h')}\)%)%a\ -\ Nvim
|
||||
<
|
||||
Example: >vim
|
||||
auto BufEnter * let &titlestring = hostname() .. "/" .. expand("%:p")
|
||||
|
||||
2
runtime/lua/vim/_meta/options.gen.lua
generated
2
runtime/lua/vim/_meta/options.gen.lua
generated
@@ -7462,7 +7462,7 @@ vim.go.titleold = vim.o.titleold
|
||||
--- The default (empty) behaviour is equivalent to:
|
||||
---
|
||||
--- ```vim
|
||||
--- set titlestring=%t%(\ %M%)%(\ \(%{expand(\"%:~:h\")}\)%)%a\ -\ Nvim
|
||||
--- set titlestring=%t%(\ %M%)%(\ \(%{expand('%:p:~:h')}\)%)%a\ -\ Nvim
|
||||
--- ```
|
||||
---
|
||||
--- Example:
|
||||
|
||||
Reference in New Issue
Block a user