To: vim_dev@googlegroups.com Subject: Patch 8.0.0533 Fcc: outbox From: Bram Moolenaar Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ------------ Patch 8.0.0533 Problem: Abbreviation doesn't work after backspacing newline. (Hkonrk) Solution: Set the insert start column. (closes #1609) Files: src/testdir/test_mapping.vim, src/edit.c *** ../vim-8.0.0532/src/testdir/test_mapping.vim 2017-02-01 17:24:29.681328124 +0100 --- src/testdir/test_mapping.vim 2017-04-01 15:08:20.374827197 +0200 *************** *** 160,162 **** --- 160,173 ---- set nomodified iunmap endfunc + + func Test_abbr_after_line_join() + new + abbr foo bar + set backspace=indent,eol,start + exe "normal o\foo " + call assert_equal("bar ", getline(1)) + bwipe! + unabbr foo + set backspace& + endfunc *** ../vim-8.0.0532/src/edit.c 2017-03-31 22:27:08.617328400 +0200 --- src/edit.c 2017-04-01 15:10:49.921912543 +0200 *************** *** 9017,9023 **** #endif /* ! * delete newline! */ if (curwin->w_cursor.col == 0) { --- 9017,9023 ---- #endif /* ! * Delete newline! */ if (curwin->w_cursor.col == 0) { *************** *** 9032,9038 **** (linenr_T)(curwin->w_cursor.lnum + 1)) == FAIL) return FALSE; --Insstart.lnum; ! Insstart.col = MAXCOL; } /* * In replace mode: --- 9032,9038 ---- (linenr_T)(curwin->w_cursor.lnum + 1)) == FAIL) return FALSE; --Insstart.lnum; ! Insstart.col = STRLEN(ml_get(Insstart.lnum)); } /* * In replace mode: *** ../vim-8.0.0532/src/version.c 2017-04-01 14:13:11.866693326 +0200 --- src/version.c 2017-04-01 15:09:31.454392379 +0200 *************** *** 766,767 **** --- 766,769 ---- { /* Add new patch number below this line */ + /**/ + 533, /**/ -- hundred-and-one symptoms of being an internet addict: 245. You use Real Audio to listen to a radio station from a distant city rather than turn on your stereo system. /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ /// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ \\\ an exciting new programming language -- http://www.Zimbu.org /// \\\ help me help AIDS victims -- http://ICCF-Holland.org ///