sst->save_finish_op = finish_op;
sst->save_opcount = opcount;
sst->save_reg_executing = reg_executing;
+ sst->save_script_version = current_sctx.sc_version;
- msg_scroll = FALSE; // no msg scrolling in Normal mode
- restart_edit = 0; // don't go to Insert mode
- p_im = FALSE; // don't use 'insertmode'
+ msg_scroll = FALSE; // no msg scrolling in Normal mode
+ restart_edit = 0; // don't go to Insert mode
+ p_im = FALSE; // don't use 'insertmode'
+ current_sctx.sc_version = 1; // not in Vim9 script
/*
* Save the current typeahead. This is required to allow using ":normal"
opcount = sst->save_opcount;
reg_executing = sst->save_reg_executing;
msg_didout |= sst->save_msg_didout; // don't reset msg_didout now
+ current_sctx.sc_version = sst->save_script_version;
// Restore the state (needed when called from a function executed for
// 'indentexpr'). Update the mouse and cursor, they may have changed.
bwipe!
enddef
+def InvokeNormal()
+ exe "norm! :m+1\r"
+enddef
+
+def Test_invoke_normal_in_visual_mode()
+ xnoremap <F3> <Cmd>call <SID>InvokeNormal()<CR>
+ new
+ setline(1, ['aaa', 'bbb'])
+ feedkeys("V\<F3>", 'xt')
+ assert_equal(['bbb', 'aaa'], getline(1, 2))
+ xunmap <F3>
+enddef
+
" Keep this last, it messes up highlighting.
def Test_substitute_cmd()
new