Patch 8.2.3610
Problem: Crash when ModeChanged triggered too early.
Solution: Trigger ModeChanged after setting VIsual.
Files: src/normal.c, src/testdir/test_edit.vim
*** ../vim-8.2.3609/src/normal.c 2021-11-12 10:29:42.178810539 +0000
--- src/normal.c 2021-11-17 16:51:53.554737557 +0000
***************
*** 5778,5784 ****
VIsual_mode = c;
VIsual_active = TRUE;
VIsual_reselect = TRUE;
- trigger_modechanged();
// Corner case: the 0 position in a tab may change when going into
// virtualedit. Recalculate curwin->w_cursor to avoid bad highlighting.
--- 5778,5783 ----
***************
*** 5793,5798 ****
--- 5792,5798 ----
foldAdjustVisual();
#endif
+ trigger_modechanged();
setmouse();
#ifdef FEAT_CONCEAL
// Check if redraw is needed after changing the state.
*** ../vim-8.2.3609/src/testdir/test_edit.vim 2021-11-17 15:51:46.421992164 +0000
--- src/testdir/test_edit.vim 2021-11-17 16:51:26.342778284 +0000
***************
*** 2037,2043 ****
func Test_recursive_ModeChanged()
au! ModeChanged * norm 0u
sil! norm
! au!
endfunc
" Test toggling of input method. See :help i_CTRL-^
--- 2037,2051 ----
func Test_recursive_ModeChanged()
au! ModeChanged * norm 0u
sil! norm
! au! ModeChanged
! endfunc
!
! func Test_ModeChanged_starts_visual()
! " This was triggering ModeChanged before setting VIsual, causing a crash.
! au! ModeChanged * norm 0u
! sil! norm
!
! au! ModeChanged
endfunc
" Test toggling of input method. See :help i_CTRL-^
*** ../vim-8.2.3609/src/version.c 2021-11-17 15:51:46.421992164 +0000
--- src/version.c 2021-11-17 16:46:45.095188414 +0000
***************
*** 759,760 ****
--- 759,762 ----
{ /* Add new patch number below this line */
+ /**/
+ 3610,
/**/
--
FATHER: You killed eight wedding guests in all!
LAUNCELOT: Er, Well ... the thing is ... I thought your son was a lady.
FATHER: I can understand that.
"Monty Python and the Holy Grail" PYTHON (MONTY) PICTURES LTD
/// Bram Moolenaar -- Br...@Moolenaar.net --
http://www.Moolenaar.net \\\
/// \\\
\\\ sponsor Vim, vote for features --
http://www.Vim.org/sponsor/ ///
\\\ help me help AIDS victims --
http://ICCF-Holland.org ///