Mercurial > vim
comparison src/testdir/test_mapping.vim @ 13788:a27d380b257f v8.0.1766
patch 8.0.1766: expanding abbreviation doesn't work
commit https://github.com/vim/vim/commit/c3c3e698966fac86dee94799b70947defb85440d
Author: Bram Moolenaar <Bram@vim.org>
Date: Thu Apr 26 22:30:33 2018 +0200
patch 8.0.1766: expanding abbreviation doesn't work
Problem: Expanding abbreviation doesn't work. (Tooth Pik)
Solution: Return OK instead of FALSE and FAIL instead of TRUE. (Christian
Brabandt)
author | Christian Brabandt <cb@256bit.org> |
---|---|
date | Thu, 26 Apr 2018 22:45:07 +0200 |
parents | 74a40efb39ea |
children | bea665293ea0 |
comparison
equal
deleted
inserted
replaced
13787:458d0b50ba95 | 13788:a27d380b257f |
---|---|
196 nunmap bb | 196 nunmap bb |
197 nunmap b | 197 nunmap b |
198 set timeoutlen& | 198 set timeoutlen& |
199 delfunc ExitInsert | 199 delfunc ExitInsert |
200 endfunc | 200 endfunc |
201 | |
202 func Test_abbreviation_CR() | |
203 new | |
204 func Eatchar(pat) | |
205 let c = nr2char(getchar(0)) | |
206 return (c =~ a:pat) ? '' : c | |
207 endfunc | |
208 iabbrev <buffer><silent> ~~7 <c-r>=repeat('~', 7)<CR><c-r>=Eatchar('\s')<cr> | |
209 call feedkeys("GA~~7 \<esc>", 'xt') | |
210 call assert_equal('~~~~~~~', getline('$')) | |
211 %d | |
212 call feedkeys("GA~~7\<cr>\<esc>", 'xt') | |
213 call assert_equal(['~~~~~~~', ''], getline(1,'$')) | |
214 delfunc Eatchar | |
215 bw! | |
216 endfunc |