Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #ifdef FEAT_AUTOCMD
- /*
- * Trigger InsertEnter autocommands. Do not do this for "r<CR>" or "grx".
- */
- if (cmdchar != 'r' && cmdchar != 'v')
- {
- pos_T save_cursor = curwin->w_cursor;
- # ifdef FEAT_EVAL
- if (cmdchar == 'R')
- ptr = (char_u *)"r";
- else if (cmdchar == 'V')
- ptr = (char_u *)"v";
- else
- ptr = (char_u *)"i";
- set_vim_var_string(VV_INSERTMODE, ptr, 1);
- # endif
- apply_autocmds(EVENT_INSERTENTER, NULL, NULL, FALSE, curbuf);
- /* Since Insert mode was not started yet a call to check_cursor_col()
- * may have moved the cursor, especially with the "A" command. */
- if (curwin->w_cursor.col != save_cursor.col
- && curwin->w_cursor.lnum == save_cursor.lnum)
- {
- int save_state = State;
- curwin->w_cursor = save_cursor;
- State = INSERT;
- check_cursor_col();
- State = save_state;
- }
- }
- #endif
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement