comparison src/ex_cmds.c @ 28371:c3a7be75ef16 v8.2.4711

patch 8.2.4711: when 'insermode' is set :edit from <Cmd> mapping misbehaves Commit: https://github.com/vim/vim/commit/3a56b6d405fc0f1ca928b77382f97d0c552bea64 Author: zeertzjq <zeertzjq@outlook.com> Date: Fri Apr 8 11:56:14 2022 +0100 patch 8.2.4711: when 'insermode' is set :edit from <Cmd> mapping misbehaves Problem: When 'insermode' is set :edit from <Cmd> mapping misbehaves. Solution: Don't set "need_start_insertmode" when already in Insert mode. (closes #10116)
author Bram Moolenaar <Bram@vim.org>
date Fri, 08 Apr 2022 13:00:04 +0200
parents aa533dc41223
children e015d650ea9f
comparison
equal deleted inserted replaced
28370:953e5ee8ce51 28371:c3a7be75ef16
3180 curwin->w_scbind_pos = curwin->w_topline; 3180 curwin->w_scbind_pos = curwin->w_topline;
3181 *so_ptr = n; 3181 *so_ptr = n;
3182 redraw_curbuf_later(NOT_VALID); // redraw this buffer later 3182 redraw_curbuf_later(NOT_VALID); // redraw this buffer later
3183 } 3183 }
3184 3184
3185 if (p_im) 3185 if (p_im && (State & INSERT) == 0)
3186 need_start_insertmode = TRUE; 3186 need_start_insertmode = TRUE;
3187 3187
3188 #ifdef FEAT_AUTOCHDIR 3188 #ifdef FEAT_AUTOCHDIR
3189 // Change directories when the 'acd' option is set and we aren't already in 3189 // Change directories when the 'acd' option is set and we aren't already in
3190 // that directory (should already be done above). Expect getcwd() to be 3190 // that directory (should already be done above). Expect getcwd() to be