0
0
mirror of https://github.com/vim/vim.git synced 2025-09-26 04:04:07 -04:00

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 #1609)
This commit is contained in:
Bram Moolenaar
2017-04-01 15:15:52 +02:00
parent c77d675747
commit 878c263a48
3 changed files with 15 additions and 2 deletions

View File

@@ -9017,7 +9017,7 @@ ins_bs(
#endif
/*
* delete newline!
* Delete newline!
*/
if (curwin->w_cursor.col == 0)
{
@@ -9032,7 +9032,7 @@ ins_bs(
(linenr_T)(curwin->w_cursor.lnum + 1)) == FAIL)
return FALSE;
--Insstart.lnum;
Insstart.col = MAXCOL;
Insstart.col = STRLEN(ml_get(Insstart.lnum));
}
/*
* In replace mode:

View File

@@ -160,3 +160,14 @@ func Test_map_meta_quotes()
set nomodified
iunmap <M-">
endfunc
func Test_abbr_after_line_join()
new
abbr foo bar
set backspace=indent,eol,start
exe "normal o\<BS>foo "
call assert_equal("bar ", getline(1))
bwipe!
unabbr foo
set backspace&
endfunc

View File

@@ -764,6 +764,8 @@ static char *(features[]) =
static int included_patches[] =
{ /* Add new patch number below this line */
/**/
533,
/**/
532,
/**/