From 2d10cd478047df8ba144d4b0fcc46480993af57f Mon Sep 17 00:00:00 2001
From: Bram Moolenaar <Bram@vim.org>
Date: Thu, 19 Mar 2020 14:37:30 +0100
Subject: [PATCH] patch 8.2.0407: no early check if :find and :sfind have an
 argument

Problem:    No early check if :find and :sfind have an argument.
Solution:   Add EX_NEEDARG.

Reference:https://github.com/vim/vim/commit/2d10cd478047df8ba144d4b0fcc46480993af57f
---
 src/ex_cmds.h                      | 4 ++--
 src/testdir/test_find_complete.vim | 8 ++++----
 2 files changed, 6 insertions(+), 6 deletions(-)

diff --git a/src/ex_cmds.h b/src/ex_cmds.h
index 983378c..28ea6ee 100644
--- a/src/ex_cmds.h
+++ b/src/ex_cmds.h
@@ -572,7 +572,7 @@ EXCMD(CMD_filter,	"filter",	ex_wrongmodifier,
 	EX_BANG|EX_NEEDARG|EX_EXTRA|EX_NOTRLCOM,
 	ADDR_NONE),
 EXCMD(CMD_find,		"find",		ex_find,
-	EX_RANGE|EX_BANG|EX_FILE1|EX_CMDARG|EX_ARGOPT|EX_TRLBAR,
+	EX_RANGE|EX_BANG|EX_FILE1|EX_CMDARG|EX_ARGOPT|EX_TRLBAR|EX_NEEDARG,
 	ADDR_OTHER),
 EXCMD(CMD_finally,	"finally",	ex_finally,
 	EX_TRLBAR|EX_SBOXOK|EX_CMDWIN,
@@ -1319,7 +1319,7 @@ EXCMD(CMD_setlocal,	"setlocal",	ex_set,
 	EX_TRLBAR|EX_EXTRA|EX_CMDWIN|EX_SBOXOK,
 	ADDR_NONE),
 EXCMD(CMD_sfind,	"sfind",	ex_splitview,
-	EX_BANG|EX_FILE1|EX_RANGE|EX_CMDARG|EX_ARGOPT|EX_TRLBAR,
+	EX_BANG|EX_FILE1|EX_RANGE|EX_CMDARG|EX_ARGOPT|EX_TRLBAR|EX_NEEDARG,
 	ADDR_OTHER),
 EXCMD(CMD_sfirst,	"sfirst",	ex_rewind,
 	EX_EXTRA|EX_BANG|EX_CMDARG|EX_ARGOPT|EX_TRLBAR,
diff --git a/src/testdir/test_find_complete.vim b/src/testdir/test_find_complete.vim
index 679bf3c..32ca967 100644
--- a/src/testdir/test_find_complete.vim
+++ b/src/testdir/test_find_complete.vim
@@ -15,22 +15,22 @@ func Test_find_complete()
 
   new
   set path=
-  call assert_fails('call feedkeys(":find\t\n", "xt")', 'E345:')
+  call assert_fails('call feedkeys(":find \t\n", "xt")', 'E471:')
   close
 
   new
   set path=.
-  call assert_fails('call feedkeys(":find\t\n", "xt")', 'E32:')
+  call assert_fails('call feedkeys(":find \t\n", "xt")', 'E471:')
   close
 
   new
   set path=.,,
-  call assert_fails('call feedkeys(":find\t\n", "xt")', 'E32:')
+  call assert_fails('call feedkeys(":find \t\n", "xt")', 'E471:')
   close
 
   new
   set path=./**
-  call assert_fails('call feedkeys(":find\t\n", "xt")', 'E32:')
+  call assert_fails('call feedkeys(":find \t\n", "xt")', 'E471:')
   close
 
   " We shouldn't find any file till this point
-- 
2.23.0