aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/ex_docmd.c
diff options
context:
space:
mode:
authorMichael Ennen <mike.ennen@gmail.com>2016-05-22 01:25:36 -0700
committerMichael Ennen <mike.ennen@gmail.com>2016-06-04 13:08:48 -0700
commit40e7efe91cb60fc65eafece2c923a527d55de20d (patch)
treef97393ed2614a88fbf894b1a14893a786267f7be /src/nvim/ex_docmd.c
parent02e6914a938fcca98f9062d502accb4d68a65d6e (diff)
downloadrneovim-40e7efe91cb60fc65eafece2c923a527d55de20d.tar.gz
rneovim-40e7efe91cb60fc65eafece2c923a527d55de20d.tar.bz2
rneovim-40e7efe91cb60fc65eafece2c923a527d55de20d.zip
vim-patch:7.4.1150
Problem: 'langmap' applies to the first character typed in Select mode. (David Watson) Solution: Check for SELECTMODE. (Christian Brabandt, closes #572) Add the 'x' flag to feedkeys(). https://github.com/vim/vim/commit/25281634cda03ce302aaf9f906a9520b5f81f91e
Diffstat (limited to 'src/nvim/ex_docmd.c')
-rw-r--r--src/nvim/ex_docmd.c20
1 files changed, 11 insertions, 9 deletions
diff --git a/src/nvim/ex_docmd.c b/src/nvim/ex_docmd.c
index dea52ee112..c0d5c37bc9 100644
--- a/src/nvim/ex_docmd.c
+++ b/src/nvim/ex_docmd.c
@@ -7858,19 +7858,21 @@ static void ex_stopinsert(exarg_T *eap)
*/
void exec_normal_cmd(char_u *cmd, int remap, bool silent)
{
+ // Stuff the argument into the typeahead buffer.
+ ins_typebuf(cmd, remap, 0, true, silent);
+ exec_normal(false);
+}
+
+void exec_normal(int was_typed)
+{
oparg_T oa;
- /*
- * Stuff the argument into the typeahead buffer.
- * Execute normal_cmd() until there is no typeahead left.
- */
clear_oparg(&oa);
- finish_op = FALSE;
- ins_typebuf(cmd, remap, 0, TRUE, silent);
- while ((!stuff_empty() || (!typebuf_typed() && typebuf.tb_len > 0))
- && !got_int) {
+ finish_op = false;
+ while ((!stuff_empty() || ((was_typed || !typebuf_typed())
+ && typebuf.tb_len > 0)) && !got_int) {
update_topline_cursor();
- normal_cmd(&oa, TRUE); /* execute a Normal mode cmd */
+ normal_cmd(&oa, true); // execute a Normal mode cmd
}
}