diff options
author | Björn Linse <bjorn.linse@gmail.com> | 2021-12-10 17:35:06 +0100 |
---|---|---|
committer | Björn Linse <bjorn.linse@gmail.com> | 2021-12-10 17:35:06 +0100 |
commit | 29517d95b74bec4e02ec75e6720a55671ead6529 (patch) | |
tree | 0640081819545a0f99ef06b50d327b7ed6269b04 /src | |
parent | c88555418a991407a46b74dc038a0b08ad0f0162 (diff) | |
download | rneovim-29517d95b74bec4e02ec75e6720a55671ead6529.tar.gz rneovim-29517d95b74bec4e02ec75e6720a55671ead6529.tar.bz2 rneovim-29517d95b74bec4e02ec75e6720a55671ead6529.zip |
refactor(misc1): move insertmode related function to edit.c
Diffstat (limited to 'src')
-rw-r--r-- | src/nvim/edit.c | 10 | ||||
-rw-r--r-- | src/nvim/misc1.c | 10 |
2 files changed, 10 insertions, 10 deletions
diff --git a/src/nvim/edit.c b/src/nvim/edit.c index 9bfb8a9d4a..424b6b40b1 100644 --- a/src/nvim/edit.c +++ b/src/nvim/edit.c @@ -832,6 +832,16 @@ static int insert_execute(VimState *state, int key) return insert_handle_key(s); } + +/// Return true when need to go to Insert mode because of 'insertmode'. +/// +/// Don't do this when still processing a command or a mapping. +/// Don't do this when inside a ":normal" command. +bool goto_im(void) +{ + return p_im && stuff_empty() && typebuf_typed(); +} + static int insert_handle_key(InsertState *s) { // The big switch to handle a character in insert mode. diff --git a/src/nvim/misc1.c b/src/nvim/misc1.c index 7a53775cbc..44ea895a47 100644 --- a/src/nvim/misc1.c +++ b/src/nvim/misc1.c @@ -437,13 +437,3 @@ done: xfree(tempname); return buffer; } - -/* - * Return TRUE when need to go to Insert mode because of 'insertmode'. - * Don't do this when still processing a command or a mapping. - * Don't do this when inside a ":normal" command. - */ -int goto_im(void) -{ - return p_im && stuff_empty() && typebuf_typed(); -} |