# HG changeset patch # User Bram Moolenaar # Date 1602419404 -7200 # Node ID fdc72bf4de350848052b09ebd7e30eddf501a0b1 # Parent 2245779ade249432332740be2ed4b97c458cafdb patch 8.2.1832: readdirex() error is displayed as a message Commit: https://github.com/vim/vim/commit/aab9fada4a9b9725ff42dffe9c7daff20f0fd85f Author: Bram Moolenaar 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(). diff --git a/src/fileio.c b/src/fileio.c --- 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 { diff --git a/src/testdir/test_functions.vim b/src/testdir/test_functions.vim --- 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() diff --git a/src/version.c b/src/version.c --- 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,