]> granicus.if.org Git - vim/commitdiff
patch 8.2.1832: readdirex() error is displayed as a message v8.2.1832
authorBram Moolenaar <Bram@vim.org>
Sun, 11 Oct 2020 12:28:11 +0000 (14:28 +0200)
committerBram Moolenaar <Bram@vim.org>
Sun, 11 Oct 2020 12:28:11 +0000 (14:28 +0200)
Problem:    readdirex() error is displayed as a message. (Yegappan Lakshmanan)
Solution:   Use semsg() instead of smsg().

src/fileio.c
src/testdir/test_functions.vim
src/version.c

index 83924b352cf01f4202bd48a2ee06405b1eb51071..3d6ff0da3219e81f4332f1b1c3b9df908e99dcb6 100644 (file)
@@ -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
     {
index b8161254865bfb86d3d1ea1451361fc83b970caf..e8c372cd2ce3e1c2d4a8303fbf928b44f712c856 100644 (file)
@@ -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()
index b3cbf811b8176375ffcb60e0c6c02d79bf8c3453..6368b5e5b9cd03899c0ed0fad1417f1aeeaa47a7 100644 (file)
@@ -750,6 +750,8 @@ static char *(features[]) =
 
 static int included_patches[] =
 {   /* Add new patch number below this line */
+/**/
+    1832,
 /**/
     1831,
 /**/