Permalink
Browse files

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)
  • Loading branch information...
brammool committed Apr 1, 2017
1 parent c77d675 commit 878c263a489b7e211eda31fa13a3d5ad9e120554
Showing with 15 additions and 2 deletions.
  1. +2 −2 src/edit.c
  2. +11 −0 src/testdir/test_mapping.vim
  3. +2 −0 src/version.c
View
@@ -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:
@@ -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
@@ -764,6 +764,8 @@ static char *(features[]) =
static int included_patches[] =
{ /* Add new patch number below this line */
/**/
533,
/**/
532,
/**/

0 comments on commit 878c263

Please sign in to comment.