Mercurial > vim
diff src/edit.c @ 13772:cc21507ee4b1 v8.0.1758
patch 8.0.1758: open_line() returns TRUE/FALSE for success/failure
commit https://github.com/vim/vim/commit/24a2d7264fc2394f69a9a890b34d1f09cf63b14e
Author: Bram Moolenaar <Bram@vim.org>
Date: Tue Apr 24 19:36:43 2018 +0200
patch 8.0.1758: open_line() returns TRUE/FALSE for success/failure
Problem: open_line() returns TRUE/FALSE for success/failure.
Solution: Return OK or FAIL.
author | Christian Brabandt <cb@256bit.org> |
---|---|
date | Tue, 24 Apr 2018 19:45:07 +0200 |
parents | 66b1d74be322 |
children | a27d380b257f |
line wrap: on
line diff
--- a/src/edit.c +++ b/src/edit.c @@ -1374,7 +1374,7 @@ doESCkey: goto doESCkey; } #endif - if (ins_eol(c) && !p_im) + if (ins_eol(c) == FAIL && !p_im) goto doESCkey; /* out of memory */ auto_format(FALSE, FALSE); inserted_space = FALSE; @@ -10201,7 +10201,7 @@ ins_tab(void) /* * Handle CR or NL in insert mode. - * Return TRUE when out of memory or can't undo. + * Return FAIL when out of memory or can't undo. */ static int ins_eol(int c) @@ -10266,7 +10266,7 @@ ins_eol(int c) foldOpenCursor(); #endif - return (!i); + return i; } #ifdef FEAT_DIGRAPHS