'inccommand': set buffer name to [Preview]

[inc_sub] is less obvious for users. Also, in the future we may want to
generalize the idea of a "preview buffer", or "incremental commands"
besides :substitute.
This commit is contained in:
Justin M. Keyes 2016-11-07 00:08:23 +01:00
parent d0689eb0b2
commit 3ccf69c1de
2 changed files with 12 additions and 12 deletions

View File

@ -6049,7 +6049,7 @@ static buf_T *incsub_display(char_u *pat, char_u *sub,
} }
if (split && win_split((int)p_cwh, WSP_BOT) != FAIL) { if (split && win_split((int)p_cwh, WSP_BOT) != FAIL) {
buf_open_special(incsub_buf ? bufnr : 0, "[inc_sub]", "incsub"); buf_open_special(incsub_buf ? bufnr : 0, "[Preview]", "incsub");
buf_clear(); buf_clear();
incsub_buf = curbuf; incsub_buf = curbuf;
set_option_value((char_u *)"bh", 0L, (char_u *)"hide", OPT_LOCAL); set_option_value((char_u *)"bh", 0L, (char_u *)"hide", OPT_LOCAL);

View File

@ -597,7 +597,7 @@ describe("incsubstitute=split", function()
{15:~ }| {15:~ }|
{15:~ }| {15:~ }|
{15:~ }| {15:~ }|
{10:[inc_sub] }| {10:[Preview] }|
:%s/tw^ | :%s/tw^ |
]]) ]])
end) end)
@ -618,7 +618,7 @@ describe("incsubstitute=split", function()
{15:~ }| {15:~ }|
{15:~ }| {15:~ }|
{15:~ }| {15:~ }|
{10:[inc_sub] }| {10:[Preview] }|
:%s/tw/^ | :%s/tw/^ |
]]) ]])
@ -637,7 +637,7 @@ describe("incsubstitute=split", function()
{15:~ }| {15:~ }|
{15:~ }| {15:~ }|
{15:~ }| {15:~ }|
{10:[inc_sub] }| {10:[Preview] }|
:%s/tw/x^ | :%s/tw/x^ |
]]) ]])
@ -656,7 +656,7 @@ describe("incsubstitute=split", function()
{15:~ }| {15:~ }|
{15:~ }| {15:~ }|
{15:~ }| {15:~ }|
{10:[inc_sub] }| {10:[Preview] }|
:%s/tw/^ | :%s/tw/^ |
]]) ]])
@ -678,7 +678,7 @@ describe("incsubstitute=split", function()
{15:~ }| {15:~ }|
{15:~ }| {15:~ }|
{15:~ }| {15:~ }|
{10:[inc_sub] }| {10:[Preview] }|
:%s/tw/XX^ | :%s/tw/XX^ |
]]) ]])
end) end)
@ -723,7 +723,7 @@ describe("incsubstitute=split", function()
{15:~ }| {15:~ }|
{15:~ }| {15:~ }|
{15:~ }| {15:~ }|
{10:[inc_sub] }| {10:[Preview] }|
:%s/tw^ | :%s/tw^ |
]]) ]])
end) end)
@ -746,7 +746,7 @@ describe("incsubstitute=split", function()
{15:~ }| {15:~ }|
{15:~ }| {15:~ }|
{15:~ }| {15:~ }|
{10:[inc_sub] }| {10:[Preview] }|
:%s/M/123/g^ | :%s/M/123/g^ |
]]) ]])
end) end)
@ -794,7 +794,7 @@ describe("incsubstitute=split", function()
[1009]{12:X}o lines | [1009]{12:X}o lines |
[1011]{12:X}o lines | [1011]{12:X}o lines |
[1013]{12:X}o lines | [1013]{12:X}o lines |
{10:[inc_sub] }| {10:[Preview] }|
:%s/tw/X^ | :%s/tw/X^ |
]]) ]])
end) end)
@ -1204,7 +1204,7 @@ describe("'incsubstitute': split windows", function()
{15:~ }| {15:~ }|
{15:~ }| {15:~ }|
{15:~ }| {15:~ }|
{10:[inc_sub] }| {10:[Preview] }|
:%s/tw^ | :%s/tw^ |
]]) ]])
@ -1243,7 +1243,7 @@ describe("'incsubstitute': split windows", function()
{15:~ }| {15:~ }|
{15:~ }| {15:~ }|
{15:~ }| {15:~ }|
{10:[inc_sub] }| {10:[Preview] }|
:%s/tw^ | :%s/tw^ |
]]) ]])
end) end)
@ -1293,7 +1293,7 @@ describe("'incsubstitute': split windows", function()
{15:~ }| {15:~ }|
{15:~ }| {15:~ }|
{15:~ }| {15:~ }|
{10:[inc_sub] }| {10:[Preview] }|
:%s/tw^ | :%s/tw^ |
]]) ]])
end end