mirror of
https://github.com/neovim/neovim.git
synced 2025-02-25 18:55:25 -06:00
vim-patch:8.2.0841: 'verbose' value 16 causes duplicate output
Problem: 'verbose' value 16 causes duplicate output.
Solution: Combine levels 15 and 16 into one message. (Christian Brabandt,
closes vim/vim#6153)
823654bc06
This commit is contained in:
parent
970d6ee0d1
commit
86ab4a1cb4
@ -6505,7 +6505,9 @@ A jump table for the options with a short description can be found at |Q_op|.
|
|||||||
>= 12 Every executed function.
|
>= 12 Every executed function.
|
||||||
>= 13 When an exception is thrown, caught, finished, or discarded.
|
>= 13 When an exception is thrown, caught, finished, or discarded.
|
||||||
>= 14 Anything pending in a ":finally" clause.
|
>= 14 Anything pending in a ":finally" clause.
|
||||||
>= 15 Every executed Ex command (truncated at 200 characters).
|
>= 15 Every executed Ex command from a script (truncated at 200
|
||||||
|
characters).
|
||||||
|
>= 16 Every executed Ex command
|
||||||
|
|
||||||
This option can also be set with the "-V" argument. See |-V|.
|
This option can also be set with the "-V" argument. See |-V|.
|
||||||
This option is also set by the |:verbose| command.
|
This option is also set by the |:verbose| command.
|
||||||
|
@ -588,7 +588,7 @@ int do_cmdline(char_u *cmdline, LineGetter fgetline,
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (p_verbose >= 15 && sourcing_name != NULL) {
|
if ((p_verbose >= 15 && sourcing_name != NULL) || p_verbose >= 16) {
|
||||||
msg_verbose_cmd(sourcing_lnum, cmdline_copy);
|
msg_verbose_cmd(sourcing_lnum, cmdline_copy);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1281,10 +1281,6 @@ static char_u * do_one_cmd(char_u **cmdlinep,
|
|||||||
goto doend;
|
goto doend;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (p_verbose >= 16) {
|
|
||||||
msg_verbose_cmd(0, *cmdlinep);
|
|
||||||
}
|
|
||||||
|
|
||||||
// 1. Skip comment lines and leading white space and colons.
|
// 1. Skip comment lines and leading white space and colons.
|
||||||
// 2. Handle command modifiers.
|
// 2. Handle command modifiers.
|
||||||
|
|
||||||
|
@ -722,6 +722,7 @@ func Test_verbosefile()
|
|||||||
endfunc
|
endfunc
|
||||||
|
|
||||||
func Test_verbose_option()
|
func Test_verbose_option()
|
||||||
|
" See test/functional/ui/cmdline_spec.lua
|
||||||
CheckScreendump
|
CheckScreendump
|
||||||
|
|
||||||
let lines =<< trim [SCRIPT]
|
let lines =<< trim [SCRIPT]
|
||||||
|
@ -3,6 +3,7 @@ local Screen = require('test.functional.ui.screen')
|
|||||||
local clear, feed = helpers.clear, helpers.feed
|
local clear, feed = helpers.clear, helpers.feed
|
||||||
local source = helpers.source
|
local source = helpers.source
|
||||||
local command = helpers.command
|
local command = helpers.command
|
||||||
|
local feed_command = helpers.feed_command
|
||||||
|
|
||||||
local function new_screen(opt)
|
local function new_screen(opt)
|
||||||
local screen = Screen.new(25, 5)
|
local screen = Screen.new(25, 5)
|
||||||
@ -842,3 +843,34 @@ describe('cmdline redraw', function()
|
|||||||
]], unchanged=true}
|
]], unchanged=true}
|
||||||
end)
|
end)
|
||||||
end)
|
end)
|
||||||
|
|
||||||
|
describe('cmdline', function()
|
||||||
|
before_each(function()
|
||||||
|
clear()
|
||||||
|
end)
|
||||||
|
|
||||||
|
it('prints every executed Ex command if verbose >= 16', function()
|
||||||
|
local screen = Screen.new(50, 12)
|
||||||
|
screen:attach()
|
||||||
|
source([[
|
||||||
|
command DoSomething echo 'hello' |set ts=4 |let v = '123' |echo v
|
||||||
|
call feedkeys("\r", 't') " for the hit-enter prompt
|
||||||
|
set verbose=20
|
||||||
|
]])
|
||||||
|
feed_command('DoSomething')
|
||||||
|
screen:expect([[
|
||||||
|
|
|
||||||
|
~ |
|
||||||
|
|
|
||||||
|
Executing: DoSomething |
|
||||||
|
Executing: echo 'hello' |set ts=4 |let v = '123' ||
|
||||||
|
echo v |
|
||||||
|
hello |
|
||||||
|
Executing: set ts=4 |let v = '123' |echo v |
|
||||||
|
Executing: let v = '123' |echo v |
|
||||||
|
Executing: echo v |
|
||||||
|
123 |
|
||||||
|
Press ENTER or type command to continue^ |
|
||||||
|
]])
|
||||||
|
end)
|
||||||
|
end)
|
||||||
|
Loading…
Reference in New Issue
Block a user