summaryrefslogtreecommitdiffstats
path: root/src/ex_cmds.c
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2022-03-04 21:34:31 +0000
committerBram Moolenaar <Bram@vim.org>2022-03-04 21:34:31 +0000
commit24d9c0557ef52141d12ac32568967b190d247c6f (patch)
tree49ea9a439a258adc97e5897364ef5a63ca6f7c53 /src/ex_cmds.c
parentf07751457c39a645009c17cd837131f6bcdd7d55 (diff)
patch 8.2.4506: "pattern not found" for :global is not an error messagev8.2.4506
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.
Diffstat (limited to 'src/ex_cmds.c')
-rw-r--r--src/ex_cmds.c14
1 files changed, 12 insertions, 2 deletions
diff --git a/src/ex_cmds.c b/src/ex_cmds.c
index 91a2fa722d..d926df5361 100644
--- a/src/ex_cmds.c
+++ b/src/ex_cmds.c
@@ -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
{