|
|
22c937 |
To: vim_dev@googlegroups.com
|
|
|
22c937 |
Subject: Patch 7.4.549
|
|
|
22c937 |
Fcc: outbox
|
|
|
22c937 |
From: Bram Moolenaar <Bram@moolenaar.net>
|
|
|
22c937 |
Mime-Version: 1.0
|
|
|
22c937 |
Content-Type: text/plain; charset=UTF-8
|
|
|
22c937 |
Content-Transfer-Encoding: 8bit
|
|
|
22c937 |
------------
|
|
|
22c937 |
|
|
|
22c937 |
Patch 7.4.549
|
|
|
22c937 |
Problem: Function name not recognized correctly when inside a function.
|
|
|
22c937 |
Solution: Don't check for an alpha character.
|
|
|
22c937 |
Files: src/eval.c, src/testdir/test_nested_function.in,
|
|
|
22c937 |
src/testdir/test_nested_function.ok, src/testdir/Make_amiga.mak,
|
|
|
22c937 |
src/testdir/Make_dos.mak, src/testdir/Make_ming.mak,
|
|
|
22c937 |
src/testdir/Make_os2.mak, src/testdir/Make_vms.mms,
|
|
|
22c937 |
src/testdir/Makefile
|
|
|
22c937 |
|
|
|
22c937 |
|
|
|
22c937 |
*** ../vim-7.4.548/src/eval.c 2014-12-07 00:18:27.524203161 +0100
|
|
|
22c937 |
--- src/eval.c 2014-12-13 20:27:16.728347709 +0100
|
|
|
22c937 |
***************
|
|
|
22c937 |
*** 22283,22296 ****
|
|
|
22c937 |
if (*p == '!')
|
|
|
22c937 |
p = skipwhite(p + 1);
|
|
|
22c937 |
p += eval_fname_script(p);
|
|
|
22c937 |
! if (ASCII_ISALPHA(*p))
|
|
|
22c937 |
{
|
|
|
22c937 |
! vim_free(trans_function_name(&p, TRUE, 0, NULL));
|
|
|
22c937 |
! if (*skipwhite(p) == '(')
|
|
|
22c937 |
! {
|
|
|
22c937 |
! ++nesting;
|
|
|
22c937 |
! indent += 2;
|
|
|
22c937 |
! }
|
|
|
22c937 |
}
|
|
|
22c937 |
}
|
|
|
22c937 |
|
|
|
22c937 |
--- 22283,22293 ----
|
|
|
22c937 |
if (*p == '!')
|
|
|
22c937 |
p = skipwhite(p + 1);
|
|
|
22c937 |
p += eval_fname_script(p);
|
|
|
22c937 |
! vim_free(trans_function_name(&p, TRUE, 0, NULL));
|
|
|
22c937 |
! if (*skipwhite(p) == '(')
|
|
|
22c937 |
{
|
|
|
22c937 |
! ++nesting;
|
|
|
22c937 |
! indent += 2;
|
|
|
22c937 |
}
|
|
|
22c937 |
}
|
|
|
22c937 |
|
|
|
22c937 |
*** ../vim-7.4.548/src/testdir/test_nested_function.in 2014-12-13 21:00:22.243356614 +0100
|
|
|
22c937 |
--- src/testdir/test_nested_function.in 2014-12-13 20:21:18.080145982 +0100
|
|
|
22c937 |
***************
|
|
|
22c937 |
*** 0 ****
|
|
|
22c937 |
--- 1,34 ----
|
|
|
22c937 |
+ Tests for Nested function vim: set ft=vim :
|
|
|
22c937 |
+
|
|
|
22c937 |
+ STARTTEST
|
|
|
22c937 |
+ :so small.vim
|
|
|
22c937 |
+ :fu! NestedFunc()
|
|
|
22c937 |
+ : fu! Func1()
|
|
|
22c937 |
+ : $put ='Func1'
|
|
|
22c937 |
+ : endfunction
|
|
|
22c937 |
+ : call Func1()
|
|
|
22c937 |
+ : fu! s:func2()
|
|
|
22c937 |
+ : $put ='s:func2'
|
|
|
22c937 |
+ : endfunction
|
|
|
22c937 |
+ : call s:func2()
|
|
|
22c937 |
+ : fu! s:_func3()
|
|
|
22c937 |
+ : $put ='s:_func3'
|
|
|
22c937 |
+ : endfunction
|
|
|
22c937 |
+ : call s:_func3()
|
|
|
22c937 |
+ : let fn = 'Func4'
|
|
|
22c937 |
+ : fu! {fn}()
|
|
|
22c937 |
+ : $put ='Func4'
|
|
|
22c937 |
+ : endfunction
|
|
|
22c937 |
+ : call {fn}()
|
|
|
22c937 |
+ : let fn = 'func5'
|
|
|
22c937 |
+ : fu! s:{fn}()
|
|
|
22c937 |
+ : $put ='s:func5'
|
|
|
22c937 |
+ : endfunction
|
|
|
22c937 |
+ : call s:{fn}()
|
|
|
22c937 |
+ :endfunction
|
|
|
22c937 |
+ :call NestedFunc()
|
|
|
22c937 |
+ :/^result:/,$w! test.out
|
|
|
22c937 |
+ :qa!
|
|
|
22c937 |
+ ENDTEST
|
|
|
22c937 |
+
|
|
|
22c937 |
+ result:
|
|
|
22c937 |
*** ../vim-7.4.548/src/testdir/test_nested_function.ok 2014-12-13 21:00:22.251356529 +0100
|
|
|
22c937 |
--- src/testdir/test_nested_function.ok 2014-12-13 20:21:44.215867748 +0100
|
|
|
22c937 |
***************
|
|
|
22c937 |
*** 0 ****
|
|
|
22c937 |
--- 1,6 ----
|
|
|
22c937 |
+ result:
|
|
|
22c937 |
+ Func1
|
|
|
22c937 |
+ s:func2
|
|
|
22c937 |
+ s:_func3
|
|
|
22c937 |
+ Func4
|
|
|
22c937 |
+ s:func5
|
|
|
22c937 |
*** ../vim-7.4.548/src/testdir/Make_amiga.mak 2014-12-08 04:16:26.253702999 +0100
|
|
|
22c937 |
--- src/testdir/Make_amiga.mak 2014-12-13 20:23:59.554425738 +0100
|
|
|
22c937 |
***************
|
|
|
22c937 |
*** 47,52 ****
|
|
|
22c937 |
--- 47,53 ----
|
|
|
22c937 |
test_listlbr.out \
|
|
|
22c937 |
test_listlbr_utf8.out \
|
|
|
22c937 |
test_mapping.out \
|
|
|
22c937 |
+ test_nested_function.out \
|
|
|
22c937 |
test_options.out \
|
|
|
22c937 |
test_qf_title.out \
|
|
|
22c937 |
test_signs.out \
|
|
|
22c937 |
***************
|
|
|
22c937 |
*** 184,189 ****
|
|
|
22c937 |
--- 185,192 ----
|
|
|
22c937 |
test_insertcount.out: test_insertcount.in
|
|
|
22c937 |
test_listlbr.out: test_listlbr.in
|
|
|
22c937 |
test_listlbr_utf8.out: test_listlbr_utf8.in
|
|
|
22c937 |
+ test_mapping.out: test_mapping.in
|
|
|
22c937 |
+ test_nested_function.out: test_nested_function.in
|
|
|
22c937 |
test_options.out: test_options.in
|
|
|
22c937 |
test_qf_title.out: test_qf_title.in
|
|
|
22c937 |
test_signs.out: test_signs.in
|
|
|
22c937 |
*** ../vim-7.4.548/src/testdir/Make_dos.mak 2014-12-08 04:16:26.253702999 +0100
|
|
|
22c937 |
--- src/testdir/Make_dos.mak 2014-12-13 20:24:11.946293504 +0100
|
|
|
22c937 |
***************
|
|
|
22c937 |
*** 46,51 ****
|
|
|
22c937 |
--- 46,52 ----
|
|
|
22c937 |
test_listlbr.out \
|
|
|
22c937 |
test_listlbr_utf8.out \
|
|
|
22c937 |
test_mapping.out \
|
|
|
22c937 |
+ test_nested_function.out \
|
|
|
22c937 |
test_options.out \
|
|
|
22c937 |
test_qf_title.out \
|
|
|
22c937 |
test_signs.out \
|
|
|
22c937 |
*** ../vim-7.4.548/src/testdir/Make_ming.mak 2014-12-08 04:16:26.253702999 +0100
|
|
|
22c937 |
--- src/testdir/Make_ming.mak 2014-12-13 20:24:17.058237473 +0100
|
|
|
22c937 |
***************
|
|
|
22c937 |
*** 68,73 ****
|
|
|
22c937 |
--- 68,74 ----
|
|
|
22c937 |
test_listlbr.out \
|
|
|
22c937 |
test_listlbr_utf8.out \
|
|
|
22c937 |
test_mapping.out \
|
|
|
22c937 |
+ test_nested_function.out \
|
|
|
22c937 |
test_options.out \
|
|
|
22c937 |
test_qf_title.out \
|
|
|
22c937 |
test_signs.out \
|
|
|
22c937 |
*** ../vim-7.4.548/src/testdir/Make_os2.mak 2014-12-08 04:16:26.253702999 +0100
|
|
|
22c937 |
--- src/testdir/Make_os2.mak 2014-12-13 20:24:21.598190646 +0100
|
|
|
22c937 |
***************
|
|
|
22c937 |
*** 48,53 ****
|
|
|
22c937 |
--- 48,54 ----
|
|
|
22c937 |
test_listlbr.out \
|
|
|
22c937 |
test_listlbr_utf8.out \
|
|
|
22c937 |
test_mapping.out \
|
|
|
22c937 |
+ test_nested_function.out \
|
|
|
22c937 |
test_options.out \
|
|
|
22c937 |
test_qf_title.out \
|
|
|
22c937 |
test_signs.out \
|
|
|
22c937 |
*** ../vim-7.4.548/src/testdir/Make_vms.mms 2014-12-08 04:16:26.253702999 +0100
|
|
|
22c937 |
--- src/testdir/Make_vms.mms 2014-12-13 20:24:29.302110051 +0100
|
|
|
22c937 |
***************
|
|
|
22c937 |
*** 4,10 ****
|
|
|
22c937 |
# Authors: Zoltan Arpadffy, <arpadffy@polarhome.com>
|
|
|
22c937 |
# Sandor Kopanyi, <sandor.kopanyi@mailbox.hu>
|
|
|
22c937 |
#
|
|
|
22c937 |
! # Last change: 2014 Dec 08
|
|
|
22c937 |
#
|
|
|
22c937 |
# This has been tested on VMS 6.2 to 8.3 on DEC Alpha, VAX and IA64.
|
|
|
22c937 |
# Edit the lines in the Configuration section below to select.
|
|
|
22c937 |
--- 4,10 ----
|
|
|
22c937 |
# Authors: Zoltan Arpadffy, <arpadffy@polarhome.com>
|
|
|
22c937 |
# Sandor Kopanyi, <sandor.kopanyi@mailbox.hu>
|
|
|
22c937 |
#
|
|
|
22c937 |
! # Last change: 2014 Dec 13
|
|
|
22c937 |
#
|
|
|
22c937 |
# This has been tested on VMS 6.2 to 8.3 on DEC Alpha, VAX and IA64.
|
|
|
22c937 |
# Edit the lines in the Configuration section below to select.
|
|
|
22c937 |
***************
|
|
|
22c937 |
*** 107,112 ****
|
|
|
22c937 |
--- 107,113 ----
|
|
|
22c937 |
test_listlbr.out \
|
|
|
22c937 |
test_listlbr_utf8.out \
|
|
|
22c937 |
test_mapping.out \
|
|
|
22c937 |
+ test_nested_function.out \
|
|
|
22c937 |
test_options.out \
|
|
|
22c937 |
test_qf_title.out \
|
|
|
22c937 |
test_signs.out \
|
|
|
22c937 |
*** ../vim-7.4.548/src/testdir/Makefile 2014-12-08 04:16:26.253702999 +0100
|
|
|
22c937 |
--- src/testdir/Makefile 2014-12-13 20:24:42.609966838 +0100
|
|
|
22c937 |
***************
|
|
|
22c937 |
*** 44,49 ****
|
|
|
22c937 |
--- 44,50 ----
|
|
|
22c937 |
test_listlbr.out \
|
|
|
22c937 |
test_listlbr_utf8.out \
|
|
|
22c937 |
test_mapping.out \
|
|
|
22c937 |
+ test_nested_function.out \
|
|
|
22c937 |
test_options.out \
|
|
|
22c937 |
test_qf_title.out \
|
|
|
22c937 |
test_signs.out \
|
|
|
22c937 |
*** ../vim-7.4.548/src/version.c 2014-12-13 20:50:01.793994592 +0100
|
|
|
22c937 |
--- src/version.c 2014-12-13 20:56:11.850046569 +0100
|
|
|
22c937 |
***************
|
|
|
22c937 |
*** 743,744 ****
|
|
|
22c937 |
--- 743,746 ----
|
|
|
22c937 |
{ /* Add new patch number below this line */
|
|
|
22c937 |
+ /**/
|
|
|
22c937 |
+ 549,
|
|
|
22c937 |
/**/
|
|
|
22c937 |
|
|
|
22c937 |
--
|
|
|
22c937 |
Engineers are always delighted to share wisdom, even in areas in which they
|
|
|
22c937 |
have no experience whatsoever. Their logic provides them with inherent
|
|
|
22c937 |
insight into any field of expertise. This can be a problem when dealing with
|
|
|
22c937 |
the illogical people who believe that knowledge can only be derived through
|
|
|
22c937 |
experience.
|
|
|
22c937 |
(Scott Adams - The Dilbert principle)
|
|
|
22c937 |
|
|
|
22c937 |
/// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\
|
|
|
22c937 |
/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
|
|
|
22c937 |
\\\ an exciting new programming language -- http://www.Zimbu.org ///
|
|
|
22c937 |
\\\ help me help AIDS victims -- http://ICCF-Holland.org ///
|