mirror of
https://github.com/neovim/neovim.git
synced 2024-09-17 20:58:20 -04:00
fix: replace NVIM with Nvim in default titlestring (#30348)
This commit is contained in:
parent
f9bf64d746
commit
98ba65b8be
@ -6713,7 +6713,7 @@ A jump table for the options with a short description can be found at |Q_op|.
|
|||||||
global
|
global
|
||||||
When on, the title of the window will be set to the value of
|
When on, the title of the window will be set to the value of
|
||||||
'titlestring' (if it is not empty), or to:
|
'titlestring' (if it is not empty), or to:
|
||||||
filename [+=-] (path) - NVIM
|
filename [+=-] (path) - Nvim
|
||||||
Where:
|
Where:
|
||||||
filename the name of the file being edited
|
filename the name of the file being edited
|
||||||
- indicates the file cannot be modified, 'ma' off
|
- indicates the file cannot be modified, 'ma' off
|
||||||
@ -6721,7 +6721,7 @@ A jump table for the options with a short description can be found at |Q_op|.
|
|||||||
= indicates the file is read-only
|
= indicates the file is read-only
|
||||||
=+ indicates the file is read-only and modified
|
=+ indicates the file is read-only and modified
|
||||||
(path) is the path of the file being edited
|
(path) is the path of the file being edited
|
||||||
- NVIM the server name |v:servername| or "NVIM"
|
- Nvim the server name |v:servername| or "Nvim"
|
||||||
|
|
||||||
*'titlelen'*
|
*'titlelen'*
|
||||||
'titlelen' number (default 85)
|
'titlelen' number (default 85)
|
||||||
|
4
runtime/lua/vim/_meta/options.lua
generated
4
runtime/lua/vim/_meta/options.lua
generated
@ -7255,7 +7255,7 @@ vim.go.tm = vim.go.timeoutlen
|
|||||||
|
|
||||||
--- When on, the title of the window will be set to the value of
|
--- When on, the title of the window will be set to the value of
|
||||||
--- 'titlestring' (if it is not empty), or to:
|
--- 'titlestring' (if it is not empty), or to:
|
||||||
--- filename [+=-] (path) - NVIM
|
--- filename [+=-] (path) - Nvim
|
||||||
--- Where:
|
--- Where:
|
||||||
--- filename the name of the file being edited
|
--- filename the name of the file being edited
|
||||||
--- - indicates the file cannot be modified, 'ma' off
|
--- - indicates the file cannot be modified, 'ma' off
|
||||||
@ -7263,7 +7263,7 @@ vim.go.tm = vim.go.timeoutlen
|
|||||||
--- = indicates the file is read-only
|
--- = indicates the file is read-only
|
||||||
--- =+ indicates the file is read-only and modified
|
--- =+ indicates the file is read-only and modified
|
||||||
--- (path) is the path of the file being edited
|
--- (path) is the path of the file being edited
|
||||||
--- - NVIM the server name `v:servername` or "NVIM"
|
--- - Nvim the server name `v:servername` or "Nvim"
|
||||||
---
|
---
|
||||||
--- @type boolean
|
--- @type boolean
|
||||||
vim.o.title = false
|
vim.o.title = false
|
||||||
|
@ -3338,7 +3338,7 @@ void maketitle(void)
|
|||||||
|
|
||||||
#define SPACE_FOR_FNAME (sizeof(buf) - 100)
|
#define SPACE_FOR_FNAME (sizeof(buf) - 100)
|
||||||
#define SPACE_FOR_DIR (sizeof(buf) - 20)
|
#define SPACE_FOR_DIR (sizeof(buf) - 20)
|
||||||
#define SPACE_FOR_ARGNR (sizeof(buf) - 10) // At least room for " - NVIM".
|
#define SPACE_FOR_ARGNR (sizeof(buf) - 10) // At least room for " - Nvim".
|
||||||
char *buf_p = buf;
|
char *buf_p = buf;
|
||||||
if (curbuf->b_fname == NULL) {
|
if (curbuf->b_fname == NULL) {
|
||||||
const size_t size = xstrlcpy(buf_p, _("[No Name]"),
|
const size_t size = xstrlcpy(buf_p, _("[No Name]"),
|
||||||
@ -3412,7 +3412,7 @@ void maketitle(void)
|
|||||||
|
|
||||||
append_arg_number(curwin, buf_p, (int)(SPACE_FOR_ARGNR - (size_t)(buf_p - buf)));
|
append_arg_number(curwin, buf_p, (int)(SPACE_FOR_ARGNR - (size_t)(buf_p - buf)));
|
||||||
|
|
||||||
xstrlcat(buf_p, " - NVIM", (sizeof(buf) - (size_t)(buf_p - buf)));
|
xstrlcat(buf_p, " - Nvim", (sizeof(buf) - (size_t)(buf_p - buf)));
|
||||||
|
|
||||||
if (maxlen > 0) {
|
if (maxlen > 0) {
|
||||||
// Make it shorter by removing a bit in the middle.
|
// Make it shorter by removing a bit in the middle.
|
||||||
|
@ -9047,7 +9047,7 @@ return {
|
|||||||
desc = [=[
|
desc = [=[
|
||||||
When on, the title of the window will be set to the value of
|
When on, the title of the window will be set to the value of
|
||||||
'titlestring' (if it is not empty), or to:
|
'titlestring' (if it is not empty), or to:
|
||||||
filename [+=-] (path) - NVIM
|
filename [+=-] (path) - Nvim
|
||||||
Where:
|
Where:
|
||||||
filename the name of the file being edited
|
filename the name of the file being edited
|
||||||
- indicates the file cannot be modified, 'ma' off
|
- indicates the file cannot be modified, 'ma' off
|
||||||
@ -9055,11 +9055,11 @@ return {
|
|||||||
= indicates the file is read-only
|
= indicates the file is read-only
|
||||||
=+ indicates the file is read-only and modified
|
=+ indicates the file is read-only and modified
|
||||||
(path) is the path of the file being edited
|
(path) is the path of the file being edited
|
||||||
- NVIM the server name |v:servername| or "NVIM"
|
- Nvim the server name |v:servername| or "Nvim"
|
||||||
]=],
|
]=],
|
||||||
full_name = 'title',
|
full_name = 'title',
|
||||||
scope = { 'global' },
|
scope = { 'global' },
|
||||||
short_desc = N_('Vim set the title of the window'),
|
short_desc = N_('set the title of the window'),
|
||||||
type = 'boolean',
|
type = 'boolean',
|
||||||
varname = 'p_title',
|
varname = 'p_title',
|
||||||
},
|
},
|
||||||
|
@ -22,7 +22,7 @@ describe('title', function()
|
|||||||
end)
|
end)
|
||||||
|
|
||||||
it('has correct default title with unnamed file', function()
|
it('has correct default title with unnamed file', function()
|
||||||
local expected = '[No Name] - NVIM'
|
local expected = '[No Name] - Nvim'
|
||||||
command('set title')
|
command('set title')
|
||||||
screen:expect(function()
|
screen:expect(function()
|
||||||
eq(expected, screen.title)
|
eq(expected, screen.title)
|
||||||
@ -30,7 +30,7 @@ describe('title', function()
|
|||||||
end)
|
end)
|
||||||
|
|
||||||
it('has correct default title with named file', function()
|
it('has correct default title with named file', function()
|
||||||
local expected = (is_os('win') and 'myfile (C:\\mydir) - NVIM' or 'myfile (/mydir) - NVIM')
|
local expected = (is_os('win') and 'myfile (C:\\mydir) - Nvim' or 'myfile (/mydir) - Nvim')
|
||||||
command('set title')
|
command('set title')
|
||||||
command(is_os('win') and 'file C:\\mydir\\myfile' or 'file /mydir/myfile')
|
command(is_os('win') and 'file C:\\mydir\\myfile' or 'file /mydir/myfile')
|
||||||
screen:expect(function()
|
screen:expect(function()
|
||||||
@ -41,7 +41,7 @@ describe('title', function()
|
|||||||
describe('is not changed by', function()
|
describe('is not changed by', function()
|
||||||
local file1 = is_os('win') and 'C:\\mydir\\myfile1' or '/mydir/myfile1'
|
local file1 = is_os('win') and 'C:\\mydir\\myfile1' or '/mydir/myfile1'
|
||||||
local file2 = is_os('win') and 'C:\\mydir\\myfile2' or '/mydir/myfile2'
|
local file2 = is_os('win') and 'C:\\mydir\\myfile2' or '/mydir/myfile2'
|
||||||
local expected = (is_os('win') and 'myfile1 (C:\\mydir) - NVIM' or 'myfile1 (/mydir) - NVIM')
|
local expected = (is_os('win') and 'myfile1 (C:\\mydir) - Nvim' or 'myfile1 (/mydir) - Nvim')
|
||||||
local buf2
|
local buf2
|
||||||
|
|
||||||
before_each(function()
|
before_each(function()
|
||||||
|
Loading…
Reference in New Issue
Block a user