diff options
author | Jan Edmund Lazo <janedmundlazo@hotmail.com> | 2018-06-07 20:36:22 -0400 |
---|---|---|
committer | Jan Edmund Lazo <janedmundlazo@hotmail.com> | 2018-06-08 21:13:33 -0400 |
commit | 3bcbf802cea28e5f3632b7a226e46d6b8efa3668 (patch) | |
tree | 82413af681b5910796cec2f29fc6a11ce2d1e7c4 /src/nvim/edit.c | |
parent | aaece7849259185b116081641890764b6d459376 (diff) | |
download | rneovim-3bcbf802cea28e5f3632b7a226e46d6b8efa3668.tar.gz rneovim-3bcbf802cea28e5f3632b7a226e46d6b8efa3668.tar.bz2 rneovim-3bcbf802cea28e5f3632b7a226e46d6b8efa3668.zip |
vim-patch:8.0.0533: abbreviation doesn't work after backspacing newline
Problem: Abbreviation doesn't work after backspacing newline. (Hkonrk)
Solution: Set the insert start column. (closes vim/vim#1609)
https://github.com/vim/vim/commit/878c263a489b7e211eda31fa13a3d5ad9e120554
Diffstat (limited to 'src/nvim/edit.c')
-rw-r--r-- | src/nvim/edit.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/src/nvim/edit.c b/src/nvim/edit.c index 462762aea0..90b88ce82d 100644 --- a/src/nvim/edit.c +++ b/src/nvim/edit.c @@ -7545,9 +7545,7 @@ static bool ins_bs(int c, int mode, int *inserted_space_p) curwin->w_cursor.coladd = 0; } - /* - * delete newline! - */ + // Delete newline! if (curwin->w_cursor.col == 0) { lnum = Insstart.lnum; if (curwin->w_cursor.lnum == lnum || revins_on) { @@ -7556,7 +7554,7 @@ static bool ins_bs(int c, int mode, int *inserted_space_p) return false; } Insstart.lnum--; - Insstart.col = MAXCOL; + Insstart.col = STRLEN(ml_get(Insstart.lnum)); } /* * In replace mode: |