Patch 8.2.3453
Problem:    Autocmd not executed when editing a directory ending in a path
            separator inside try block.
Solution:   Return NOTDONE instead of FAIL. (closes #8885)
Files:      src/fileio.c, src/testdir/test_autocmd.vim


*** ../vim-8.2.3452/src/fileio.c        2021-07-29 21:23:46.829817787 +0200
--- src/fileio.c        2021-09-22 14:13:00.953953596 +0200
***************
*** 338,344 ****
            filemess(curbuf, fname, (char_u *)_(msg_is_a_directory), 0);
            msg_end();
            msg_scroll = msg_save;
!           return FAIL;
        }
      }
  
--- 338,344 ----
            filemess(curbuf, fname, (char_u *)_(msg_is_a_directory), 0);
            msg_end();
            msg_scroll = msg_save;
!           return NOTDONE;
        }
      }
  
*** ../vim-8.2.3452/src/testdir/test_autocmd.vim        2021-08-05 
20:39:59.354053658 +0200
--- src/testdir/test_autocmd.vim        2021-09-22 14:12:35.922015976 +0200
***************
*** 2346,2351 ****
--- 2346,2364 ----
    au! throwing
  endfunc
  
+ func Test_autocmd_in_try_block()
+   call mkdir('Xdir')
+   au BufEnter * let g:fname = expand('%')
+   try
+     edit Xdir/
+   endtry
+   call assert_match('Xdir', g:fname)
+ 
+   unlet g:fname
+   au! BufEnter
+   call delete('Xdir', 'rf')
+ endfunc
+ 
  func Test_autocmd_SafeState()
    CheckRunVimInTerminal
  
*** ../vim-8.2.3452/src/version.c       2021-09-21 19:36:57.587801535 +0200
--- src/version.c       2021-09-22 14:06:03.094839250 +0200
***************
*** 759,760 ****
--- 759,762 ----
  {   /* Add new patch number below this line */
+ /**/
+     3453,
  /**/

-- 
There is a difference between "should work" and "does work",
it's called testing.

 /// Bram Moolenaar -- [email protected] -- http://www.Moolenaar.net   \\\
///                                                                      \\\
\\\        sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ ///
 \\\            help me help AIDS victims -- http://ICCF-Holland.org    ///

-- 
-- 
You received this message from the "vim_dev" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

--- 
You received this message because you are subscribed to the Google Groups 
"vim_dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/vim_dev/202109221220.18MCKEfh3316873%40masaka.moolenaar.net.

Raspunde prin e-mail lui