patch 8.2.1832: readdirex() error is displayed as a message
Problem: readdirex() error is displayed as a message. (Yegappan Lakshmanan)
Solution: Use semsg() instead of smsg().
diff --git a/src/fileio.c b/src/fileio.c
index 83924b3..3d6ff0d 100644
--- a/src/fileio.c
+++ b/src/fileio.c
@@ -4743,7 +4743,7 @@
if (!ok)
{
failed = TRUE;
- smsg(_(e_notopen), path);
+ semsg(_(e_notopen), path);
}
else
{
@@ -4813,7 +4813,7 @@
if (dirp == NULL)
{
failed = TRUE;
- smsg(_(e_notopen), path);
+ semsg(_(e_notopen), path);
}
else
{
diff --git a/src/testdir/test_functions.vim b/src/testdir/test_functions.vim
index b816125..e8c372c 100644
--- a/src/testdir/test_functions.vim
+++ b/src/testdir/test_functions.vim
@@ -1959,6 +1959,8 @@
\ ['bar.txt_file', 'dir_dir', 'foo.txt_file', 'link_link'])
endif
eval 'Xdir'->delete('rf')
+
+ call assert_fails('call readdirex("doesnotexist")', 'E484:')
endfunc
func Test_readdirex_sort()
diff --git a/src/version.c b/src/version.c
index b3cbf81..6368b5e 100644
--- a/src/version.c
+++ b/src/version.c
@@ -751,6 +751,8 @@
static int included_patches[] =
{ /* Add new patch number below this line */
/**/
+ 1832,
+/**/
1831,
/**/
1830,