changeset 22568:fdc72bf4de35 v8.2.1832

patch 8.2.1832: readdirex() error is displayed as a message Commit: https://github.com/vim/vim/commit/aab9fada4a9b9725ff42dffe9c7daff20f0fd85f Author: Bram Moolenaar <Bram@vim.org> Date: Sun Oct 11 14:28:11 2020 +0200 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().
author Bram Moolenaar <Bram@vim.org>
date Sun, 11 Oct 2020 14:30:04 +0200
parents 2245779ade24
children 14b0cc97f92b
files src/fileio.c src/testdir/test_functions.vim src/version.c
diffstat 3 files changed, 6 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/src/fileio.c
+++ b/src/fileio.c
@@ -4743,7 +4743,7 @@ readdir_core(
     if (!ok)
     {
 	failed = TRUE;
-	smsg(_(e_notopen), path);
+	semsg(_(e_notopen), path);
     }
     else
     {
@@ -4813,7 +4813,7 @@ readdir_core(
     if (dirp == NULL)
     {
 	failed = TRUE;
-	smsg(_(e_notopen), path);
+	semsg(_(e_notopen), path);
     }
     else
     {
--- a/src/testdir/test_functions.vim
+++ b/src/testdir/test_functions.vim
@@ -1959,6 +1959,8 @@ func Test_readdirex()
         \ ['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()
--- a/src/version.c
+++ b/src/version.c
@@ -751,6 +751,8 @@ static char *(features[]) =
 static int included_patches[] =
 {   /* Add new patch number below this line */
 /**/
+    1832,
+/**/
     1831,
 /**/
     1830,