Patch 9.0.0678
Problem:    Using exclamation marks on :function.
Solution:   Use :func and :endfunc as usual.
Files:      src/testdir/view_util.vim, src/testdir/script_util.vim,
            src/testdir/test_cursorline.vim, src/testdir/test_popup.vim,
            src/testdir/test_prompt_buffer.vim, src/testdir/test_vimscript.vim


*** ../vim-9.0.0677/src/testdir/view_util.vim   2019-09-20 15:47:34.000000000 
+0100
--- src/testdir/view_util.vim   2022-10-06 18:22:17.154014811 +0100
***************
*** 19,25 ****
  " Get text on the screen, including composing characters.
  " ScreenLines(lnum, width) or
  " ScreenLines([start, end], width)
! function! ScreenLines(lnum, width) abort
    redraw!
    if type(a:lnum) == v:t_list
      let start = a:lnum[0]
--- 19,25 ----
  " Get text on the screen, including composing characters.
  " ScreenLines(lnum, width) or
  " ScreenLines([start, end], width)
! func ScreenLines(lnum, width) abort
    redraw!
    if type(a:lnum) == v:t_list
      let start = a:lnum[0]
***************
*** 33,41 ****
      let lines += [join(map(range(1, a:width), 'screenstring(l, v:val)'), '')]
    endfor
    return lines
! endfunction
  
! function! ScreenAttrs(lnum, width) abort
    redraw!
    if type(a:lnum) == v:t_list
      let start = a:lnum[0]
--- 33,41 ----
      let lines += [join(map(range(1, a:width), 'screenstring(l, v:val)'), '')]
    endfor
    return lines
! endfunc
  
! func ScreenAttrs(lnum, width) abort
    redraw!
    if type(a:lnum) == v:t_list
      let start = a:lnum[0]
***************
*** 49,64 ****
      let attrs += [map(range(1, a:width), 'screenattr(l, v:val)')]
    endfor
    return attrs
! endfunction
  
! function! NewWindow(height, width) abort
    exe a:height . 'new'
    exe a:width . 'vsp'
    set winfixwidth winfixheight
    redraw!
! endfunction
  
! function! CloseWindow() abort
    bw!
    redraw!
! endfunction
--- 49,64 ----
      let attrs += [map(range(1, a:width), 'screenattr(l, v:val)')]
    endfor
    return attrs
! endfunc
  
! func NewWindow(height, width) abort
    exe a:height . 'new'
    exe a:width . 'vsp'
    set winfixwidth winfixheight
    redraw!
! endfunc
  
! func CloseWindow() abort
    bw!
    redraw!
! endfunc
*** ../vim-9.0.0677/src/testdir/script_util.vim 2020-08-05 10:18:24.000000000 
+0100
--- src/testdir/script_util.vim 2022-10-06 19:42:43.110858725 +0100
***************
*** 48,54 ****
  " delete it afterwards.  However, if an exception is thrown the file may 
remain,
  " the caller should call DeleteTheScript() afterwards.
  let s:script_name = ''
! function! ExecAsScript(funcname)
      " Make a script from the function passed as argument.
      let s:script_name = MakeScript(a:funcname)
  
--- 48,54 ----
  " delete it afterwards.  However, if an exception is thrown the file may 
remain,
  " the caller should call DeleteTheScript() afterwards.
  let s:script_name = ''
! func ExecAsScript(funcname)
      " Make a script from the function passed as argument.
      let s:script_name = MakeScript(a:funcname)
  
***************
*** 56,64 ****
      exec "source" s:script_name
      call delete(s:script_name)
      let s:script_name = ''
! endfunction
  
! function! DeleteTheScript()
      if s:script_name
        call delete(s:script_name)
        let s:script_name = ''
--- 56,64 ----
      exec "source" s:script_name
      call delete(s:script_name)
      let s:script_name = ''
! endfunc
  
! func DeleteTheScript()
      if s:script_name
        call delete(s:script_name)
        let s:script_name = ''
*** ../vim-9.0.0677/src/testdir/test_cursorline.vim     2022-09-08 
16:39:16.912140162 +0100
--- src/testdir/test_cursorline.vim     2022-10-06 19:43:42.262624984 +0100
***************
*** 3,28 ****
  source check.vim
  source screendump.vim
  
! function! s:screen_attr(lnum) abort
    return map(range(1, 8), 'screenattr(a:lnum, v:val)')
! endfunction
  
! function! s:test_windows(h, w) abort
    call NewWindow(a:h, a:w)
! endfunction
  
! function! s:close_windows() abort
    call CloseWindow()
! endfunction
  
! function! s:new_hi() abort
    redir => save_hi
    silent! hi CursorLineNr
    redir END
    let save_hi = join(split(substitute(save_hi, '\s*xxx\s*', ' ', ''), "\n"), 
'')
    exe 'hi' save_hi 'ctermbg=0 guibg=Black'
    return save_hi
! endfunction
  
  func Test_cursorline_highlight1()
    let save_hi = s:new_hi()
--- 3,28 ----
  source check.vim
  source screendump.vim
  
! func s:screen_attr(lnum) abort
    return map(range(1, 8), 'screenattr(a:lnum, v:val)')
! endfunc
  
! func s:test_windows(h, w) abort
    call NewWindow(a:h, a:w)
! endfunc
  
! func s:close_windows() abort
    call CloseWindow()
! endfunc
  
! func s:new_hi() abort
    redir => save_hi
    silent! hi CursorLineNr
    redir END
    let save_hi = join(split(substitute(save_hi, '\s*xxx\s*', ' ', ''), "\n"), 
'')
    exe 'hi' save_hi 'ctermbg=0 guibg=Black'
    return save_hi
! endfunc
  
  func Test_cursorline_highlight1()
    let save_hi = s:new_hi()
*** ../vim-9.0.0677/src/testdir/test_popup.vim  2022-09-29 21:01:52.202807948 
+0100
--- src/testdir/test_popup.vim  2022-10-06 19:44:08.774523152 +0100
***************
*** 1152,1162 ****
    bw!
  endfunc
  
! function! GetPumPosition()
    call assert_true( pumvisible() )
    let g:pum_pos = pum_getpos()
    return ''
! endfunction
  
  func Test_pum_getpos()
    new
--- 1152,1162 ----
    bw!
  endfunc
  
! func GetPumPosition()
    call assert_true( pumvisible() )
    let g:pum_pos = pum_getpos()
    return ''
! endfunc
  
  func Test_pum_getpos()
    new
*** ../vim-9.0.0677/src/testdir/test_prompt_buffer.vim  2022-09-30 
21:57:07.547153409 +0100
--- src/testdir/test_prompt_buffer.vim  2022-10-06 19:44:31.394437555 +0100
***************
*** 220,226 ****
    %bwipe!
  endfunc
  
! function! Test_prompt_while_writing_to_hidden_buffer()
    call CanTestPromptBuffer()
    CheckUnix
  
--- 220,226 ----
    %bwipe!
  endfunc
  
! func Test_prompt_while_writing_to_hidden_buffer()
    call CanTestPromptBuffer()
    CheckUnix
  
*** ../vim-9.0.0677/src/testdir/test_vimscript.vim      2022-09-23 
21:01:51.019203230 +0100
--- src/testdir/test_vimscript.vim      2022-10-06 19:47:05.073884405 +0100
***************
*** 719,741 ****
  
  XpathINIT
  
! function! NULL()
      Xpath 'a'
      return 0
! endfunction
  
! function! ZERO()
      Xpath 'b'
      return 0
! endfunction
  
! function! F0()
      Xpath 'c'
! endfunction
  
! function! F1(arg)
      Xpath 'e'
! endfunction
  
  let V0 = 1
  
--- 719,741 ----
  
  XpathINIT
  
! func NULL()
      Xpath 'a'
      return 0
! endfunc
  
! func ZERO()
      Xpath 'b'
      return 0
! endfunc
  
! func! F0()
      Xpath 'c'
! endfunc
  
! func! F1(arg)
      Xpath 'e'
! endfunc
  
  let V0 = 1
  
***************
*** 6822,6831 ****
  " 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
--- 6822,6831 ----
  " Test 95:  lines of :append, :change, :insert                            {{{1
  
"-------------------------------------------------------------------------------
  
! func DefineFunction(name, body)
      let func = join(['function! ' . a:name . '()'] + a:body + 
['endfunction'], "\n")
      exec func
! endfunc
  
  func Test_script_lines()
      " :append
*** ../vim-9.0.0677/src/version.c       2022-10-06 19:21:16.514531351 +0100
--- src/version.c       2022-10-06 19:48:35.057579822 +0100
***************
*** 701,702 ****
--- 701,704 ----
  {   /* Add new patch number below this line */
+ /**/
+     678,
  /**/

-- 
GALAHAD: No look, really, this isn't nescess ...
PIGLET:  We must examine you.
GALAHAD: There's nothing wrong with ... that.
                 "Monty Python and the Holy Grail" PYTHON (MONTY) PICTURES LTD

 /// Bram Moolenaar -- [email protected] -- http://www.Moolenaar.net   \\\
///                                                                      \\\
\\\        sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ ///
 \\\            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].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/vim_dev/20221006184950.DF68C1C0C31%40moolenaar.net.

Raspunde prin e-mail lui