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 <buffer><silent> ~~7 <c-r>=repeat('~', 7)<CR><c-r>=Eatchar('\s')<cr>
+ call feedkeys("GA~~7 \<esc>", 'xt')
+ call assert_equal('~~~~~~~', getline('$'))
+ %d
+ call feedkeys("GA~~7\<cr>\<esc>", '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 -- [email protected] -- 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 ///
--
--
You received this message from the "vim_dev" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php
---
You received this message because you are subscribed to the Google Groups
"vim_dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/d/optout.