0
0
mirror of https://github.com/vim/vim.git synced 2025-09-23 03:43:49 -04:00

patch 8.2.4506: "pattern not found" for :global is not an error message

Problem:    "pattern not found" for :global is not an error message.
Solution:   In Vim9 script make this an actual error, so that try/catch can be
            used as expected.
This commit is contained in:
Bram Moolenaar
2022-03-04 21:34:31 +00:00
parent f07751457c
commit 24d9c0557e
4 changed files with 36 additions and 3 deletions

View File

@@ -5001,9 +5001,19 @@ ex_global(exarg_T *eap)
else if (ndone == 0)
{
if (type == 'v')
smsg(_("Pattern found in every line: %s"), pat);
{
if (in_vim9script())
semsg(_(e_pattern_found_in_every_line_str), pat);
else
smsg(_("Pattern found in every line: %s"), pat);
}
else
smsg(_("Pattern not found: %s"), pat);
{
if (in_vim9script())
semsg(_(e_pattern_not_found_str), pat);
else
smsg(_("Pattern not found: %s"), pat);
}
}
else
{