comparison src/edit.c @ 11295:d772bf077b3f v8.0.0533

patch 8.0.0533: abbreviation doesn't work after backspacing newline commit https://github.com/vim/vim/commit/878c263a489b7e211eda31fa13a3d5ad9e120554 Author: Bram Moolenaar <Bram@vim.org> Date: Sat Apr 1 15:15:52 2017 +0200 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 https://github.com/vim/vim/issues/1609)
author Christian Brabandt <cb@256bit.org>
date Sat, 01 Apr 2017 15:30:04 +0200
parents e0309111d976
children be499043ca70
comparison
equal deleted inserted replaced
11294:6a79bcf55287 11295:d772bf077b3f
9015 curwin->w_cursor.coladd = 0; 9015 curwin->w_cursor.coladd = 0;
9016 } 9016 }
9017 #endif 9017 #endif
9018 9018
9019 /* 9019 /*
9020 * delete newline! 9020 * Delete newline!
9021 */ 9021 */
9022 if (curwin->w_cursor.col == 0) 9022 if (curwin->w_cursor.col == 0)
9023 { 9023 {
9024 lnum = Insstart.lnum; 9024 lnum = Insstart.lnum;
9025 if (curwin->w_cursor.lnum == lnum 9025 if (curwin->w_cursor.lnum == lnum
9030 { 9030 {
9031 if (u_save((linenr_T)(curwin->w_cursor.lnum - 2), 9031 if (u_save((linenr_T)(curwin->w_cursor.lnum - 2),
9032 (linenr_T)(curwin->w_cursor.lnum + 1)) == FAIL) 9032 (linenr_T)(curwin->w_cursor.lnum + 1)) == FAIL)
9033 return FALSE; 9033 return FALSE;
9034 --Insstart.lnum; 9034 --Insstart.lnum;
9035 Insstart.col = MAXCOL; 9035 Insstart.col = STRLEN(ml_get(Insstart.lnum));
9036 } 9036 }
9037 /* 9037 /*
9038 * In replace mode: 9038 * In replace mode:
9039 * cc < 0: NL was inserted, delete it 9039 * cc < 0: NL was inserted, delete it
9040 * cc >= 0: NL was replaced, put original characters back 9040 * cc >= 0: NL was replaced, put original characters back