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