# HG changeset patch # User Christian Brabandt # Date 1484256604 -3600 # Node ID 3f777388b6adb7ac9a79119b9f627be163786aef # Parent 67602a764c5ba9f50c4905cd068a87e4cef03c1e patch 8.0.0176: cannot use :change inside a function definition commit https://github.com/vim/vim/commit/70bcd7336f9f19304f32c52a86ed5b4b3de852c2 Author: Bram Moolenaar Date: Thu Jan 12 22:20:54 2017 +0100 patch 8.0.0176: cannot use :change inside a function definition Problem: Using :change in between :function and :endfunction fails. Solution: Recognize :change inside a function. (ichizok, closes https://github.com/vim/vim/issues/1374) diff --git a/src/testdir/test_viml.vim b/src/testdir/test_viml.vim --- a/src/testdir/test_viml.vim +++ b/src/testdir/test_viml.vim @@ -1239,6 +1239,77 @@ func Test_num64() endfunc "------------------------------------------------------------------------------- +" Test 95: lines of :append, :change, :insert {{{1 +"------------------------------------------------------------------------------- + +function! DefineFunction(name, body) + let func = join(['function! ' . a:name . '()'] + a:body + ['endfunction'], "\n") + exec func +endfunction + +func Test_script_lines() + " :append + try + call DefineFunction('T_Append', [ + \ 'append', + \ 'py <