To: vim_dev@googlegroups.com Subject: Patch 8.0.1766 Fcc: outbox From: Bram Moolenaar Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ------------ Patch 8.0.1766 (after 8.0.1758) Problem: Expanding abbreviation doesn't work. (Tooth Pik) Solution: Return OK instead of FALSE and FAIL instead of TRUE. (Christian Brabandt) Files: src/edit.c, src/testdir/test_mapping.vim *** ../vim-8.0.1765/src/edit.c 2018-04-24 19:36:37.504162815 +0200 --- src/edit.c 2018-04-26 22:25:13.888562713 +0200 *************** *** 10209,10217 **** int i; if (echeck_abbr(c + ABBR_OFF)) ! return FALSE; if (stop_arrow() == FAIL) ! return TRUE; undisplay_dollar(); /* --- 10209,10217 ---- int i; if (echeck_abbr(c + ABBR_OFF)) ! return OK; if (stop_arrow() == FAIL) ! return FAIL; undisplay_dollar(); /* *** ../vim-8.0.1765/src/testdir/test_mapping.vim 2017-04-23 18:49:32.835266950 +0200 --- src/testdir/test_mapping.vim 2018-04-26 22:24:48.312719270 +0200 *************** *** 198,200 **** --- 198,216 ---- set timeoutlen& delfunc ExitInsert endfunc + + func Test_abbreviation_CR() + new + func Eatchar(pat) + let c = nr2char(getchar(0)) + return (c =~ a:pat) ? '' : c + endfunc + iabbrev ~~7 =repeat('~', 7)=Eatchar('\s') + call feedkeys("GA~~7 \", 'xt') + call assert_equal('~~~~~~~', getline('$')) + %d + call feedkeys("GA~~7\\", 'xt') + call assert_equal(['~~~~~~~', ''], getline(1,'$')) + delfunc Eatchar + bw! + endfunc *** ../vim-8.0.1765/src/version.c 2018-04-25 22:38:12.229806367 +0200 --- src/version.c 2018-04-26 22:29:42.162885197 +0200 *************** *** 763,764 **** --- 763,766 ---- { /* Add new patch number below this line */ + /**/ + 1766, /**/ -- press CTRL-ALT-DEL for more information /// 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 ///