diff options
Diffstat (limited to 'src/nvim/edit.c')
-rw-r--r-- | src/nvim/edit.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/nvim/edit.c b/src/nvim/edit.c index f7ce0afd36..7a0487bb64 100644 --- a/src/nvim/edit.c +++ b/src/nvim/edit.c @@ -1096,7 +1096,7 @@ static int insert_handle_key(InsertState *s) cmdwin_result = CAR; return 0; } - if (ins_eol(s->c) && !p_im) { + if (!ins_eol(s->c) && !p_im) { return 0; // out of memory } auto_format(false, false); @@ -8356,14 +8356,14 @@ static bool ins_tab(void) /// Handle CR or NL in insert mode. /// -/// @return true when it can't undo. +/// @return false when it can't undo. static bool ins_eol(int c) { if (echeck_abbr(c + ABBR_OFF)) { - return false; + return true; } if (stop_arrow() == FAIL) { - return true; + return false; } undisplay_dollar(); @@ -8405,7 +8405,7 @@ static bool ins_eol(int c) // When inserting a line the cursor line must never be in a closed fold. foldOpenCursor(); - return !i; + return i; } /* |