Patch 9.0.1678

2023-07-16 Fir de Conversatie Bram Moolenaar


Patch 9.0.1678
Problem:Blade files are not recognized.
Solution:   Add a pattern for Blade files. (closes #12650)
Files:  runtime/filetype.vim, src/testdir/test_filetype.vim


*** ../vim-9.0.1677/runtime/filetype.vim2023-06-26 22:05:33.291658094 
+0100
--- runtime/filetype.vim2023-07-11 22:10:36.306918876 +0100
***
*** 254,259 
--- 254,262 
  au BufNewFile,BufRead named.root  setf bindzone
  au BufNewFile,BufRead *.dbcall dist#ft#BindzoneCheck('')
  
+ " Blade
+ au BufNewFile,BufRead *.blade.php setf blade
+ 
  " Blank
  au BufNewFile,BufRead *.blsetf blank
  
*** ../vim-9.0.1677/src/testdir/test_filetype.vim   2023-06-26 
22:05:33.291658094 +0100
--- src/testdir/test_filetype.vim   2023-07-11 22:03:20.647766478 +0100
***
*** 122,127 
--- 122,128 
  bicep: ['file.bicep'],
  bindzone: ['named.root', '/bind/db.file', '/named/db.file', 
'any/bind/db.file', 'any/named/db.file'],
  bitbake: ['file.bb', 'file.bbappend', 'file.bbclass', 
'build/conf/local.conf', 'meta/conf/layer.conf', 'build/conf/bbappend.conf', 
'meta-layer/conf/distro/foo.conf'],
+ blade: ['file.blade.php'],
  blank: ['file.bl'],
  blueprint: ['file.blp'],
  bsdl: ['file.bsd', 'file.bsdl'],
*** ../vim-9.0.1677/src/version.c   2023-07-09 02:38:14.495188998 +0100
--- src/version.c   2023-07-11 22:07:23.075653481 +0100
*******
*** 697,698 
--- 697,700 
  {   /* Add new patch number below this line */
+ /**/
+ 1678,
  /**/

-- 
Life would be so much easier if we could just look at the source code.

 /// Bram Moolenaar -- b...@moolenaar.net -- 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 vim_dev+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/vim_dev/20230717015206.8A67A1C095E%40moolenaar.net.


Patch 9.0.1677

2023-07-08 Fir de Conversatie Bram Moolenaar


Patch 9.0.1677
Problem:Typo in syntax test input file.
Solution:   Fix the typo and the expected dump files. (THARAK HEGDE,
closes #12635)
Files:  runtime/syntax/testdir/input/sh_07.sh,
runtime/syntax/testdir/dumps/sh_07_04.dump,
runtime/syntax/testdir/dumps/sh_07_99.dump


*** ../vim-9.0.1676/runtime/syntax/testdir/input/sh_07.sh   2023-06-24 
00:56:42.122051908 +0100
--- runtime/syntax/testdir/input/sh_07.sh   2023-07-09 02:26:51.356738994 
+0100
***
*** 73,79 
  #
  # Here is the heart of this script:
  #
! echo "Processing the following command line arguements: ${*:-none}"
  echo "Script:for loop outside a function:\t\c"
  for Var
  do
--- 73,79 
  #
  # Here is the heart of this script:
  #
! echo "Processing the following command line arguments: ${*:-none}"
  echo "Script:for loop outside a function:\t\c"
  for Var
  do
*** ../vim-9.0.1676/runtime/syntax/testdir/dumps/sh_07_04.dump  2023-06-22 
21:56:33.987045816 +0100
--- runtime/syntax/testdir/dumps/sh_07_04.dump  2023-07-09 02:27:41.416571572 
+0100
***
*** 7,13 
  >#+0#e05&| +0#000&@73
  |#+0#e05&| |H|e|r|e| |i|s| |t|h|e| |h|e|a|r|t| |o|f| |t|h|i|s| 
|s|c|r|i|p|t|:| +0#000&@39
  |#+0#e05&| +0#000&@73
! |e+0#af5f00255&|c|h|o| 
+0#e02&|"+0#af5f00255&|P+0#e02&|r|o|c|e|s@1|i|n|g| |t|h|e| 
|f|o|l@1|o|w|i|n|g| |c|o|m@1|a|n|d| |l|i|n|e| |a|r|g|u|e|m|e|n|t|s|:| 
|$+0#e000e06&|{|*|:+0#af5f00255&|-|n+0#000&|o|n|e|}+0#e000e06&|"+0#af5f00255&|
 +0#000&@7
  |e+0#af5f00255&|c|h|o| +0#e02&|"+0#af5f00255&|S+0#e02&|c|r|i|p|t|:| 
@3|f|o|r| |l|o@1|p| |o|u|t|s|i|d|e| |a| 
|f|u|n|c|t|i|o|n|:|\+0#e000e06&|t|\|c|"+0#af5f00255&| +0#000&@24
  |f+0#af5f00255&|o|r| +0#000&|V|a|r| @67
  |d+0#af5f00255&|o| +0#000&@72
--- 7,13 
  >#+0#e05&| +0#000&@73
  |#+0#e05&| |H|e|r|e| |i|s| |t|h|e| |h|e|a|r|t| |o|f| |t|h|i|s| 
|s|c|r|i|p|t|:| +0#000&@39
  |#+0#e05&| +0#000&@73
! |e+0#af5f00255&|c|h|o| 
+0#e02&|"+0#af5f00255&|P+0#e02&|r|o|c|e|s@1|i|n|g| |t|h|e| 
|f|o|l@1|o|w|i|n|g| |c|o|m@1|a|n|d| |l|i|n|e| |a|r|g|u|m|e|n|t|s|:| 
|$+0#e000e06&|{|*|:+0#af5f00255&|-|n+0#000&|o|n|e|}+0#e000e06&|"+0#af5f00255&|
 +0#000&@8
  |e+0#af5f00255&|c|h|o| +0#e02&|"+0#af5f00255&|S+0#e02&|c|r|i|p|t|:| 
@3|f|o|r| |l|o@1|p| |o|u|t|s|i|d|e| |a| 
|f|u|n|c|t|i|o|n|:|\+0#e000e06&|t|\|c|"+0#af5f00255&| +0#000&@24
  |f+0#af5f00255&|o|r| +0#000&|V|a|r| @67
  |d+0#af5f00255&|o| +0#000&@72
*** ../vim-9.0.1676/runtime/syntax/testdir/dumps/sh_07_99.dump  2023-06-22 
21:56:33.987045816 +0100
--- runtime/syntax/testdir/dumps/sh_07_99.dump  2023-07-09 02:32:33.863799021 
+0100
***
*** 1,5 
  |#+0#e05#ff0| +0#000&@73
! |e+0#af5f00255&|c|h|o| 
+0#e02&|"+0#af5f00255&|P+0#e02&|r|o|c|e|s@1|i|n|g| |t|h|e| 
|f|o|l@1|o|w|i|n|g| |c|o|m@1|a|n|d| |l|i|n|e| |a|r|g|u|e|m|e|n|t|s|:| 
|$+0#e000e06&|{|*|:+0#af5f00255&|-|n+0#000&|o|n|e|}+0#e000e06&|"+0#af5f00255&|
 +0#000&@7
  |e+0#af5f00255&|c|h|o| +0#e02&|"+0#af5f00255&|S+0#e02&|c|r|i|p|t|:| 
@3|f|o|r| |l|o@1|p| |o|u|t|s|i|d|e| |a| 
|f|u|n|c|t|i|o|n|:|\+0#e000e06&|t|\|c|"+0#af5f00255&| +0#000&@24
  |f+0#af5f00255&|o|r| +0#000&|V|a|r| @67
  |d+0#af5f00255&|o| +0#000&@72
--- 1,5 
  |#+0#e05#ff0| +0#000&@73
! |e+0#af5f00255&|c|h|o| 
+0#e02&|"+0#af5f00255&|P+0#e02&|r|o|c|e|s@1|i|n|g| |t|h|e| 
|f|o|l@1|o|w|i|n|g| |c|o|m@1|a|n|d| |l|i|n|e| |a|r|g|u|m|e|n|t|s|:| 
|$+0#e000e06&|{|*|:+0#af5f00255&|-|n+0#000&|o|n|e|}+0#e000e06&|"+0#af5f00255&|
 +0#000&@8
  |e+0#af5f00255&|c|h|o| +0#e02&|"+0#af5f00255&|S+0#e02&|c|r|i|p|t|:| 
@3|f|o|r| |l|o@1|p| |o|u|t|s|i|d|e| |a| 
|f|u|n|c|t|i|o|n|:|\+0#e000e06&|t|\|c|"+0#af5f00255&| +0#000&@24
  |f+0#af5f00255&|o|r| +0#000&|V|a|r| @67
  |d+0#af5f00255&|o| +0#000&@72
*** ../vim-9.0.1676/src/version.c   2023-07-08 00:54:01.715224558 +0100
--- src/version.c   2023-07-09 02:37:40.043241293 +0100
***
*** 697,698 
--- 697,700 
  {   /* Add new patch number below this line */
+ /**/
+ 1677,
  /**/

-- 
"Time flies like an arrow".  So I put an arrow on my desk, now
awaiting one of these time flies showing up.

 /// Bram Moolenaar -- b...@moolenaar.net -- http://www.Moolenaar.net   \\\
///  \\\
\\\spons

Re: Patch 9.0.1673

2023-07-08 Fir de Conversatie Bram Moolenaar


> On Fri, Jul 7, 2023 at 7:58 PM Bram Moolenaar wrote:
> 
> > + err_teapot([{expr}])  *err_teapot()*
> > +   Produce an error with number 418, needed for implementation 
> > of
> > +   RFC 2325.
> > +   If {expr} is present and it is TRUE error 503 is given,
> > +   indicating that coffee is temporarily not available.
> > +   If {expr} is present it must be a String.
> 
> It looks like a joke, but I don't get it.

The RFC was published on April 1st:
https://datatracker.ietf.org/doc/html/rfc2325

I was reading that Emacs could control a coffee maker.  For Vim I would
expect a plugin to be able to do that.  The specification is here:
https://datatracker.ietf.org/doc/html/rfc2324
Updated by: https://datatracker.ietf.org/doc/html/rfc7168

The error messages were missing though, thus I added them with this
patch.  Now waiting for a volunteer to write the plugin.

-- 
GOD: That is your purpose Arthur ... the Quest for the Holy Grail ...
 "Monty Python and the Holy Grail" PYTHON (MONTY) PICTURES LTD

 /// Bram Moolenaar -- b...@moolenaar.net -- 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 vim_dev+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/vim_dev/20230709013657.685D41C03FD%40moolenaar.net.


Patch 9.0.1676

2023-07-07 Fir de Conversatie Bram Moolenaar


Patch 9.0.1676
Problem:Warning for buffer in use when exiting early.
Solution:   Change file names to be able to see what buffer is in use when
exiting.
Files:  src/testdir/test_crypt.vim


*** ../vim-9.0.1675/src/testdir/test_crypt.vim  2023-06-27 18:57:06.448499587 
+0100
--- src/testdir/test_crypt.vim  2023-07-08 00:48:35.930195818 +0100
***
*** 22,32 
  
  func Common_head_only(text)
" This was crashing Vim
!   split Xtest.txt
call setline(1, a:text)
wq
!   call feedkeys(":split Xtest.txt\foobar\", "tx")
!   call delete('Xtest.txt')
call assert_match('VimCrypt', getline(1))
bwipe!
  endfunc
--- 22,32 
  
  func Common_head_only(text)
" This was crashing Vim
!   split Xtest_head.txt
call setline(1, a:text)
wq
!   call feedkeys(":split Xtest_head.txt\foobar\", "tx")
!   call delete('Xtest_head.txt')
call assert_match('VimCrypt', getline(1))
bwipe!
  endfunc
***
*** 49,55 
" If the blowfish test fails 'cryptmethod' will be 'zip' now.
call assert_equal(a:method, &cryptmethod)
  
!   split Xtest.txt
let text =<< trim END
01234567890123456789012345678901234567,
line 2  foo bar blah,
--- 49,55 
" If the blowfish test fails 'cryptmethod' will be 'zip' now.
call assert_equal(a:method, &cryptmethod)
  
!   split Xtest_uncrypt.txt
let text =<< trim END
01234567890123456789012345678901234567,
line 2  foo bar blah,
***
*** 60,70 
call assert_equal('*', &key)
w!
bwipe!
!   call feedkeys(":split Xtest.txt\foobar\", 'xt')
call assert_equal(text, getline(1, 3))
set key= cryptmethod&
bwipe!
!   call delete('Xtest.txt')
  endfunc
  
  func Test_crypt_zip()
--- 60,70 
call assert_equal('*', &key)
w!
bwipe!
!   call feedkeys(":split Xtest_uncrypt.txt\foobar\", 'xt')
call assert_equal(text, getline(1, 3))
set key= cryptmethod&
bwipe!
!   call delete('Xtest_uncrypt.txt')
  endfunc
  
  func Test_crypt_zip()
***
*** 113,129 
  endfunc
  
  func Uncrypt_stable(method, crypted_text, key, uncrypted_text)
!   split Xtest.txt
set bin noeol key= fenc=latin1
exe "set cryptmethod=" . a:method
call setline(1, a:crypted_text)
w!
bwipe!
set nobin
!   call feedkeys(":split Xtest.txt\" . a:key . "\", 'xt')
call assert_equal(a:uncrypted_text, getline(1, len(a:uncrypted_text)))
bwipe!
!   call delete('Xtest.txt')
set key=
  endfunc
  
--- 113,129 
  endfunc
  
  func Uncrypt_stable(method, crypted_text, key, uncrypted_text)
!   split Xtest_stable.txt
set bin noeol key= fenc=latin1
exe "set cryptmethod=" . a:method
call setline(1, a:crypted_text)
w!
bwipe!
set nobin
!   call feedkeys(":split Xtest_stable.txt\" . a:key . "\", 'xt')
call assert_equal(a:uncrypted_text, getline(1, len(a:uncrypted_text)))
bwipe!
!   call delete('Xtest_stable.txt')
set key=
  endfunc
  
***
*** 132,144 
  throw 'Skipped: xxd program missing'
endif
" use xxd to write the binary content
!   call system(s:xxd_cmd .. ' -r >Xtest.txt', a:hex)
let cmd = (a:verbose ? ':verbose' : '') ..
! \ ":split Xtest.txt\" . a:key . "\"
call feedkeys(cmd, 'xt')
call assert_equal(a:uncrypted_text, getline(1, len(a:uncrypted_text)))
bwipe!
!   call delete('Xtest.txt')
set key=
  endfunc
  
--- 132,144 
  throw 'Skipped: xxd program missing'
endif
" use xxd to write the binary content
!   call system(s:xxd_cmd .. ' -r >Xtest_stable_xxd.txt', a:hex)
let cmd = (a:verbose ? ':verbose' : '') ..
! \ ":split Xtest_stable_xxd.txt\" . a:key . "\"
call feedkeys(cmd, 'xt')
call assert_equal(a:uncrypted_text, getline(1, len(a:uncrypted_text)))
bwipe!
!   call delete('Xtest_stable_xxd.txt')
set key=
  endfunc
  
***
*** 354,360 
  func Test_crypt_key_mismatch()
set cryptmethod=blowfish
  
!   split Xtest.txt
call setline(1, 'nothing')
call feedkeys(":X\foobar\nothing\", 'xt')
call assert_match("Keys don't match!", execute(':2messages'))
--- 354,360 
  func Test_crypt_key_mismatch()
set cryptmethod=blowfish
  
!   split Xtest_mismatch.txt
call setline(1, 'nothing')
call feedkeys(":X\foobar\nothing\", 'xt')
call assert_match("Keys do

Patch 9.0.1675

2023-07-07 Fir de Conversatie Bram Moolenaar


Patch 9.0.1675
Problem:Test may run into timeout when using valgrind.
Solution:   Use a longer timeout when using valgrind.
Files:  src/testdir/runtest.vim


*** ../vim-9.0.1674/src/testdir/runtest.vim 2023-06-04 16:55:23.342362151 
+0100
--- src/testdir/runtest.vim 2023-07-08 00:22:31.350556318 +0100
***
*** 92,97 
--- 92,100 
  " Common with all tests on all systems.
  source setup.vim
  
+ " Needed for RunningWithValgrind().
+ source shared.vim
+ 
  " For consistency run all tests with 'nocompatible' set.
  " This also enables use of line continuation.
  set nocp viminfo+=nviminfo
***
*** 219,230 
  func TestTimeout(id)
split test.log
call append(line('$'), '')
!   call append(line('$'), 'Test timed out: ' .. g:testfunc)
write
!   call add(v:errors, 'Test timed out: ' . g:testfunc)
  
cquit! 42
  endfunc
  
  func RunTheTest(test)
let prefix = ''
--- 222,239 
  func TestTimeout(id)
split test.log
call append(line('$'), '')
! 
!   let text = 'Test timed out: ' .. g:testfunc
!   if g:timeout_start > 0
! let text ..= strftime(' after %s seconds', localtime() - g:timeout_start)
!   endif
!   call append(line('$'), text)
write
!   call add(v:errors, text)
  
cquit! 42
  endfunc
+ let g:timeout_start = 0
  
  func RunTheTest(test)
let prefix = ''
***
*** 237,243 
if has('timers')
  " No test should take longer than 30 seconds.  If it takes longer we
  " assume we are stuck and need to break out.
! let test_timeout_timer = timer_start(3, 'TestTimeout')
endif
  
" Avoid stopping at the "hit enter" prompt
--- 246,254 
if has('timers')
  " No test should take longer than 30 seconds.  If it takes longer we
  " assume we are stuck and need to break out.
! let test_timeout_timer =
!   \ timer_start(RunningWithValgrind() ? 5 : 3, 'TestTimeout')
! let g:timeout_start = localtime()
endif
  
" Avoid stopping at the "hit enter" prompt
***
*** 307,312 
--- 318,324 
  
if has('timers')
  call timer_stop(test_timeout_timer)
+ let g:timeout_start = 0
endif
  
" Clear any autocommands and put back the catch-all for SwapExists.
***
*** 371,377 
  
" close any split windows
while winnr('$') > 1
! bwipe!
endwhile
  
" May be editing some buffer, wipe it out.  Then we may end up in another
--- 383,389 
  
" close any split windows
while winnr('$') > 1
! noswapfile bwipe!
endwhile
  
" May be editing some buffer, wipe it out.  Then we may end up in another
*** ../vim-9.0.1674/src/version.c   2023-07-07 23:19:04.463417819 +0100
--- src/version.c   2023-07-08 00:24:35.522478594 +0100
***
*** 697,698 
--- 697,700 
  {   /* Add new patch number below this line */
+ /**/
+ 1675,
  /**/

-- 
   We're knights of the Round Table
   Our shows are formidable
   But many times
   We're given rhymes
   That are quite unsingable
   We're opera mad in Camelot
   We sing from the diaphragm a lot.
 "Monty Python and the Holy Grail" PYTHON (MONTY) PICTURES LTD

 /// Bram Moolenaar -- b...@moolenaar.net -- 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 vim_dev+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/vim_dev/20230707232646.5F3DB1C03EE%40moolenaar.net.


Patch 9.0.1674

2023-07-07 Fir de Conversatie Bram Moolenaar


Patch 9.0.1674 (after 9.0.1673)
Problem:Help for builtin functions is not sorted properly.
Solution:   Put err_teapot() help in the right position.
Files:  runtime/doc/builtin.txt, runtime/doc/usr_41.txt


*** ../vim-9.0.1673/runtime/doc/builtin.txt 2023-07-07 18:57:21.729797124 
+0100
--- runtime/doc/builtin.txt 2023-07-07 23:02:07.761995697 +0100
***
*** 154,162 
  digraph_set({chars}, {digraph})   Boolean register |digraph|
  digraph_setlist({digraphlist})Boolean register multiple |digraph|s
  echoraw({expr})   noneoutput {expr} as-is
- err_teapot()  Number  produce error 418
  empty({expr}) Number  |TRUE| if {expr} is empty
  environ() Dictreturn environment variables
  escape({string}, {chars}) String  escape {chars} in {string} with '\'
  eval({string})any evaluate {string} into its value
  eventhandler()Number  |TRUE| if inside an event 
handler
--- 154,162 
  digraph_set({chars}, {digraph})   Boolean register |digraph|
  digraph_setlist({digraphlist})Boolean register multiple |digraph|s
  echoraw({expr})   noneoutput {expr} as-is
  empty({expr}) Number  |TRUE| if {expr} is empty
  environ() Dictreturn environment variables
+ err_teapot()  Number  produce error 418
  escape({string}, {chars}) String  escape {chars} in {string} with '\'
  eval({string})any evaluate {string} into its value
  eventhandler()Number  |TRUE| if inside an event 
handler
***
*** 2177,2190 
  < Use with care, you can mess up the terminal this way.
  
  
- err_teapot([{expr}])  *err_teapot()*
-   Produce an error with number 418, needed for implementation of
-   RFC 2325.
-   If {expr} is present and it is TRUE error 503 is given,
-   indicating that coffee is temporarily not available.
-   If {expr} is present it must be a String.
- 
- 
  empty({expr}) *empty()*
Return the Number 1 if {expr} is empty, zero otherwise.
- A |List| or |Dictionary| is empty when it does not have any
--- 2177,2182 
***
*** 2210,2215 
--- 2202,2216 
use this: >
:echo index(keys(environ()), 'HOME', 0, 1) != -1
  
+ 
+ err_teapot([{expr}])  *err_teapot()*
+   Produce an error with number 418, needed for implementation of
+   RFC 2325.
+   If {expr} is present and it is TRUE error 503 is given,
+   indicating that coffee is temporarily not available.
+   If {expr} is present it must be a String.
+ 
+ 
  escape({string}, {chars}) *escape()*
Escape the characters in {chars} that occur in {string} with a
backslash.  Example: >
*** ../vim-9.0.1673/runtime/doc/usr_41.txt  2023-05-06 14:08:10.139045046 
+0100
--- runtime/doc/usr_41.txt  2023-07-07 23:15:40.279227981 +0100
***
*** 1231,1236 
--- 1232,1238 
json_decode()   decode a JSON string to Vim types
js_encode() encode an expression to a JSON string
js_decode() decode a JSON string to Vim types
+   err_teapot()give error 418 or 503
  
  Jobs: *job-functions*
job_start() start a job
*** ../vim-9.0.1673/src/version.c   2023-07-07 18:57:21.733797120 +0100
--- src/version.c   2023-07-07 20:41:34.749626847 +0100
***
*** 697,698 
--- 697,700 
  {   /* Add new patch number below this line */
+ /**/
+ 1674,
  /**/

-- 
   We're knights of the round table
   We dance whene'er we're able
   We do routines and chorus scenes
   With footwork impeccable.
   We dine well here in Camelot
   We eat ham and jam and spam a lot.
 "Monty Python and the Holy Grail" PYTHON (MONTY) PICTURES LTD

 /// Bram Moolenaar -- b...@moolenaar.net -- 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 unsu

Patch 9.0.1673

2023-07-07 Fir de Conversatie Bram Moolenaar
U) && defined(FEAT_TEAROFF)
+   1
+ #else
+   0
  #endif
},
{NULL, 0}
*** ../vim-9.0.1672/src/testdir/test_functions.vim  2023-06-14 
13:10:09.803148193 +0100
--- src/testdir/test_functions.vim  2023-07-07 18:42:09.138377511 +0100
***
*** 30,39 
--- 30,42 
  call assert_equal(1, or(has('ttyin'), 1))
  call assert_equal(0, and(has('ttyout'), 0))
  call assert_equal(1, has('multi_byte_encoding'))
+ call assert_equal(0, has(':tearoff'))
endif
call assert_equal(1, has('vcon', 1))
call assert_equal(1, has('mouse_gpm_enabled', 1))
  
+   call assert_equal(has('gui_win32') && has('menu'), has(':tearoff'))
+ 
call assert_equal(0, has('nonexistent'))
call assert_equal(0, has('nonexistent', 1))
  
***
*** 86,91 
--- 89,105 
call assert_fails("call empty(test_unknown())", ['E340:', 'E685:'])
  endfunc
  
+ func Test_err_teapot()
+   call assert_fails('call err_teapot()', "E418: I'm a teapot")
+   call assert_fails('call err_teapot(0)', "E418: I'm a teapot")
+   call assert_fails('call err_teapot(v:false)', "E418: I'm a teapot")
+ 
+   call assert_fails('call err_teapot("1")', "E503: Coffee is currently not 
available")
+   call assert_fails('call err_teapot(v:true)', "E503: Coffee is currently not 
available")
+   let expr = 1
+   call assert_fails('call err_teapot(expr)', "E503: Coffee is currently not 
available")
+ endfunc
+ 
  func Test_test_void()
call assert_fails('echo 1 == test_void()', 'E1031:')
call assert_fails('echo 1.0 == test_void()', 'E1031:')
*** ../vim-9.0.1672/src/version.c   2023-07-01 20:24:36.105801444 +0100
--- src/version.c   2023-07-07 17:48:49.425056765 +0100
***
*** 697,698 
--- 697,700 
  {   /* Add new patch number below this line */
+ /**/
+ 1673,
  /**/

-- 
GALAHAD:   Camelot ...
LAUNCELOT: Camelot ...
GAWAIN:It's only a model.
 "Monty Python and the Holy Grail" PYTHON (MONTY) PICTURES LTD

 /// Bram Moolenaar -- b...@moolenaar.net -- 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 vim_dev+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/vim_dev/20230707175810.4C1031C09A9%40moolenaar.net.


Patch 9.0.1672

2023-07-01 Fir de Conversatie Bram Moolenaar


Patch 9.0.1672
Problem:Tabline highlight wrong after truncated double width label.
Solution:   Fill up half a double width character later. (closes #12614)
Files:  src/buffer.c, src/testdir/test_tabline.vim


*** ../vim-9.0.1671/src/buffer.c2023-05-27 18:02:50.188062442 +0100
--- src/buffer.c2023-07-01 19:55:49.286731728 +0100
***
*** 502,508 
   * It can be:
   * 0  buffer becomes hidden
   * DOBUF_UNLOAD   buffer is unloaded
!  * DOBUF_DELETE   buffer is unloaded and removed from buffer list
   * DOBUF_WIPE buffer is unloaded and really deleted
   * DOBUF_WIPE_REUSE   idem, and add to buf_reuse list
   * When doing all but the first one on the current buffer, the caller should
--- 502,508 
   * It can be:
   * 0  buffer becomes hidden
   * DOBUF_UNLOAD   buffer is unloaded
!  * DOBUF_DEL  buffer is unloaded and removed from buffer list
   * DOBUF_WIPE buffer is unloaded and really deleted
   * DOBUF_WIPE_REUSE   idem, and add to buf_reuse list
   * When doing all but the first one on the current buffer, the caller should
***
*** 5108,5121 
STRMOVE(s + 1, p);
*s = '<';
  
-   // Fill up for half a double-wide character.
-   while (++width < maxwidth)
-   {
-   s = s + STRLEN(s);
-   MB_CHAR2BYTES(fillchar, s);
-   *s = NUL;
-   }
- 
--n;// count the '<'
for (; l < itemcnt; l++)
{
--- 5108,5113 
***
*** 5124,5129 
--- 5116,5129 
else
stl_items[l].stl_start = s;
}
+ 
+   // Fill up for half a double-wide character.
+   while (++width < maxwidth)
+   {
+   s = s + STRLEN(s);
+   MB_CHAR2BYTES(fillchar, s);
+   *s = NUL;
+   }
}
width = maxwidth;
  }
*** ../vim-9.0.1671/src/testdir/test_tabline.vim2023-01-14 
11:46:09.704717821 +
--- src/testdir/test_tabline.vim2023-07-01 19:55:49.286731728 +0100
***
*** 133,139 
tabnew
redraw!
  
!   tabclose
set tabline=
  endfunc
  
--- 133,139 
tabnew
redraw!
  
!   bw!
set tabline=
  endfunc
  
***
*** 202,205 
--- 202,229 
call StopVimInTerminal(buf)
  endfunc
  
+ func TruncTabLine()
+   return '%1T口口%2Ta' .. repeat('b', &columns - 4) .. '%999X%#TabLine#c'
+ endfunc
+ 
+ " Test 'tabline' with truncated double-width label at the start.
+ func Test_tabline_truncated_double_width()
+   tabnew
+   redraw
+   call assert_match('X$', Screenline(1))
+   let attr_TabLineFill = screenattr(1, &columns - 1)
+   let attr_TabLine = screenattr(1, &columns)
+   call assert_notequal(attr_TabLine, attr_TabLineFill)
+ 
+   set tabline=%!TruncTabLine()
+   redraw
+   call assert_equal('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 vim_dev+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/vim_dev/20230701192550.5CAD21C040B%40moolenaar.net.


Re: Make install fails with /etc/alternatives/ex

2023-06-29 Fir de Conversatie Bram Moolenaar


Christian wrote:

> On Di, 27 Jun 2023, Devin Weaver wrote:
> 
> > On a fresh Ubuntu install attempting to run “make install” has an error:
> > 
> > cd /usr/bin; ln -s vim ex
> > ln: failed to create symbolic link 'ex': File exists
> > make[1]: *** [Makefile:2687: /usr/bin/ex] Error 1
> > make[1]: Leaving directory '/home/suki/source/vim/src'
> > make: *** [Makefile:39: install] Error 2
> > 
> > ls /usr/bin/ex
> > lrwxrwxrwx 1 root root 20 Feb 17 17:24 /usr/bin/ex -> /etc/alternatives/ex*
> > 
> So you probably have a package installed, that provides `/usr/bin/ex`. 
> Try `dpkg -S $(realpath $(which ex))`

Mixing Vim packages installed with the regular installer interferes with
what you install manually.  It's best to keep them separate to avoid
trouble.

For me:
% ls -l /etc/alternatives/ex
lrwxrwxrwx 1 root root 17 May 24  2020 /etc/alternatives/ex -> 
/usr/bin/vim.gtk3

> > I’m not so sure what to do about that. Hadn’t run into this before.
> 
> I would recommend, to use ./configure --prefix=$HOME/local/
> 
> to install into your local directory. Then you also do not need to use 
> sudo to run make install
> 
> Just make sure, to add $HOME/local/bin to your $PATH

The Makefile has a line that you can uncomment:

# Uncomment the next line to install Vim in your home directory.
#prefix = $(HOME)

No need to add "/local".  Your path should include "$HOME/bin" then.

An alternative is to use "/usr/local".  That should actually be the
default.

-- 
Hear about the guy who played a blank tape at full blast?
The mime next door went nuts.

 /// Bram Moolenaar -- b...@moolenaar.net -- 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 vim_dev+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/vim_dev/20230629163955.AF1DE1C0437%40moolenaar.net.


Patch 9.0.1670

2023-06-27 Fir de Conversatie Bram Moolenaar


Patch 9.0.1670
Problem:Resetting local option to global value is inconsistent.
Solution:   Handle "<" specifically for 'scrolloff' and 'sidescrolloff'.
(closes #12594)
Files:  src/option.c, src/testdir/test_options.vim


*** ../vim-9.0.1669/src/option.c2023-06-14 16:39:48.653873856 +0100
--- src/option.c2023-06-27 21:38:26.458836083 +0100
***
*** 2135,2144 
((flags & P_VI_DEF) || cp_val) ? VI_DEFAULT : VIM_DEFAULT];
  else if (nextchar == '<')
  {
-   // For 'undolevels' NO_LOCAL_UNDOLEVEL means to
-   // use the global value.
if ((long *)varp == &curbuf->b_p_ul && opt_flags == OPT_LOCAL)
value = NO_LOCAL_UNDOLEVEL;
else
value = *(long *)get_varp_scope(&(options[opt_idx]), OPT_GLOBAL);
  }
--- 2135,2148 
((flags & P_VI_DEF) || cp_val) ? VI_DEFAULT : VIM_DEFAULT];
  else if (nextchar == '<')
  {
if ((long *)varp == &curbuf->b_p_ul && opt_flags == OPT_LOCAL)
+   // for 'undolevels' NO_LOCAL_UNDOLEVEL means using the global value
value = NO_LOCAL_UNDOLEVEL;
+   else if (opt_flags == OPT_LOCAL
+   && ((long *)varp == &curwin->w_p_siso
+|| (long *)varp == &curwin->w_p_so))
+   // for 'scrolloff'/'sidescrolloff' -1 means using the global value
+   value = -1;
else
value = *(long *)get_varp_scope(&(options[opt_idx]), OPT_GLOBAL);
  }
*** ../vim-9.0.1669/src/testdir/test_options.vim2023-06-14 
16:39:48.657873849 +0100
--- src/testdir/test_options.vim2023-06-27 21:49:52.126562164 +0100
***
*** 954,965 
wincmd w
call assert_equal(5, &so)
wincmd w
setlocal so<
call assert_equal(5, &so)
setlocal so=0
call assert_equal(0, &so)
setlocal so=-1
!   call assert_equal(5, &so)
  
call assert_equal(7, &siso)
setlocal siso=3
--- 954,969 
wincmd w
call assert_equal(5, &so)
wincmd w
+   call assert_equal(3, &so)
setlocal so<
call assert_equal(5, &so)
+   setglob so=8
+   call assert_equal(8, &so)
+   call assert_equal(-1, &l:so)
setlocal so=0
call assert_equal(0, &so)
setlocal so=-1
!   call assert_equal(8, &so)
  
call assert_equal(7, &siso)
setlocal siso=3
***
*** 967,978 
wincmd w
call assert_equal(7, &siso)
wincmd w
setlocal siso<
call assert_equal(7, &siso)
setlocal siso=0
call assert_equal(0, &siso)
setlocal siso=-1
!   call assert_equal(7, &siso)
  
close
set so&
--- 971,986 
wincmd w
call assert_equal(7, &siso)
wincmd w
+   call assert_equal(3, &siso)
setlocal siso<
call assert_equal(7, &siso)
+   setglob siso=4
+   call assert_equal(4, &siso)
+   call assert_equal(-1, &l:siso)
setlocal siso=0
call assert_equal(0, &siso)
setlocal siso=-1
!   call assert_equal(4, &siso)
  
close
set so&
*** ../vim-9.0.1669/src/version.c   2023-06-27 18:57:06.448499587 +0100
--- src/version.c   2023-06-27 21:38:10.094852929 +0100
***
*** 697,698 
--- 697,700 
  {   /* Add new patch number below this line */
+ /**/
+ 1670,
  /**/

-- 
hundred-and-one symptoms of being an internet addict:
243. You unsuccessfully try to download a pizza from www.dominos.com.

 /// Bram Moolenaar -- b...@moolenaar.net -- 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 vim_dev+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/vim_dev/20230627205136.0C5EC1C054C%40moolenaar.net.


Patch 9.0.1669

2023-06-27 Fir de Conversatie Bram Moolenaar
IP)
  {
// For PKzip: Append the offset to the key, so that we use a different
*** ../vim-9.0.1668/src/optionstr.c 2023-05-31 17:12:07.888535653 +0100
--- src/optionstr.c 2023-06-27 18:47:54.791198972 +0100
***
*** 1174,1179 
--- 1174,1183 
*curbuf->b_p_cm == NUL ? p_cm : curbuf->b_p_cm);
changed_internal();
  }
+ # ifdef FEAT_SODIUM
+ if (crypt_method_is_sodium(crypt_get_method_nr(curbuf)))
+crypt_sodium_lock_key(args->os_newval.string);
+ # endif
  
  return NULL;
  }
*** ../vim-9.0.1668/src/testdir/test_crypt.vim  2023-05-27 18:02:50.192062438 
+0100
--- src/testdir/test_crypt.vim  2023-06-27 18:54:25.317284072 +0100
***
*** 105,111 
exe buf .. 'bwipe!'
call assert_true(filereadable('Xfoo'))
  
!   let buf = RunVimInTerminal('--cmd "set ch=3 cm=xchacha20v2 key=foo" Xfoo', 
#{rows: 10})
call g:TermWait(buf, g:RunningWithValgrind() ? 1000 : 50)
call StopVimInTerminal(buf)
  
--- 105,111 
exe buf .. 'bwipe!'
call assert_true(filereadable('Xfoo'))
  
!   let buf = RunVimInTerminal('--cmd "set ch=3 cm=xchacha20v2 key=foo" Xfoo', 
#{wait_for_ruler: 0, rows: 10})
call g:TermWait(buf, g:RunningWithValgrind() ? 1000 : 50)
call StopVimInTerminal(buf)
  
***
*** 392,395 
--- 392,415 
call delete('Xtest1.txt')
  endfunc
  
+ func Test_crypt_set_key_segfault()
+   CheckFeature sodium
+ 
+   defer delete('Xtest2.txt')
+   new Xtest2.txt
+   call setline(1, 'nothing')
+   set cryptmethod=xchacha20
+   set key=foobar
+   w
+   new Xtest3
+   put ='other content'
+   setl modified
+   sil! preserve
+   bwipe!
+ 
+   set cryptmethod&
+   set key=
+   bwipe!
+ endfunc
+ 
  " vim: shiftwidth=2 sts=2 expandtab
*** ../vim-9.0.1668/src/version.c   2023-06-26 22:05:33.291658094 +0100
--- src/version.c   2023-06-27 18:54:53.513136357 +0100
***
*** 697,698 
--- 697,700 
  {   /* Add new patch number below this line */
+ /**/
+ 1669,
  /**/

-- 
If you're sending someone Styrofoam, what do you pack it in?

 /// Bram Moolenaar -- b...@moolenaar.net -- 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 vim_dev+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/vim_dev/20230627175804.2668B1C054C%40moolenaar.net.


Re: :tearoff command not available in Vim 9.0.1664 for Linux even when exists(':tearoff') == 2

2023-06-27 Fir de Conversatie Bram Moolenaar


Tony wrote:

> > > • In Normal gvim with Motif GUI in GUI mode, :echo exists(':tearoff')
> > > gives 0 but menus can be teared off from the menu bar with the mouse
> > > • In the same in Console mode, :echo exists(':tearoff') gives 2
> > > • In Huge gvim with GTK3 GUI (where menus cannot be teared off with
> > > the mouse), :echo exists(':tearoff') gives 2 even in the GUI.
> > > • In all these cases, :tearoff PopUp (or with any other menu name)
> > > gives error "E319: Sorry, the command is not available in this
> > > version."
> > >
> > > In my humble opinion, E319 ought never to happen if a prior check with
> > > exists(':command') has given 2.
> >
> > This is a special case: The command is in the list of supported
> > commands, but it is only actually implemented for MS-Windows.
> >
> > > :help tear-off-menus says that tearoff menus are available with Motif
> > > or GTK2 GUIs but not GTK3 version 3.4 or later and indeed, I can tear
> > > off menus (but only with the mouse) in Motif gvim but not in GTK3
> > > 3.24.38.
> > >
> > > • Maybe the Motif Vim should evaluate exists(':tearoff') to zero even
> > > when not in GUI mode?
> >
> > Having exists() return non-zero for a command that doesn't work is
> > misleading.  However, returning zero also isn't correct, since Vim does
> > know about the command.
> 
> Hm… Vim does know about the command, but it is not implemented in the
> current build. Similarly, Vim knows about the +python and +python3
> features, and in a Vim built with -python -python3 the expressions
> has('python') has('python3') both return 0 (which is what I expected)
> but "echo exists(':python') exists(':python3') exists(':pythonx')"
> returns 2 0 0 which I find even more misleading. I would have expected
> them all to be "undefined" (and therefore zero, as mentioned at
> builtin.txt line 2307) whenever they are excluded at compile-time in
> the current Vim.
> 
> >  Currently the returned values are:
> >
> > 1  for match with start of a command
> > 2  full match with a command
> > 3  matches several user commands
> >
> > That doesn't leave room for a new value.  The best I can think of would
> > be to return one:
> >
> > 1  for match with start of a command
> >and full match with command that is
> >not implemented
> >
> > Any better ideas?
> 
> I would have preferred 0 for "unknown, or not included in the current
> build" similarly to how has() behaves, but the above is better than
> nothing.

Looking at this again, changing exists() in a way that the returned
value is not very clear is not a good solution.  exists() is more for a
runtime check anyway, we have has() for compile time checks.  So we can
make has(':tearoff') return 0 or 1, depending on whether the command is
supported or not.  And not change exists().  That is backwards
compatible and gives a clear answer.

It might be worth doing this for all Ex commands, when the has()
argument starts with a colon.


-- 
"After a few years of marriage a man can look right at a woman
without seeing her and a woman can see right through a man
without looking at him."
 - Helen Rowland

 /// Bram Moolenaar -- b...@moolenaar.net -- 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 vim_dev+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/vim_dev/20230627151315.03CB31C054C%40moolenaar.net.


Patch 9.0.1668

2023-06-26 Fir de Conversatie Bram Moolenaar


Patch 9.0.1668
Problem:PEM files are not recognized.
Solution:   Add patterns to match PEM files. (closes #12582)
Files:  runtime/filetype.vim, src/testdir/test_filetype.vim


*** ../vim-9.0.1667/runtime/filetype.vim2023-06-24 17:11:00.713077736 
+0100
--- runtime/filetype.vim2023-06-26 21:58:22.996173011 +0100
***
*** 1511,1516 
--- 1511,1519 
  " PCMK - HAE - crm configure edit
  au BufNewFile,BufRead *.pcmk  setf pcmk
  
+ " PEM (Privacy-Enhanced Mail)
+ au BufNewFile,BufRead *.pem,*.cer,*.crt,*.csr setf pem
+ 
  " Perl
  if has("fname_case")
au BufNewFile,BufRead *.pl,*.PL call dist#ft#FTpl()
*** ../vim-9.0.1667/src/testdir/test_filetype.vim   2023-06-24 
17:11:00.713077736 +0100
--- src/testdir/test_filetype.vim   2023-06-26 21:59:48.496063377 +0100
***
*** 506,511 
--- 506,512 
  pccts: ['file.g'],
  pcmk: ['file.pcmk'],
  pdf: ['file.pdf'],
+ pem: ['file.pem', 'file.cer', 'file.crt', 'file.csr'],
  perl: ['file.plx', 'file.al', 'file.psgi', 'gitolite.rc', '.gitolite.rc', 
'example.gitolite.rc', '.latexmkrc', 'latexmkrc'],
  pf: ['pf.conf'],
  pfmain: ['main.cf', 'main.cf.proto'],
*** ../vim-9.0.1667/src/version.c   2023-06-26 19:02:39.547832077 +0100
--- src/version.c   2023-06-26 22:04:55.627700153 +0100
***
*** 697,698 
--- 697,700 
  {   /* Add new patch number below this line */
+ /**/
+ 1668,
  /**/

-- 
"Women marry men hoping they will change. Men marry women hoping
they will not. So each is inevitably disappointed."
 - Einstein

 /// Bram Moolenaar -- b...@moolenaar.net -- 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 vim_dev+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/vim_dev/20230626210651.BD7051C054C%40moolenaar.net.


Patch 9.0.1667

2023-06-26 Fir de Conversatie Bram Moolenaar


Patch 9.0.1667
Problem:Regression test doesn't fail when fix is reverted.
Solution:   Add "n" to 'cpoptions' instead of using :winsize. (closes #12587,
issue #12528)
Files:  src/testdir/test_scroll_opt.vim,
src/testdir/dumps/Test_smoothscroll_zero_bot.dump


*** ../vim-9.0.1666/src/testdir/test_scroll_opt.vim 2023-06-24 
21:57:47.743177847 +0100
--- src/testdir/test_scroll_opt.vim 2023-06-26 18:59:51.771458235 +0100
***
*** 840,846 
let lines =<< trim END
silent normal yy
silent normal 19p
!   winsize 0 19
vsplit
vertical resize 0
set foldcolumn=1
--- 840,846 
let lines =<< trim END
silent normal yy
silent normal 19p
!   set cpoptions+=n
vsplit
vertical resize 0
set foldcolumn=1
***
*** 849,857 
silent normal 20G
END
call writefile(lines, 'XSmoothScrollZeroBot', 'D')
!   let buf = RunVimInTerminal('-u NONE -S XSmoothScrollZeroBot', #{rows: 19, 
wait_for_ruler: 0})
!   call TermWait(buf, 1000)
! 
call VerifyScreenDump(buf, 'Test_smoothscroll_zero_bot', {})
  
call StopVimInTerminal(buf)
--- 849,855 
silent normal 20G
END
call writefile(lines, 'XSmoothScrollZeroBot', 'D')
!   let buf = RunVimInTerminal('-u NONE -S XSmoothScrollZeroBot', #{rows: 19})
call VerifyScreenDump(buf, 'Test_smoothscroll_zero_bot', {})
  
call StopVimInTerminal(buf)
*** ../vim-9.0.1666/src/testdir/dumps/Test_smoothscroll_zero_bot.dump   
2023-06-24 21:57:47.743177847 +0100
--- src/testdir/dumps/Test_smoothscroll_zero_bot.dump   2023-06-26 
18:59:51.771458235 +0100
***
*** 1,19 
! | +0#af5f00255#ff0||+1#000&| +0&&@9
! |@+0#4040ff13&||+1#000&| +0&&@9
! |@+0#4040ff13&||+1#000&| +0&&@9
! |@+0#4040ff13&||+1#000&| +0&&@9
! |@+0#4040ff13&||+1#000&| +0&&@9
! |@+0#4040ff13&||+1#000&| +0&&@9
! |@+0#4040ff13&||+1#000&| +0&&@9
! |@+0#4040ff13&||+1#000&| +0&&@9
! |@+0#4040ff13&||+1#000&| +0&&@9
! |@+0#4040ff13&||+1#000&| +0&&@9
! |@+0#4040ff13&||+1#000&| +0&&@9
! |@+0#4040ff13&||+1#000&| +0&&@9
! |@+0#4040ff13&||+1#000&| +0&&@9
! |@+0#4040ff13&||+1#000&| +0&&@9
! |@+0#4040ff13&||+1#000&| +0&&@9
! |@+0#4040ff13&||+1#000&| +0&&@9
! >@+0#4040ff13&||+1#000&| +0&&@9
! |<+3&&| |<+1&&|a|m|e|]| |[|+|]| 
! | +0&&@11
--- 1,19 
! | +0#af5f00255#ff0||+1#000&| +0&&@72
! |@+0#4040ff13&||+1#000&| +0&&@72
! |@+0#4040ff13&||+1#000&| +0&&@72
! |@+0#4040ff13&||+1#000&| +0&&@72
! |@+0#4040ff13&||+1#000&| +0&&@72
! |@+0#4040ff13&||+1#000&| +0&&@72
! |@+0#4040ff13&||+1#000&| +0&&@72
! |@+0#4040ff13&||+1#000&| +0&&@72
! |@+0#4040ff13&||+1#000&| +0&&@72
! |@+0#4040ff13&||+1#000&| +0&&@72
! |@+0#4040ff13&||+1#000&| +0&&@72
! |@+0#4040ff13&||+1#000&| +0&&@72
! |@+0#4040ff13&||+1#000&| +0&&@72
! |@+0#4040ff13&||+1#000&| +0&&@72
! |@+0#4040ff13&||+1#000&| +0&&@72
! |@+0#4040ff13&||+1#000&| +0&&@72
! >@+0#4040ff13&||+1#000&| +0&&@72
! |<+3&&| |[+1&&|N|o| |N|a|m|e|]| |[|+|]| @59
! | +0&&@74
*** ../vim-9.0.1666/src/version.c   2023-06-26 18:48:05.343295466 +0100
--- src/version.c   2023-06-26 19:01:51.343741259 +0100
***
*** 697,698 
--- 697,700 
  {   /* Add new patch number below this line */
+ /**/
+ 1667,
  /**/

-- 
A man is incomplete until he's married ... and then he's finished!

 /// Bram Moolenaar -- b...@moolenaar.net -- 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 vim_dev+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/vim_dev/20230626180321.76C761C054C%40moolenaar.net.


Patch 9.0.1666

2023-06-26 Fir de Conversatie Bram Moolenaar


Patch 9.0.1666
Problem:Compiler may warn for uninitialized variable.
Solution:   Initialize this_props_len. (Christian Brabandt, closes #12599)
Files:  src/memline.c


*** ../vim-9.0.1665/src/memline.c   2023-05-31 17:12:07.888535653 +0100
--- src/memline.c   2023-06-26 18:43:20.299832922 +0100
***
*** 3626,3632 
  int   idx;
  int   line_start;
  long  line_size;
! int   this_props_len;
  char_u*text;
  size_ttextlen;
  int   found;
--- 3626,3632 
  int   idx;
  int   line_start;
  long  line_size;
! int   this_props_len = 0;
  char_u*text;
  size_ttextlen;
  int   found;
*** ../vim-9.0.1665/src/version.c   2023-06-25 22:34:15.964340916 +0100
--- src/version.c   2023-06-26 12:07:28.803380878 +0100
***
*** 697,698 
--- 697,700 
  {   /* Add new patch number below this line */
+ /**/
+ 1666,
  /**/

-- 
Married is a three ring circus:
First comes the engagement ring.
Then comes the wedding ring.
Then comes the suffering.

 /// Bram Moolenaar -- b...@moolenaar.net -- 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 vim_dev+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/vim_dev/20230626174847.36E1E1C054C%40moolenaar.net.


Re: :tearoff command not available in Vim 9.0.1664 for Linux even when exists(':tearoff') == 2

2023-06-26 Fir de Conversatie Bram Moolenaar


Tony wrote:

> • In Normal gvim with Motif GUI in GUI mode, :echo exists(':tearoff')
> gives 0 but menus can be teared off from the menu bar with the mouse
> • In the same in Console mode, :echo exists(':tearoff') gives 2
> • In Huge gvim with GTK3 GUI (where menus cannot be teared off with
> the mouse), :echo exists(':tearoff') gives 2 even in the GUI.
> • In all these cases, :tearoff PopUp (or with any other menu name)
> gives error "E319: Sorry, the command is not available in this
> version."
> 
> In my humble opinion, E319 ought never to happen if a prior check with
> exists(':command') has given 2.

This is a special case: The command is in the list of supported
commands, but it is only actually implemented for MS-Windows.

> :help tear-off-menus says that tearoff menus are available with Motif
> or GTK2 GUIs but not GTK3 version 3.4 or later and indeed, I can tear
> off menus (but only with the mouse) in Motif gvim but not in GTK3
> 3.24.38.
> 
> • Maybe the Motif Vim should evaluate exists(':tearoff') to zero even
> when not in GUI mode?

Having exists() return non-zero for a command that doesn't work is
misleading.  However, returning zero also isn't correct, since Vim does
know about the command.  Currently the returned values are:

1  for match with start of a command
2  full match with a command
3  matches several user commands

That doesn't leave room for a new value.  The best I can think of would
be to return one:

1  for match with start of a command
   and full match with command that is
   not implemented

Any better ideas?

> • Maybe the GTK3 GUI with GTK3 3.4 or later should evaluate
> exists('tearoff') to zero in all cases?
> • Maybe the help for :tearoff (which is in gui_w32.txt) should insist
> on the fact that this command applies only to Windows?

It won't hurt to state that explicitly.

> • Or, contrariwise, maybe the :tearoff command should be extended to
> Motif and GTK2 GUIs, which have tearoff menus (but only by mouse
> AFAICT)?

I do not know how to do that.  Perhaps there is a function for that, I
haven't attempted finding it.

-- 
Google is kind of like Dr. Who's Tardis; it's weirder on the
inside than on the outside...

 /// Bram Moolenaar -- b...@moolenaar.net -- 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 vim_dev+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/vim_dev/20230626113126.7DF1A1C054C%40moolenaar.net.


Patch 9.0.1665

2023-06-25 Fir de Conversatie Bram Moolenaar


Patch 9.0.1665
Problem:Empty CmdlineEnter autocommand causes errors in Ex mode.
Solution:   Save and restore ex_pressedreturn. (Christian Brabandt,
closes # 12581, closes #12578)
Files:  src/autocmd.c, src/ex_docmd.c, src/testdir/test_ex_mode.vim


*** ../vim-9.0.1664/src/autocmd.c   2023-05-27 14:10:04.315182896 +0100
--- src/autocmd.c   2023-06-25 22:33:32.708529191 +0100
***
*** 2018,2024 
  int   did_save_redobuff = FALSE;
  save_redo_T   save_redo;
  int   save_KeyTyped = KeyTyped;
- int   save_did_emsg;
  ESTACK_CHECK_DECLARATION;
  
  /*
--- 2018,2023 
***
*** 2310,2321 
else
check_lnums_nested(TRUE);
  
!   save_did_emsg = did_emsg;
  
do_cmdline(NULL, getnextac, (void *)&patcmd,
 DOCMD_NOWAIT|DOCMD_VERBOSE|DOCMD_REPEAT);
  
did_emsg += save_did_emsg;
  
if (nesting == 1)
// restore cursor and topline, unless they were changed
--- 2309,2322 
else
check_lnums_nested(TRUE);
  
!   int save_did_emsg = did_emsg;
!   int save_ex_pressedreturn = get_pressedreturn();
  
do_cmdline(NULL, getnextac, (void *)&patcmd,
 DOCMD_NOWAIT|DOCMD_VERBOSE|DOCMD_REPEAT);
  
did_emsg += save_did_emsg;
+   set_pressedreturn(save_ex_pressedreturn);
  
if (nesting == 1)
// restore cursor and topline, unless they were changed
*** ../vim-9.0.1664/src/ex_docmd.c  2023-05-31 17:12:07.884535632 +0100
--- src/ex_docmd.c  2023-06-25 22:28:08.298329980 +0100
***
*** 9840,9846 
  }
  #endif
  
- #if defined(FEAT_TIMERS) || defined(PROTO)
  int
  get_pressedreturn(void)
  {
--- 9840,9845 
***
*** 9852,9855 
  {
   ex_pressedreturn = val;
  }
- #endif
--- 9851,9853 
*** ../vim-9.0.1664/src/testdir/test_ex_mode.vim2023-03-07 
21:04:58.329770231 +
--- src/testdir/test_ex_mode.vim2023-06-25 22:24:34.039125233 +0100
***
*** 239,244 
--- 239,250 
  
au! CmdLineEnter
delfunc ExEnterFunc
+ 
+   au CmdlineEnter * :
+   call feedkeys("gQecho 1\r", 'xt')
+ 
+   au! CmdlineEnter
+ 
quit
  endfunc
  
*** ../vim-9.0.1664/src/version.c   2023-06-24 21:57:47.743177847 +0100
--- src/version.c   2023-06-25 22:24:15.507136929 +0100
***
*** 697,698 
--- 697,700 
  {   /* Add new patch number below this line */
+ /**/
+ 1665,
  /**/

-- 
hundred-and-one symptoms of being an internet addict:
233. You start dreaming about web pages...in html.

 /// Bram Moolenaar -- b...@moolenaar.net -- 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 vim_dev+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/vim_dev/20230625213454.D40531C054C%40moolenaar.net.


Patch 9.0.1664

2023-06-24 Fir de Conversatie Bram Moolenaar


Patch 9.0.1664
Problem:Divide by zero when scrolling with 'smoothscroll' set.
Solution:   Avoid using a negative width. (closes #12540, closes #12528)
Files:  src/move.c, src/testdir/test_scroll_opt.vim,
src/testdir/dumps/Test_smoothscroll_zero_bot.dump


*** ../vim-9.0.1663/src/move.c  2023-06-05 20:44:34.734261086 +0100
--- src/move.c  2023-06-24 21:26:52.197184691 +0100
***
*** 2591,2607 
(curwin, curwin->w_topline, FALSE);
int skip_lines = 0;
int width1 = curwin->w_width - curwin_col_off();
!   int width2 = width1 + curwin_col_off2();
!   // similar formula is used in curs_columns()
!   if (curwin->w_skipcol > width1)
!   skip_lines += (curwin->w_skipcol - width1) / width2 + 1;
!   else if (curwin->w_skipcol > 0)
!   skip_lines = 1;
! 
!   top_plines -= skip_lines;
!   if (top_plines > curwin->w_height)
{
!   scrolled += (top_plines - curwin->w_height);
}
}
  }
--- 2591,2610 
(curwin, curwin->w_topline, FALSE);
int skip_lines = 0;
int width1 = curwin->w_width - curwin_col_off();
!   if (width1 > 0)
{
!   int width2 = width1 + curwin_col_off2();
!   // similar formula is used in curs_columns()
!   if (curwin->w_skipcol > width1)
!   skip_lines += (curwin->w_skipcol - width1) / width2 + 1;
!   else if (curwin->w_skipcol > 0)
!   skip_lines = 1;
! 
!   top_plines -= skip_lines;
!   if (top_plines > curwin->w_height)
!   {
!   scrolled += (top_plines - curwin->w_height);
!   }
}
}
  }
*** ../vim-9.0.1663/src/testdir/test_scroll_opt.vim 2023-06-05 
20:44:34.734261086 +0100
--- src/testdir/test_scroll_opt.vim 2023-06-24 21:53:20.891302303 +0100
***
*** 833,836 
--- 833,860 
call StopVimInTerminal(buf)
  endfunc
  
+ " this was dividing by zero bug in scroll_cursor_bot
+ func Test_smoothscroll_zero_width_scroll_cursor_bot()
+   CheckScreendump
+ 
+   let lines =<< trim END
+   silent normal yy
+   silent normal 19p
+   winsize 0 19
+   vsplit
+   vertical resize 0
+   set foldcolumn=1
+   set number
+   set smoothscroll
+   silent normal 20G
+   END
+   call writefile(lines, 'XSmoothScrollZeroBot', 'D')
+   let buf = RunVimInTerminal('-u NONE -S XSmoothScrollZeroBot', #{rows: 19, 
wait_for_ruler: 0})
+   call TermWait(buf, 1000)
+ 
+   call VerifyScreenDump(buf, 'Test_smoothscroll_zero_bot', {})
+ 
+   call StopVimInTerminal(buf)
+ endfunc
+ 
  " vim: shiftwidth=2 sts=2 expandtab
*** ../vim-9.0.1663/src/testdir/dumps/Test_smoothscroll_zero_bot.dump   
2023-06-24 21:57:31.519185073 +0100
--- src/testdir/dumps/Test_smoothscroll_zero_bot.dump   2023-06-24 
21:26:52.197184691 +0100
***
*** 0 
--- 1,19 
+ | +0#af5f00255#ff0||+1#000&| +0&&@9
+ |@+0#4040ff13&||+1#000&| +0&&@9
+ |@+0#4040ff13&||+1#000&| +0&&@9
+ |@+0#4040ff13&||+1#000&| +0&&@9
+ |@+0#4040ff13&||+1#000&| +0&&@9
+ |@+0#4040ff13&||+1#000&| +0&&@9
+ |@+0#4040ff13&||+1#000&| +0&&@9
+ |@+0#4040ff13&||+1#000&| +0&&@9
+ |@+0#4040ff13&||+1#000&| +0&&@9
+ |@+0#4040ff13&||+1#000&| +0&&@9
+ |@+0#4040ff13&||+1#000&| +0&&@9
+ |@+0#4040ff13&||+1#000&| +0&&@9
+ |@+0#4040ff13&||+1#000&| +0&&@9
+ |@+0#4040ff13&||+1#000&| +0&&@9
+ |@+0#4040ff13&||+1#000&| +0&&@9
+ |@+0#4040ff13&||+1#000&| +0&&@9
+ >@+0#4040ff13&||+1#000&| +0&&@9
+ |<+3&&| |<+1&&|a|m|e|]| |[|+|]| 
+ | +0&&@11
*** ../vim-9.0.1663/src/version.c   2023-06-24 20:02:21.503021810 +0100
--- src/version.c   2023-06-24 21:57:12.587193552 +0100
***
*** 697,698 
--- 697,700 
  {   /* Add new patch number below this line */
+ /**/
+ 1664,
  /**/

-- 
The term "free software" is defined by Richard M. Stallman as
being software that isn't necessarily for free.  Confusing?
Let's call it "Stallman software" then!
-- Bram Moolenaar

 /// Bram Moolenaar -- b...@moolenaar.net -- http://www.Moolenaar.net   \\\
///  \\\
\\\sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ ///
 \\\   

Patch 9.0.1663

2023-06-24 Fir de Conversatie Bram Moolenaar


Patch 9.0.1663
Problem:Termdebug on MS-Windows: some file names are not recognized.
Solution:   Do not always change \t and \n. (Christian Brabandt,
closes #12565, closes #12560, closes #12550)
Files:  runtime/pack/dist/opt/termdebug/plugin/termdebug.vim


*** ../vim-9.0.1662/runtime/pack/dist/opt/termdebug/plugin/termdebug.vim
2023-06-24 14:19:49.879867855 +0100
--- runtime/pack/dist/opt/termdebug/plugin/termdebug.vim2023-06-24 
19:53:55.006790301 +0100
***
*** 602,615 
  return
endif
if a:text =~ '^\^error,msg='
! let text = s:DecodeMessage(a:text[11:])
  if exists('s:evalexpr') && text =~ 'A syntax error in expression, 
near\|No symbol .* in current context'
" Silently drop evaluation errors.
unlet s:evalexpr
return
  endif
elseif a:text[0] == '~'
! let text = s:DecodeMessage(a:text[1:])
else
  call s:CommOutput(a:channel, a:text)
  return
--- 602,615 
  return
endif
if a:text =~ '^\^error,msg='
! let text = s:DecodeMessage(a:text[11:], v:false)
  if exists('s:evalexpr') && text =~ 'A syntax error in expression, 
near\|No symbol .* in current context'
" Silently drop evaluation errors.
unlet s:evalexpr
return
  endif
elseif a:text[0] == '~'
! let text = s:DecodeMessage(a:text[1:], v:false)
else
  call s:CommOutput(a:channel, a:text)
  return
***
*** 625,645 
call win_gotoid(curwinid)
  endfunc
  
! " Decode a message from gdb.  quotedText starts with a ", return the text up
  " to the next ", unescaping characters:
! " - remove line breaks
! " - change \\t to \t
  " - change \0xhh to \xhh (disabled for now)
  " - change \ooo to octal
  " - change \\ to \
! func s:DecodeMessage(quotedText)
if a:quotedText[0] != '"'
  echoerr 'DecodeMessage(): missing quote in ' . a:quotedText
  return
endif
!   return a:quotedText
! \ ->substitute('^"\|".*\|\\n', '', 'g')
! \ ->substitute('\\t', "\t", 'g')
  " multi-byte characters arrive in octal form
  " NULL-values must be kept encoded as those break the string otherwise
  \ ->substitute('\\000', s:NullRepl, 'g')
--- 625,644 
call win_gotoid(curwinid)
  endfunc
  
! " Decode a message from gdb.  "quotedText" starts with a ", return the text up
  " to the next ", unescaping characters:
! " - remove line breaks (unless "literal" is v:true)
! " - change \\t to \t (unless "literal" is v:true)
  " - change \0xhh to \xhh (disabled for now)
  " - change \ooo to octal
  " - change \\ to \
! func s:DecodeMessage(quotedText, literal)
if a:quotedText[0] != '"'
  echoerr 'DecodeMessage(): missing quote in ' . a:quotedText
  return
endif
!   let msg = a:quotedText
! \ ->substitute('^"\|".*', '', 'g')
  " multi-byte characters arrive in octal form
  " NULL-values must be kept encoded as those break the string otherwise
  \ ->substitute('\\000', s:NullRepl, 'g')
***
*** 651,656 
--- 650,662 
  " \ ->substitute('\\0x00', s:NullRepl, 'g')
  \ ->substitute('', '\', 'g')
  \ ->substitute(s:NullRepl, '\\000', 'g')
+   if !a:literal
+   return msg
+ \ ->substitute('\\t', "\t", 'g')
+ \ ->substitute('\\n', '', 'g')
+   else
+   return msg
+   endif
  endfunc
  const s:NullRepl = 'XXXNULLXXX'
  
***
*** 659,665 
if a:msg !~ 'fullname'
  return ''
endif
!   let name = s:DecodeMessage(substitute(a:msg, '.*fullname=', '', ''))
if has('win32') && name =~ ':'
  " sometimes the name arrives double-escaped
  let name = substitute(name, '', '\\', 'g')
--- 665,671 
if a:msg !~ 'fullname'
  return ''
endif
!   let name = s:DecodeMessage(substitute(a:msg, '.*fullname=', '', ''), v:true)
if has('win32') && name =~ ':'
  " sometimes the name arrives double-escaped
  let name = substitute(name, '', '\\', 'g')
***
*** 672,678 
if a:msg !~ 'addr='
  return &#x

Patch 9.0.1662

2023-06-24 Fir de Conversatie Bram Moolenaar


Patch 9.0.1662
Problem:Crash when using a class member twice. (Christian J. Robinson)
Solution:   Make a copy of the value.
Files:  src/vim9execute.c, src/testdir/test_vim9_class.vim


*** ../vim-9.0.1661/src/vim9execute.c   2023-05-23 14:48:39.108607655 +0100
--- src/vim9execute.c   2023-06-24 19:17:15.012972703 +0100
***
*** 3967,3974 
if (GA_GROW_FAILS(&ectx->ec_stack, 1))
goto theend;
classmember_T *cm = &iptr->isn_arg.classmember;
!   *STACK_TV_BOT(0) =
!   cm->cm_class->class_members_tv[cm->cm_idx];
++ectx->ec_stack.ga_len;
}
break;
--- 3967,3974 
if (GA_GROW_FAILS(&ectx->ec_stack, 1))
goto theend;
classmember_T *cm = &iptr->isn_arg.classmember;
!   copy_tv(cm->cm_class->class_members_tv + cm->cm_idx,
! STACK_TV_BOT(0));
++ectx->ec_stack.ga_len;
}
break;
*** ../vim-9.0.1661/src/testdir/test_vim9_class.vim 2023-06-10 
16:45:09.406610435 +0100
--- src/testdir/test_vim9_class.vim 2023-06-24 19:15:11.668672241 +0100
***
*** 838,843 
--- 838,860 
END
v9.CheckScriptSuccess(lines)
  
+   # using static class member twice
+   lines =<< trim END
+   vim9script
+ 
+   class HTML
+ static author: string = 'John Doe'
+ 
+ static def MacroSubstitute(s: string): string
+   return substitute(s, '{{author}}', author, 'gi')
+ enddef
+   endclass
+ 
+   assert_equal('some text', HTML.MacroSubstitute('some text'))
+   assert_equal('some text', HTML.MacroSubstitute('some text'))
+   END
+   v9.CheckScriptSuccess(lines)
+ 
# access private member in lambda
lines =<< trim END
vim9script
*** ../vim-9.0.1661/src/version.c   2023-06-24 17:11:00.713077736 +0100
--- src/version.c   2023-06-24 18:51:51.519104089 +0100
***
*** 697,698 
--- 697,700 
  {   /* Add new patch number below this line */
+ /**/
+ 1662,
  /**/

-- 
Get a life?  What is the URL where it can be downloaded?

 /// Bram Moolenaar -- b...@moolenaar.net -- 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 vim_dev+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/vim_dev/20230624182258.468111C071C%40moolenaar.net.


Patch 9.0.1661

2023-06-24 Fir de Conversatie Bram Moolenaar


Patch 9.0.1661
Problem:BUCK files are not recognized.
Solution:   Recognize BUCK files as "bzl". (Son Luong Ngoc, closes #12564)
Files:  runtime/filetype.vim, src/testdir/test_filetype.vim


*** ../vim-9.0.1660/runtime/filetype.vim2023-06-22 14:36:32.417224944 
+0100
--- runtime/filetype.vim2023-06-24 17:08:19.637247726 +0100
***
*** 266,276 
  " BSDL
  au BufNewFile,BufRead *.bsd,*.bsdlsetf bsdl
  
! " Bazel (http://bazel.io)
  autocmd BufRead,BufNewFile *.bzl,*.bazel,WORKSPACE,WORKSPACE.bzlmod   setf bzl
  if has("fname_case")
!   " There is another check for BUILD further below.
!   autocmd BufRead,BufNewFile *.BUILD,BUILDsetf bzl
  endif
  
  " Busted (Lua unit testing framework - configuration files)
--- 266,276 
  " BSDL
  au BufNewFile,BufRead *.bsd,*.bsdlsetf bsdl
  
! " Bazel (https://bazel.build) and Buck2 (https://buck2.build/)
  autocmd BufRead,BufNewFile *.bzl,*.bazel,WORKSPACE,WORKSPACE.bzlmod   setf bzl
  if has("fname_case")
!   " There is another check for BUILD and BUCK further below.
!   autocmd BufRead,BufNewFile *.BUILD,BUILD,BUCK   setf bzl
  endif
  
  " Busted (Lua unit testing framework - configuration files)
***
*** 2605,2613 
  " Bazaar version control
  au BufNewFile,BufRead bzr_log.*   setf bzr
  
! " Bazel build file
  if !has("fname_case")
!   au BufNewFile,BufRead *.BUILD,BUILD setf bzl
  endif
  
  " BIND zone
--- 2605,2613 
  " Bazaar version control
  au BufNewFile,BufRead bzr_log.*   setf bzr
  
! " Bazel and Buck2 build file
  if !has("fname_case")
!   au BufNewFile,BufRead *.BUILD,BUILD,BUCKsetf bzl
  endif
  
  " BIND zone
*** ../vim-9.0.1660/src/testdir/test_filetype.vim   2023-06-22 
14:36:32.417224944 +0100
--- src/testdir/test_filetype.vim   2023-06-24 17:03:51.089511402 +0100
***
*** 814,820 
  def s:GetFilenameCaseChecks(): dict>
return {
  modula2: ['file.DEF'],
! bzl: ['file.BUILD', 'BUILD'],
}
  enddef
  
--- 814,820 
  def s:GetFilenameCaseChecks(): dict>
return {
  modula2: ['file.DEF'],
! bzl: ['file.BUILD', 'BUILD', 'BUCK'],
}
  enddef
  
*** ../vim-9.0.1660/src/version.c   2023-06-24 16:42:22.158719360 +0100
--- src/version.c   2023-06-24 17:05:30.365417262 +0100
***
*** 697,698 
--- 697,700 
  {   /* Add new patch number below this line */
+ /**/
+ 1661,
  /**/

-- 
hundred-and-one symptoms of being an internet addict:
229. You spend so much time thinking what to add on this list.

 /// Bram Moolenaar -- b...@moolenaar.net -- 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 vim_dev+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/vim_dev/20230624161137.A672E1C054C%40moolenaar.net.


Patch 9.0.1660

2023-06-24 Fir de Conversatie Bram Moolenaar


Patch 9.0.1660
Problem:Error for using matchfuzzy() in Vim9 script returning a list of
dicts.
Solution:   Make return type of matchfuzzy() list. (Yegappan Lakshmanan,
closes #12574)
Files:  src/evalfunc.c, src/testdir/test_vim9_builtin.vim


*** ../vim-9.0.1659/src/evalfunc.c  2023-06-08 17:09:40.188768829 +0100
--- src/evalfunc.c  2023-06-24 16:36:31.163300863 +0100
***
*** 2224,2230 
  {"matchend",  2, 4, FEARG_1,  arg24_match_func,
ret_number, f_matchend},
  {"matchfuzzy",2, 3, FEARG_1,  arg3_list_string_dict,
!   ret_list_string,f_matchfuzzy},
  {"matchfuzzypos", 2, 3, FEARG_1,  arg3_list_string_dict,
ret_list_any,   f_matchfuzzypos},
  {"matchlist", 2, 4, FEARG_1,  arg24_match_func,
--- 2224,2230 
  {"matchend",  2, 4, FEARG_1,  arg24_match_func,
ret_number, f_matchend},
  {"matchfuzzy",2, 3, FEARG_1,  arg3_list_string_dict,
!   ret_list_any,   f_matchfuzzy},
  {"matchfuzzypos", 2, 3, FEARG_1,  arg3_list_string_dict,
ret_list_any,   f_matchfuzzypos},
  {"matchlist", 2, 4, FEARG_1,  arg24_match_func,
*** ../vim-9.0.1659/src/testdir/test_vim9_builtin.vim   2023-06-14 
16:39:48.657873849 +0100
--- src/testdir/test_vim9_builtin.vim   2023-06-24 16:36:31.163300863 +0100
***
*** 2821,2826 
--- 2821,2835 
v9.CheckDefAndScriptFailure(['matchfuzzy([], 1)'], ['E1013: Argument 2: 
type mismatch, expected string but got number', 'E1174: String required for 
argument 2'])
v9.CheckDefAndScriptFailure(['matchfuzzy([], "a", [])'], ['E1013: Argument 
3: type mismatch, expected dict but got list', 'E1206: Dictionary 
required for argument 3'])
matchfuzzy(['abc', 'xyz'], '')->assert_equal([])
+   var lines =<< trim END
+ var items = [{name: 'xyz', id: 1}, {name: 'def', id: 2},
+  {name: 'abc', id: 3}]
+ var l: list> = matchfuzzy(items, 'abc', {key: 'name'})
+ assert_equal([{name: 'abc', id: 3}], l)
+ var k: list = matchfuzzy(['one', 'two', 'who'], 'o')
+ assert_equal(['one', 'two', 'who'], k)
+   END
+   v9.CheckDefAndScriptSuccess(lines)
  enddef
  
  def Test_matchfuzzypos()
***
*** 2828,2833 
--- 2837,2851 
v9.CheckDefAndScriptFailure(['matchfuzzypos([], 1)'], ['E1013: Argument 2: 
type mismatch, expected string but got number', 'E1174: String required for 
argument 2'])
v9.CheckDefAndScriptFailure(['matchfuzzypos([], "a", [])'], ['E1013: 
Argument 3: type mismatch, expected dict but got list', 'E1206: 
Dictionary required for argument 3'])
matchfuzzypos(['abc', 'xyz'], '')->assert_equal([[], [], []])
+   var lines =<< trim END
+ var items = [{name: 'xyz', id: 1}, {name: 'def', id: 2},
+  {name: 'abc', id: 3}]
+ var l: list> = matchfuzzypos(items, 'abc', {key: 'name'})[0]
+ assert_equal([{name: 'abc', id: 3}], l)
+ var k: list = matchfuzzypos(['one', 'two', 'who'], 'o')[0]
+ assert_equal(['one', 'two', 'who'], k)
+   END
+   v9.CheckDefAndScriptSuccess(lines)
  enddef
  
  def Test_matchlist()
*** ../vim-9.0.1659/src/version.c   2023-06-24 14:19:49.879867855 +0100
--- src/version.c   2023-06-24 16:38:58.871047007 +0100
***
*** 697,698 
--- 697,700 
  {   /* Add new patch number below this line */
+ /**/
+ 1660,
  /**/

-- 
hundred-and-one symptoms of being an internet addict:
228. You spend Saturday night making the counter on your home page
 pass that 2000 mark.

 /// Bram Moolenaar -- b...@moolenaar.net -- 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 vim_dev+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/vim_dev/20230624154256.C02311C054C%40moolenaar.net.


Patch 9.0.1659

2023-06-24 Fir de Conversatie Bram Moolenaar


Patch 9.0.1659
Problem:Termdebug: default highlight cleared when changing colorscheme.
Solution:   Use a ColorScheme autocommand. (Christian Brabandt, closes #12566,
closes #12555)
Files:  runtime/pack/dist/opt/termdebug/plugin/termdebug.vim


*** ../vim-9.0.1658/runtime/pack/dist/opt/termdebug/plugin/termdebug.vim
2022-06-24 16:44:27.0 +0100
--- runtime/pack/dist/opt/termdebug/plugin/termdebug.vim2023-06-24 
14:16:49.548273511 +0100
***
*** 2,8 
  "
  " Author: Bram Moolenaar
  " Copyright: Vim license applies, see ":help license"
! " Last Change: 2022 Jun 24
  "
  " WORK IN PROGRESS - The basics works stable, more to come
  " Note: In general you need at least GDB 7.12 because this provides the
--- 2,8 
  "
  " Author: Bram Moolenaar
  " Copyright: Vim license applies, see ":help license"
! " Last Change: 2023 Jun 24
  "
  " WORK IN PROGRESS - The basics works stable, more to come
  " Note: In general you need at least GDB 7.12 because this provides the
***
*** 81,86 
--- 81,88 
return s:break_id + a:id * 1000 + a:subid
  endfunction
  
+ " Define or adjust the default highlighting, using background "new".
+ " When the 'background' option is set then "old" has the old value.
  func s:Highlight(init, old, new)
let default = a:init ? 'default ' : ''
if a:new ==# 'light' && a:old !=# 'light'
***
*** 90,98 
endif
  endfunc
  
! call s:Highlight(1, '', &background)
! hi default debugBreakpoint term=reverse ctermbg=red guibg=red
! hi default debugBreakpointDisabled term=reverse ctermbg=gray guibg=gray
  
  " Get the command to execute the debugger as a list, defaults to ["gdb"].
  func s:GetCommand()
--- 92,112 
endif
  endfunc
  
! " Define the default highlighting, using the current 'background' value.
! func s:InitHighlight()
!   call s:Highlight(1, '', &background)
!   hi default debugBreakpoint term=reverse ctermbg=red guibg=red
!   hi default debugBreakpointDisabled term=reverse ctermbg=gray guibg=gray
! endfunc
! 
! " Setup an autocommand to redefine the default highlight when the colorscheme
! " is changed.
! func s:InitAutocmd()
!   augroup TermDebug
! autocmd!
! autocmd ColorScheme * call s:InitHighlight()
!   augroup END
! endfunc
  
  " Get the command to execute the debugger as a list, defaults to ["gdb"].
  func s:GetCommand()
***
*** 1516,1520 
--- 1536,1543 
endfor
  endfunc
  
+ call s:InitHighlight()
+ call s:InitAutocmd()
+ 
  let &cpo = s:keepcpo
  unlet s:keepcpo
*** ../vim-9.0.1658/src/version.c   2023-06-24 13:30:00.067004980 +0100
--- src/version.c   2023-06-24 14:11:50.097105356 +0100
***
*** 697,698 
--- 697,700 
  {   /* Add new patch number below this line */
+ /**/
+ 1659,
  /**/

-- 
hundred-and-one symptoms of being an internet addict:
204. You have learned not to fall asleep on your keyboard
 the hard way

 /// Bram Moolenaar -- b...@moolenaar.net -- 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 vim_dev+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/vim_dev/20230624133235.B16BC1C054C%40moolenaar.net.


Patch 9.0.1658

2023-06-24 Fir de Conversatie Bram Moolenaar


Patch 9.0.1658
Problem:Autoload files for "zig" are not installed.
Solution:   Add install and uninstall rules in the makefile. (Christian
Brabandt, closes #12577, closes #12567)
Files:  src/Makefile


*** ../vim-9.0.1657/src/Makefile2023-04-24 22:41:48.438538780 +0100
--- src/Makefile2023-06-24 13:24:49.819880975 +0100
***
*** 2332,2339 
  # Also install most of the other runtime files.
  installrtbase: $(HELPSOURCE)/vim.1 $(DEST_VIM) $(VIMTARGET) $(DEST_RT) \
$(DEST_HELP) $(DEST_PRINT) $(DEST_COL) \
!   $(DEST_SYN) $(DEST_SYN)/shared $(DEST_IND) \
!   $(DEST_FTP) $(DEST_AUTO) $(DEST_AUTO)/dist $(DEST_AUTO)/xml \
$(DEST_IMPORT) $(DEST_IMPORT)/dist \
$(DEST_PLUG) $(DEST_TUTOR) $(DEST_SPELL) $(DEST_COMP)
-$(SHELL) ./installman.sh install $(DEST_MAN) "" $(INSTALLMANARGS)
--- 2334,2341 
  # Also install most of the other runtime files.
  installrtbase: $(HELPSOURCE)/vim.1 $(DEST_VIM) $(VIMTARGET) $(DEST_RT) \
$(DEST_HELP) $(DEST_PRINT) $(DEST_COL) \
!   $(DEST_SYN) $(DEST_SYN)/shared $(DEST_IND) $(DEST_FTP) \
!   $(DEST_AUTO) $(DEST_AUTO)/dist $(DEST_AUTO)/xml 
$(DEST_AUTO)/zig \
$(DEST_IMPORT) $(DEST_IMPORT)/dist \
$(DEST_PLUG) $(DEST_TUTOR) $(DEST_SPELL) $(DEST_COMP)
-$(SHELL) ./installman.sh install $(DEST_MAN) "" $(INSTALLMANARGS)
***
*** 2417,2422 
--- 2419,2426 
cd $(DEST_AUTO)/dist; chmod $(HELPMOD) *.vim
cd $(AUTOSOURCE)/xml; $(INSTALL_DATA) *.vim $(DEST_AUTO)/xml
cd $(DEST_AUTO)/xml; chmod $(HELPMOD) *.vim
+   cd $(AUTOSOURCE)/zig; $(INSTALL_DATA) *.vim $(DEST_AUTO)/zig
+   cd $(DEST_AUTO)/zig; chmod $(HELPMOD) *.vim
  # install the standard import files
cd $(IMPORTSOURCE)/dist; $(INSTALL_DATA) *.vim $(DEST_IMPORT)/dist
cd $(DEST_IMPORT)/dist; chmod $(HELPMOD) *.vim
***
*** 2656,2662 
$(DEST_IND) $(DEST_FTP) \
$(DEST_LANG) $(DEST_KMAP) $(DEST_COMP) $(DEST_MACRO) \
$(DEST_PACK) $(DEST_TOOLS) $(DEST_TUTOR) $(DEST_SPELL) \
!   $(DEST_AUTO) $(DEST_AUTO)/dist $(DEST_AUTO)/xml \
$(DEST_IMPORT) $(DEST_IMPORT)/dist $(DEST_PLUG):
$(MKDIR_P) $@
-chmod $(DIRMOD) $@
--- 2660,2666 
$(DEST_IND) $(DEST_FTP) \
$(DEST_LANG) $(DEST_KMAP) $(DEST_COMP) $(DEST_MACRO) \
$(DEST_PACK) $(DEST_TOOLS) $(DEST_TUTOR) $(DEST_SPELL) \
!   $(DEST_AUTO) $(DEST_AUTO)/dist $(DEST_AUTO)/xml 
$(DEST_AUTO)/zig \
$(DEST_IMPORT) $(DEST_IMPORT)/dist $(DEST_PLUG):
$(MKDIR_P) $@
-chmod $(DIRMOD) $@
***
*** 2845,2854 
-rmdir $(DEST_SYN) $(DEST_IND)
-rm -rf $(DEST_FTP)/*.vim $(DEST_FTP)/README.txt 
$(DEST_FTP)/logtalk.dict
-rm -f $(DEST_AUTO)/*.vim $(DEST_AUTO)/README.txt
!   -rm -f $(DEST_AUTO)/dist/*.vim $(DEST_AUTO)/xml/*.vim
-rm -f $(DEST_IMPORT)/dist/*.vim
-rm -f $(DEST_PLUG)/*.vim $(DEST_PLUG)/README.txt
!   -rmdir $(DEST_FTP) $(DEST_AUTO)/dist $(DEST_AUTO)/xml $(DEST_AUTO)
-rmdir $(DEST_IMPORT)/dist $(DEST_IMPORT)
-rmdir $(DEST_PLUG) $(DEST_RT)
  # This will fail when other Vim versions are installed, no worries.
--- 2849,2858 
-rmdir $(DEST_SYN) $(DEST_IND)
-rm -rf $(DEST_FTP)/*.vim $(DEST_FTP)/README.txt 
$(DEST_FTP)/logtalk.dict
-rm -f $(DEST_AUTO)/*.vim $(DEST_AUTO)/README.txt
!   -rm -f $(DEST_AUTO)/dist/*.vim $(DEST_AUTO)/xml/*.vim 
$(DEST_AUTO)/zig/*.vim
-rm -f $(DEST_IMPORT)/dist/*.vim
-rm -f $(DEST_PLUG)/*.vim $(DEST_PLUG)/README.txt
!   -rmdir $(DEST_FTP) $(DEST_AUTO)/dist $(DEST_AUTO)/xml $(DEST_AUTO)/zig 
$(DEST_AUTO)
-rmdir $(DEST_IMPORT)/dist $(DEST_IMPORT)
-rmdir $(DEST_PLUG) $(DEST_RT)
  # This will fail when other Vim versions are installed, no worries.
*** ../vim-9.0.1657/src/version.c   2023-06-24 01:35:46.947090505 +0100
--- src/version.c   2023-06-24 13:22:46.039867267 +0100
***
*** 697,698 
--- 697,700 
  {   /* Add new patch number below this line */
+ /**/
+ 1658,
  /**/

-- 
hundred-and-one symptoms of being an internet addict:
224. You set up your own Web page. You set up a Web page for each
 of your kids... and your pets.

 /// Bram Moolenaar -- b...@moolenaar.net -- 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.

Patch 9.0.1657

2023-06-23 Fir de Conversatie Bram Moolenaar


Patch 9.0.1657 (after 9.0.1656)
Problem:One more syntax test depends on the system.
Solution:   Use "dash" instead of "sh".
Files:  runtime/syntax/testdir/input/sh_05.sh,
runtime/syntax/testdir/dumps/sh_05_00.dump


*** ../vim-9.0.1656/runtime/syntax/testdir/input/sh_05.sh   2023-06-22 
21:56:33.979045818 +0100
--- runtime/syntax/testdir/input/sh_05.sh   2023-06-24 01:28:33.320662531 
+0100
***
*** 1,4 
! #!/bin/sh -x
  # sh5
  # Note that this is special for sh. ksh will be an extra file later.
  # Note too, that sh and ksh allow ${var:-sub} as well as ${var-sub}!
--- 1,4 
! #!/bin/dash -x
  # sh5
  # Note that this is special for sh. ksh will be an extra file later.
  # Note too, that sh and ksh allow ${var:-sub} as well as ${var-sub}!
*** ../vim-9.0.1656/runtime/syntax/testdir/dumps/sh_05_00.dump  2023-06-24 
00:56:42.122051908 +0100
--- runtime/syntax/testdir/dumps/sh_05_00.dump  2023-06-24 01:28:40.116667279 
+0100
***
*** 1,4 
! >#+0#e05#ff0|!|/|b|i|n|/|s|h| |-|x| +0#000&@62
  |#+0#e05&| |s|h|5| +0#000&@69
  |#+0#e05&| |N|o|t|e| |t|h|a|t| |t|h|i|s| |i|s| |s|p|e|c|i|a|l| |f|o|r| 
|s|h|.| |k|s|h| |w|i|l@1| |b|e| |a|n| |e|x|t|r|a| |f|i|l|e| |l|a|t|e|r|.| 
+0#000&@6
  |#+0#e05&| |N|o|t|e| |t|o@1|,| |t|h|a|t| |s|h| |a|n|d| |k|s|h| 
|a|l@1|o|w| |$|{|v|a|r|:|-|s|u|b|}| |a|s| |w|e|l@1| |a|s| 
|$|{|v|a|r|-|s|u|b|}|!| +0#000&@6
--- 1,4 
! >#+0#e05#ff0|!|/|b|i|n|/|d|a|s|h| |-|x| +0#000&@60
  |#+0#e05&| |s|h|5| +0#000&@69
  |#+0#e05&| |N|o|t|e| |t|h|a|t| |t|h|i|s| |i|s| |s|p|e|c|i|a|l| |f|o|r| 
|s|h|.| |k|s|h| |w|i|l@1| |b|e| |a|n| |e|x|t|r|a| |f|i|l|e| |l|a|t|e|r|.| 
+0#000&@6
  |#+0#e05&| |N|o|t|e| |t|o@1|,| |t|h|a|t| |s|h| |a|n|d| |k|s|h| 
|a|l@1|o|w| |$|{|v|a|r|:|-|s|u|b|}| |a|s| |w|e|l@1| |a|s| 
|$|{|v|a|r|-|s|u|b|}|!| +0#000&@6
*** ../vim-9.0.1656/src/version.c   2023-06-24 00:56:42.126051923 +0100
--- src/version.c   2023-06-24 01:35:15.371186007 +0100
***
*** 697,698 
--- 697,700 
  {   /* Add new patch number below this line */
+ /**/
+ 1657,
  /**/

-- 
hundred-and-one symptoms of being an internet addict:
222. You send more than 20 personal e-mails a day.

 /// Bram Moolenaar -- b...@moolenaar.net -- 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 vim_dev+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/vim_dev/20230624003618.221E41C054C%40moolenaar.net.


Patch 9.0.1656

2023-06-23 Fir de Conversatie Bram Moolenaar
&||| |w|c| |-+0#e000e06&|c| +0#000&@53
  |(+0#e000e06&| |c+0#af5f00255&|d| +0#e000e06&|$|1| |;+0#af5f00255&| 
+0#e000e06&|$|p|w|d| |)| +0#000&||| |w|c| |-+0#e000e06&|c| +0#000&@50
--- 1,4 
! >#+0#e05#ff0|!|/|b|i|n|/|d|a|s|h| +0#000&@63
  |#+0#e05&| |T|e|s|t| |f|i|l|e| |f|o|r| |v|i|m| |t|h|e| |c|h|e|c|k| |(|)| 
|s|u|b|s|h|e|l@1|s| +0#000&@32
  |(+0#e000e06&| |c+0#af5f00255&|d| +0#e000e06&|;+0#af5f00255&| 
+0#e000e06&|$|p|w|d| |)| +0#000&||| |w|c| |-+0#e000e06&|c| +0#000&@53
  |(+0#e000e06&| |c+0#af5f00255&|d| +0#e000e06&|$|1| |;+0#af5f00255&| 
+0#e000e06&|$|p|w|d| |)| +0#000&||| |w|c| |-+0#e000e06&|c| +0#000&@50
***
*** 17,20 
  |(+0#e000e06&| |c+0#af5f00255&|d| +0#e000e06&|$|{|H|O|M|E|}| |)| 
+0#000&||| |w|c| |-+0#e000e06&|c| +0#000&@52
  
|(|(+0#e000e06&|n+0#00e0e07&|=+0#000&|1+0#e02&|+|2|)+0#e000e06&|)+0#ff16#ff404010|
 +0#000#ff0@65
  |l+0#af5f00255&|e|t| 
+0#000&|n+0#00e0e07&|=+0#000&|1+0#e02&|++0#000&|2+0#e02&| 
+0#000&@65
! |"|i|n|p|u|t|/|s|h|_|0|9|.|s|h|"| |1|9|L|,| |4|8|3|B| @30|1|,|1| @10|A|l@1| 
--- 17,20 
  |(+0#e000e06&| |c+0#af5f00255&|d| +0#e000e06&|$|{|H|O|M|E|}| |)| 
+0#000&||| |w|c| |-+0#e000e06&|c| +0#000&@52
  
|(|(+0#e000e06&|n+0#00e0e07&|=+0#000&|1+0#e02&|+|2|)+0#e000e06&|)+0#ff16#ff404010|
 +0#000#ff0@65
  |l+0#af5f00255&|e|t| 
+0#000&|n+0#00e0e07&|=+0#000&|1+0#e02&|++0#000&|2+0#e02&| 
+0#000&@65
! |i|s|_|d|a|s|h|:| |1|,| |i|s|_|p|o|s|i|x|:| |1|,| |i|s|_|s|h|:| |1|,| 
@22|1|,|1| @10|A|l@1| 
*** ../vim-9.0.1655/runtime/syntax/testdir/dumps/sh_09_99.dump  2023-06-22 
21:56:33.987045816 +0100
--- runtime/syntax/testdir/dumps/sh_09_99.dump  2023-06-24 00:54:03.169697190 
+0100
***
*** 1,4 
! |#+0#e05#ff0|!|/|b|i|n|/|s|h| +0#000&@65
  |#+0#e05&| |T|e|s|t| |f|i|l|e| |f|o|r| |v|i|m| |t|h|e| |c|h|e|c|k| |(|)| 
|s|u|b|s|h|e|l@1|s| +0#000&@32
  |(+0#e000e06&| |c+0#af5f00255&|d| +0#e000e06&|;+0#af5f00255&| 
+0#e000e06&|$|p|w|d| |)| +0#000&||| |w|c| |-+0#e000e06&|c| +0#000&@53
  |(+0#e000e06&| |c+0#af5f00255&|d| +0#e000e06&|$|1| |;+0#af5f00255&| 
+0#e000e06&|$|p|w|d| |)| +0#000&||| |w|c| |-+0#e000e06&|c| +0#000&@50
--- 1,4 
! |#+0#e05#ff0|!|/|b|i|n|/|d|a|s|h| +0#000&@63
  |#+0#e05&| |T|e|s|t| |f|i|l|e| |f|o|r| |v|i|m| |t|h|e| |c|h|e|c|k| |(|)| 
|s|u|b|s|h|e|l@1|s| +0#000&@32
  |(+0#e000e06&| |c+0#af5f00255&|d| +0#e000e06&|;+0#af5f00255&| 
+0#e000e06&|$|p|w|d| |)| +0#000&||| |w|c| |-+0#e000e06&|c| +0#000&@53
  |(+0#e000e06&| |c+0#af5f00255&|d| +0#e000e06&|$|1| |;+0#af5f00255&| 
+0#e000e06&|$|p|w|d| |)| +0#000&||| |w|c| |-+0#e000e06&|c| +0#000&@50
***
*** 17,20 
  |(+0#e000e06&| |c+0#af5f00255&|d| +0#e000e06&|$|{|H|O|M|E|}| |)| 
+0#000&||| |w|c| |-+0#e000e06&|c| +0#000&@52
  
|(|(+0#e000e06&|n+0#00e0e07&|=+0#000&|1+0#e02&|+|2|)+0#e000e06&|)+0#ff16#ff404010|
 +0#000#ff0@65
  >l+0#af5f00255&|e|t| 
+0#000&|n+0#00e0e07&|=+0#000&|1+0#e02&|++0#000&|2+0#e02&| 
+0#000&@65
! |"|i|n|p|u|t|/|s|h|_|0|9|.|s|h|"| |1|9|L|,| |4|8|3|B| @30|1|9|,|1| @9|A|l@1| 
--- 17,20 
  |(+0#e000e06&| |c+0#af5f00255&|d| +0#e000e06&|$|{|H|O|M|E|}| |)| 
+0#000&||| |w|c| |-+0#e000e06&|c| +0#000&@52
  
|(|(+0#e000e06&|n+0#00e0e07&|=+0#000&|1+0#e02&|+|2|)+0#e000e06&|)+0#ff16#ff404010|
 +0#000#ff0@65
  >l+0#af5f00255&|e|t| 
+0#000&|n+0#00e0e07&|=+0#000&|1+0#e02&|++0#000&|2+0#e02&| 
+0#000&@65
! |:|r|e|d|r|a|w| @49|1|9|,|1| @9|A|l@1| 
*** ../vim-9.0.1655/src/version.c   2023-06-23 22:59:22.282905067 +0100
--- src/version.c   2023-06-24 00:01:46.733135636 +0100
***
*** 697,698 
--- 697,700 
  {   /* Add new patch number below this line */
+ /**/
+ 1656,
  /**/

-- 
Your fault: core dumped

 /// Bram Moolenaar -- b...@moolenaar.net -- 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 vim_dev+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/vim_dev/20230623235728.B7ED91C054C%40moolenaar.net.


Patch 9.0.1655

2023-06-23 Fir de Conversatie Bram Moolenaar


Patch 9.0.1655 (after 9.0.1652)
Problem:Syntax test fails when Vim window is not tall enough.
Solution:   Make sure each terminal window is closed.
Files:  runtime/syntax/testdir/runtest.vim


*** ../vim-9.0.1654/runtime/syntax/testdir/runtest.vim  2023-06-23 
21:36:27.364304002 +0100
--- runtime/syntax/testdir/runtest.vim  2023-06-23 22:48:00.070247913 +0100
***
*** 117,122 
--- 117,132 
syntax on
  END
  call writefile(lines, 'Xtestscript')
+ 
+ " close all but the last window
+ while winnr('$') > 1
+   close
+ endwhile
+ 
+ " Redraw to make sure that messages are cleared and there is enough space
+ " for the terminal window.
+ redraw
+ 
  let buf = RunVimInTerminal('-S Xtestscript ' .. fname, {})
  
  " Screendump at the start of the file: failed/filetype_00.dump
*** ../vim-9.0.1654/src/version.c   2023-06-23 22:56:43.758833466 +0100
--- src/version.c   2023-06-23 22:57:59.906871874 +0100
***
*** 697,698 
--- 697,700 
  {   /* Add new patch number below this line */
+ /**/
+ 1655,
  /**/

-- 
hundred-and-one symptoms of being an internet addict:
221. Your wife melts your keyboard in the oven.

 /// Bram Moolenaar -- b...@moolenaar.net -- 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 vim_dev+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/vim_dev/20230623215952.ACDA21C054C%40moolenaar.net.


Patch 9.0.1654

2023-06-23 Fir de Conversatie Bram Moolenaar


Patch 9.0.1654 (after 9.0.1653)
Problem:MS-Windows: test for default 'viewdir' fails.
Solution:   Escape the pattern.
Files:  src/testdir/test_mksession.vim


*** ../vim-9.0.1653/src/testdir/test_mksession.vim  2023-06-23 
22:22:55.961061401 +0100
--- src/testdir/test_mksession.vim  2023-06-23 22:56:04.582810455 +0100
***
*** 1265,1271 
  " Test default 'viewdir' value
  func Test_mkview_default_home()
if has('win32')
! call assert_match('^' .. $ORIGHOME .. '/vimfiles', &viewdir)
elseif has('unix')
  call assert_match('^' .. $ORIGHOME .. '/.vim', &viewdir)
elseif has('amiga')
--- 1265,1272 
  " Test default 'viewdir' value
  func Test_mkview_default_home()
if has('win32')
! " use escape() to handle backslash path separators
! call assert_match('^' .. escape($ORIGHOME, '\') .. '/vimfiles', &viewdir)
elseif has('unix')
  call assert_match('^' .. $ORIGHOME .. '/.vim', &viewdir)
elseif has('amiga')
*** ../vim-9.0.1653/src/version.c   2023-06-23 22:22:55.965061399 +0100
--- src/version.c   2023-06-23 22:43:11.033488000 +0100
***
*** 697,698 
--- 697,700 
  {   /* Add new patch number below this line */
+ /**/
+ 1654,
  /**/

-- 
hundred-and-one symptoms of being an internet addict:
220. Your wife asks for sex and you tell her where to find you on IRC.

 /// Bram Moolenaar -- b...@moolenaar.net -- 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 vim_dev+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/vim_dev/20230623215727.5D8981C054C%40moolenaar.net.


Patch 9.0.1653

2023-06-23 Fir de Conversatie Bram Moolenaar


Patch 9.0.1653
Problem:Amiga: default 'viewdir' may not work.
Solution:   Use "home:" instead of "$VIM". Add a test. (Christian Brabandt,
closes #12576)
Files:  runtime/doc/options.txt, src/os_amiga.h,
src/testdir/setup.vim, src/testdir/test_mksession.vim


*** ../vim-9.0.1652/runtime/doc/options.txt 2023-06-23 16:15:07.469504475 
+0100
--- runtime/doc/options.txt 2023-06-23 22:17:31.957277077 +0100
***
*** 8843,8851 
displayed when 'verbosefile' is set.
  
*'viewdir'* *'vdir'*
! 'viewdir' 'vdir'  string  (default for Amiga "$VIM/vimfiles/view",
 for Win32: "$HOME/vimfiles/view",
!for Unix: "~/.vim/view",
 for macOS: "$VIM/vimfiles/view"
 for VMS: "sys$login:vimfiles/view")
global
--- 8912,8920 
displayed when 'verbosefile' is set.
  
*'viewdir'* *'vdir'*
! 'viewdir' 'vdir'  string  (default for Amiga "home:vimfiles/view",
 for Win32: "$HOME/vimfiles/view",
!for Unix: "$HOME/.vim/view",
 for macOS: "$VIM/vimfiles/view"
 for VMS: "sys$login:vimfiles/view")
global
*** ../vim-9.0.1652/src/os_amiga.h  2023-06-08 22:16:19.688379704 +0100
--- src/os_amiga.h  2023-06-23 22:01:54.977471370 +0100
***
*** 199,205 
  #endif
  
  #ifndef DFLT_VDIR
! # define DFLT_VDIR"$VIM/vimfiles/view"// default for 'viewdir'
  #endif
  
  #ifndef DFLT_MAXMEM
--- 199,205 
  #endif
  
  #ifndef DFLT_VDIR
! # define DFLT_VDIR"home:vimfiles/view"// default for 'viewdir'
  #endif
  
  #ifndef DFLT_MAXMEM
*** ../vim-9.0.1652/src/testdir/setup.vim   2023-01-28 19:18:56.725720605 
+
--- src/testdir/setup.vim   2023-06-23 22:14:19.66654 +0100
***
*** 30,35 
--- 30,39 
" Avoid storing shell history.
let $HISTFILE = ""
  
+   " Have current $HOME available as $ORIGHOME.  $HOME is used for option
+   " defaults before we get here, and test_mksession checks that.
+   let $ORIGHOME = $HOME
+ 
" Make sure $HOME does not get read or written.
" It must exist, gnome tries to create $HOME/.gnome2
let $HOME = getcwd() . '/XfakeHOME'
*** ../vim-9.0.1652/src/testdir/test_mksession.vim  2022-09-29 
21:37:19.321641591 +0100
--- src/testdir/test_mksession.vim  2023-06-23 22:15:59.397324768 +0100
***
*** 1262,1265 
--- 1262,1278 
bw!
  endfunc
  
+ " Test default 'viewdir' value
+ func Test_mkview_default_home()
+   if has('win32')
+ call assert_match('^' .. $ORIGHOME .. '/vimfiles', &viewdir)
+   elseif has('unix')
+ call assert_match('^' .. $ORIGHOME .. '/.vim', &viewdir)
+   elseif has('amiga')
+ call assert_match('^home:vimfiles', &viewdir)
+   elseif has('mac')
+ call assert_match('^' .. $VIM .. '/vimfiles', &viewdir)
+   endif
+ endfunc
+ 
  " vim: shiftwidth=2 sts=2 expandtab
*** ../vim-9.0.1652/src/version.c   2023-06-23 21:36:27.364304002 +0100
--- src/version.c   2023-06-23 22:18:53.045229395 +0100
***
*** 697,698 
--- 697,700 
  {   /* Add new patch number below this line */
+ /**/
+ 1653,
  /**/

-- 
How do I set this laser printer to stun? 

 /// Bram Moolenaar -- b...@moolenaar.net -- 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 vim_dev+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/vim_dev/20230623212338.708051C054C%40moolenaar.net.


Patch 9.0.1652

2023-06-23 Fir de Conversatie Bram Moolenaar


Patch 9.0.1652 (after 9.0.1651)
Problem:Unclear why syntax test fails on Mac.
Solution:   Echo v:errors when it's not empty.
Files:  runtime/syntax/testdir/runtest.vim


*** ../vim-9.0.1651/runtime/syntax/testdir/runtest.vim  2023-06-22 
23:04:07.316962058 +0100
--- runtime/syntax/testdir/runtest.vim  2023-06-23 21:34:03.532809757 +0100
***
*** 145,153 
  call StopVimInTerminal(buf)
  call delete('Xtestscript')
  
! " Add any assert errors to s:messages
  if len(v:errors) > 0
call extend(s:messages, v:errors)
let v:errors = []
let fail += 1
  endif
--- 145,160 
  call StopVimInTerminal(buf)
  call delete('Xtestscript')
  
! " redraw here to avoid the following messages to get mixed up with screen
! " output.
! redraw
! 
! " Add any assert errors to s:messages.
  if len(v:errors) > 0
call extend(s:messages, v:errors)
+   " Echo the errors here, in case the script aborts or the "messages" file
+   " is not displayed later.
+   echomsg v:errors
let v:errors = []
let fail += 1
  endif
*** ../vim-9.0.1651/src/version.c   2023-06-23 19:37:14.974379627 +0100
--- src/version.c   2023-06-23 21:35:05.536580303 +0100
***
*** 697,698 
--- 697,700 
  {   /* Add new patch number below this line */
+ /**/
+ 1652,
  /**/

-- 
Don't be humble ... you're not that great.
  -- Golda Meir

 /// Bram Moolenaar -- b...@moolenaar.net -- 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 vim_dev+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/vim_dev/20230623203707.26C711C054C%40moolenaar.net.


Patch 9.0.1651

2023-06-23 Fir de Conversatie Bram Moolenaar


Patch 9.0.1651 (after 9.0.1649
Problem:Unclear why syntax test fails on Mac.
Solution:   Temporarily show the whole "messages" file.
Files:  runtime/syntax/Makefile


*** ../vim-9.0.1650/runtime/syntax/Makefile 2023-06-22 22:38:47.976575036 
+0100
--- runtime/syntax/Makefile 2023-06-23 19:33:04.030464678 +0100
***
*** 26,32 
@echo "../$(VIMPROG)" > testdir/vimcmd
@echo "$(RUN_VIMTEST)" >> testdir/vimcmd
VIMRUNTIME=$(VIMRUNTIME) $(VIMPROG) --clean --not-a-term $(DEBUGLOG) -u 
testdir/runtest.vim
!   @tail -n 6 testdir/messages
  
  
  clean testclean:
--- 26,34 
@echo "../$(VIMPROG)" > testdir/vimcmd
@echo "$(RUN_VIMTEST)" >> testdir/vimcmd
VIMRUNTIME=$(VIMRUNTIME) $(VIMPROG) --clean --not-a-term $(DEBUGLOG) -u 
testdir/runtest.vim
!   @# FIXME: Temporarily show the whole file to find out what goes wrong
!   @#tail -n 6 testdir/messages
!   @cat testdir/messages
  
  
  clean testclean:
*** ../vim-9.0.1650/src/version.c   2023-06-23 16:15:07.469504475 +0100
--- src/version.c   2023-06-23 19:34:23.554440039 +0100
***
*** 697,698 
--- 697,700 
  {   /* Add new patch number below this line */
+ /**/
+ 1651,
  /**/

-- 
>From the classified section of a city newspaper:
Dog for sale: eats anything and is fond of children.

 /// Bram Moolenaar -- b...@moolenaar.net -- 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 vim_dev+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/vim_dev/20230623183800.7F5281C054C%40moolenaar.net.


Patch 9.0.1650

2023-06-23 Fir de Conversatie Bram Moolenaar


Patch 9.0.1650
Problem:MS-Windows: default 'viewdir' may include read-only directory.
Solution:   Use $HOME instead of $VIM for 'viewdir' default. (closes #12119)
Files:  runtime/doc/options.txt, src/os_dos.h


*** ../vim-9.0.1649/runtime/doc/options.txt 2023-05-12 17:49:09.824299513 
+0100
--- runtime/doc/options.txt 2023-06-23 16:13:32.717483639 +0100
***
*** 8843,8853 
displayed when 'verbosefile' is set.
  
*'viewdir'* *'vdir'*
! 'viewdir' 'vdir'  string  (default for Amiga and Win32:
!"$VIM/vimfiles/view",
!for Unix: "~/.vim/view",
!for macOS: "$VIM:vimfiles:view"
!for VMS: "sys$login:vimfiles/view")
global
{not available when compiled without the |+mksession|
feature}
--- 8912,8922 
displayed when 'verbosefile' is set.
  
*'viewdir'* *'vdir'*
! 'viewdir' 'vdir'  string  (default for Amiga "$VIM/vimfiles/view",
!for Win32: "$HOME/vimfiles/view",
!for Unix: "~/.vim/view",
!for macOS: "$VIM/vimfiles/view"
!for VMS: "sys$login:vimfiles/view")
global
{not available when compiled without the |+mksession|
feature}
*** ../vim-9.0.1649/src/os_dos.h2023-06-08 22:16:19.688379704 +0100
--- src/os_dos.h2023-06-23 15:58:38.881274651 +0100
***
*** 97,103 
  #endif
  
  #ifndef DFLT_VDIR
! # define DFLT_VDIR"$VIM/vimfiles/view"// default for 'viewdir'
  #endif
  
  #ifndef DFLT_DIR
--- 97,103 
  #endif
  
  #ifndef DFLT_VDIR
! # define DFLT_VDIR"$HOME/vimfiles/view"   // default for 'viewdir'
  #endif
  
  #ifndef DFLT_DIR
***
*** 105,111 
  #endif
  
  #define DFLT_ERRORFILE"errors.err"
! #define DFLT_RUNTIMEPATH  
"$HOME/vimfiles,$VIM/vimfiles,$VIMRUNTIME,$VIM/vimfiles/after,$HOME/vimfiles/after"
  #define CLEAN_RUNTIMEPATH "$VIM/vimfiles,$VIMRUNTIME,$VIM/vimfiles/after"
  
  #define CASE_INSENSITIVE_FILENAME   // ignore case when comparing file names
--- 105,111 
  #endif
  
  #define DFLT_ERRORFILE"errors.err"
! #define DFLT_RUNTIMEPATH  
"$HOME/vimfiles,$VIM/vimfiles,$VIMRUNTIME,$HOME/vimfiles/after,$VIM/vimfiles/after"
  #define CLEAN_RUNTIMEPATH "$VIM/vimfiles,$VIMRUNTIME,$VIM/vimfiles/after"
  
  #define CASE_INSENSITIVE_FILENAME   // ignore case when comparing file names
*** ../vim-9.0.1649/src/version.c   2023-06-22 23:04:07.316962058 +0100
--- src/version.c   2023-06-23 15:56:34.885242413 +0100
***
*** 697,698 
--- 697,700 
  {   /* Add new patch number below this line */
+ /**/
+ 1650,
  /**/

-- 
A scientist is someone who knows exactly how an engine works, but
can't fix his car when it fails to start.
An engineer is someone who knows only some things about an engine, but
can fix his car when it's broken.

 /// Bram Moolenaar -- b...@moolenaar.net -- 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 vim_dev+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/vim_dev/20230623151542.26D6A1C054C%40moolenaar.net.


Patch 9.0.1649

2023-06-22 Fir de Conversatie Bram Moolenaar


Patch 9.0.1649 (after 9.0.1648)
Problem:Syntax test failure causes script to abort.
Solution:   Fix appending string to list.
Files:  runtime/syntax/testdir/runtest.vim


*** ../vim-9.0.1648/runtime/syntax/testdir/runtest.vim  2023-06-22 
22:38:47.976575036 +0100
--- runtime/syntax/testdir/runtest.vim  2023-06-22 23:00:50.265295869 +0100
***
*** 163,169 
  
call delete('done/' .. root)
  
!   call failed_tests->extend(root)
if len(failed_tests) > MAX_FAILED_COUNT
call Message('')
call Message('Too many errors, aborting')
--- 163,169 
  
call delete('done/' .. root)
  
!   eval failed_tests->add(root)
if len(failed_tests) > MAX_FAILED_COUNT
call Message('')
call Message('Too many errors, aborting')
*** ../vim-9.0.1648/src/version.c   2023-06-22 22:38:47.976575036 +0100
--- src/version.c   2023-06-22 23:03:04.913062533 +0100
***
*** 697,698 
--- 697,700 
  {   /* Add new patch number below this line */
+ /**/
+ 1649,
  /**/

-- 
hundred-and-one symptoms of being an internet addict:
215. Your mouse-clicking forearm rivals Popeye's.

 /// Bram Moolenaar -- b...@moolenaar.net -- 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 vim_dev+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/vim_dev/2023060446.4BE661C029F%40moolenaar.net.


Patch 9.0.1648

2023-06-22 Fir de Conversatie Bram Moolenaar


Patch 9.0.1648 (after 9.0.1647)
Problem:Result of syntax tests is hard to see.
Solution:   List the failed tests.
Files:  runtime/syntax/Makefile, runtime/syntax/testdir/runtest.vim


*** ../vim-9.0.1647/runtime/syntax/Makefile 2023-06-22 21:56:33.979045818 
+0100
--- runtime/syntax/Makefile 2023-06-22 22:31:04.780489845 +0100
***
*** 26,32 
@echo "../$(VIMPROG)" > testdir/vimcmd
@echo "$(RUN_VIMTEST)" >> testdir/vimcmd
VIMRUNTIME=$(VIMRUNTIME) $(VIMPROG) --clean --not-a-term $(DEBUGLOG) -u 
testdir/runtest.vim
!   @tail -n 5 testdir/messages
  
  
  clean testclean:
--- 26,32 
@echo "../$(VIMPROG)" > testdir/vimcmd
@echo "$(RUN_VIMTEST)" >> testdir/vimcmd
VIMRUNTIME=$(VIMRUNTIME) $(VIMPROG) --clean --not-a-term $(DEBUGLOG) -u 
testdir/runtest.vim
!   @tail -n 6 testdir/messages
  
  
  clean testclean:
*** ../vim-9.0.1647/runtime/syntax/testdir/runtest.vim  2023-06-22 
21:56:33.979045818 +0100
--- runtime/syntax/testdir/runtest.vim  2023-06-22 22:30:51.024485604 +0100
***
*** 40,46 
  exe 'split ' .. s:messagesFname
  call append(line('$'), repeat('=-', 70))
  call append(line('$'), '')
! call append(line('$'), 'Test run on ' .. strftime("%Y %b %d %H:%M:%S"))
  wq
  
  if syntaxDir !~ '[/\\]runtime[/\\]syntax\>'
--- 40,47 
  exe 'split ' .. s:messagesFname
  call append(line('$'), repeat('=-', 70))
  call append(line('$'), '')
! let s:test_run_message = 'Test run on ' .. strftime("%Y %b %d %H:%M:%S")
! call append(line('$'), s:test_run_message)
  wq
  
  if syntaxDir !~ '[/\\]runtime[/\\]syntax\>'
***
*** 86,92 
  
  
  let ok_count = 0
! let failed_count = 0
  let skipped_count = 0
  let MAX_FAILED_COUNT = 5
  for fname in glob('input/*.*', 1, 1)
--- 87,93 
  
  
  let ok_count = 0
! let failed_tests = []
  let skipped_count = 0
  let MAX_FAILED_COUNT = 5
  for fname in glob('input/*.*', 1, 1)
***
*** 162,181 
  
call delete('done/' .. root)
  
!   let failed_count += 1
!   if failed_count > MAX_FAILED_COUNT
call Message('')
call Message('Too many errors, aborting')
endif
  endif
else
  let skipped_count += 1
endif
  
" Append messages to the file "testdir/messages"
call AppendMessages('Input file ' .. fname .. ':')
  
!   if failed_count > MAX_FAILED_COUNT
  break
endif
  endfor
--- 163,183 
  
call delete('done/' .. root)
  
!   call failed_tests->extend(root)
!   if len(failed_tests) > MAX_FAILED_COUNT
call Message('')
call Message('Too many errors, aborting')
endif
  endif
else
+ call Message("Test " .. root .. " skipped")
  let skipped_count += 1
endif
  
" Append messages to the file "testdir/messages"
call AppendMessages('Input file ' .. fname .. ':')
  
!   if len(failed_tests) > MAX_FAILED_COUNT
  break
endif
  endfor
***
*** 183,194 
  " Matching "if 1" at the start.
  endif
  
  call Message('OK: ' .. ok_count)
! call Message('FAILED: ' .. failed_count)
  call Message('skipped: ' .. skipped_count)
  call AppendMessages('== SUMMARY ==')
  
! if failed_count > 0
" have make report an error
cquit
  endif
--- 185,197 
  " Matching "if 1" at the start.
  endif
  
+ call Message(s:test_run_message)
  call Message('OK: ' .. ok_count)
! call Message('FAILED: ' .. len(failed_tests) .. ': ' .. string(failed_tests))
  call Message('skipped: ' .. skipped_count)
  call AppendMessages('== SUMMARY ==')
  
! if len(failed_tests) > 0
" have make report an error
cquit
  endif
*** ../vim-9.0.1647/src/version.c   2023-06-22 21:56:33.987045816 +0100
--- src/version.c   2023-06-22 22:33:07.724522415 +0100
***
*** 697,698 
--- 697,700 
  {   /* Add new patch number below this line */
+ /**/
+ 1648,
  /**/

-- 
msdn.microsoft.com:
ERROR_SUCCESS 0 (0x0) The operation completed successfully.
I have always suspected that for Microsoft success is an error.

 /// Bram Moolenaar -- b...@moolenaar.net -- 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 vim_dev+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/vim_dev/20230622213926.7F45D1C029F%40moolenaar.net.


Re: Patch 9.0.1645

2023-06-22 Fir de Conversatie Bram Moolenaar


Dominique wrote:

> Bram Moolenaar  wrote:
> 
> > Patch 9.0.1645
> > Problem:zserio files are not recognized.
> > Solution:   Add a pattern for zserio files. (Dominique Pell=C3=A9,
> > closes #12544)
> > Files:  runtime/filetype.vim, src/testdir/test_filetype.vim
> 
> Something is wrong with this patch 9.0.1645.
> It's missing several files which were in the PR
> at https://github.com/vim/vim/pull/12544/files
> 
> in particular, the patch it's missing the
> main file runtime/syntax/zserio.vim

Runtime files are normally not included with a patch but with a runtime
update commit.  Only filetype changes are turned into a patch, because
the tests need to run on CI.

The missing files will be in the upcoming runtime file update.

-- 
hundred-and-one symptoms of being an internet addict:
214. Your MCI "Circle of Friends" are all Hayes-compatible.

 /// Bram Moolenaar -- b...@moolenaar.net -- 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 vim_dev+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/vim_dev/20230622210217.A87351C029F%40moolenaar.net.


Patch 9.0.1646

2023-06-22 Fir de Conversatie Bram Moolenaar


Patch 9.0.1646
Problem:CI: codecov may take a very long time to run.
Solution:   Add a timeout. (Philip Heiduck, closes #12559)
Files:  .github/workflows/ci.yml


*** ../vim-9.0.1645/.github/workflows/ci.yml2023-05-16 20:10:58.542664693 
+0100
--- .github/workflows/ci.yml2023-06-22 18:10:13.738384449 +0100
***
*** 238,243 
--- 238,244 
find . -type f -name '*.gcno' -exec gcov -pb {} + || true
  
- name: Codecov
+ timeout-minutes: 20
  if: matrix.coverage
  uses: codecov/codecov-action@v3
  with:
***
*** 610,615 
--- 611,617 
find . -type f -name '*.gcno' -exec gcov -pb {} + || true
  
- name: Codecov
+ timeout-minutes: 20
  if: matrix.coverage
  uses: codecov/codecov-action@v3
  with:
*** ../vim-9.0.1645/src/version.c   2023-06-22 14:36:32.417224944 +0100
--- src/version.c   2023-06-22 18:09:07.482419518 +0100
***
*** 697,698 
--- 697,700 
  {   /* Add new patch number below this line */
+ /**/
+ 1646,
  /**/

-- 
hundred-and-one symptoms of being an internet addict:
212. Your Internet group window has more icons than your Accessories window.

 /// Bram Moolenaar -- b...@moolenaar.net -- 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 vim_dev+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/vim_dev/20230622171327.142781C0BA5%40moolenaar.net.


Patch 9.0.1645

2023-06-22 Fir de Conversatie Bram Moolenaar


Patch 9.0.1645
Problem:zserio files are not recognized.
Solution:   Add a pattern for zserio files. (Dominique Pellé,
closes #12544)
Files:  runtime/filetype.vim, src/testdir/test_filetype.vim


*** ../vim-9.0.1644/runtime/filetype.vim2023-06-22 12:18:51.192345394 
+0100
--- runtime/filetype.vim2023-06-22 14:31:58.557558889 +0100
***
*** 1961,1966 
--- 1961,1969 
  au BufNewFile,BufRead *.zig   setf zig
  au BufNewFile,BufRead *.zir   setf zir
  
+ " Zserio
+ au BufNewFile,BufRead *.zssetf zserio
+ 
  " Z-Shell script (patterns ending in a star further below)
  au BufNewFile,BufRead .zprofile,*/etc/zprofile,.zfbfmarks  setf zsh
  au BufNewFile,BufRead .zshrc,.zshenv,.zlogin,.zlogout,.zcompdump setf zsh
*** ../vim-9.0.1644/src/testdir/test_filetype.vim   2023-06-22 
12:41:13.308657143 +0100
--- src/testdir/test_filetype.vim   2023-06-22 14:31:58.557558889 +0100
***
*** 801,806 
--- 801,807 
  zimbu: ['file.zu'],
  zimbutempl: ['file.zut'],
  zir: ['file.zir'],
+ zserio: ['file.zs'],
  zsh: ['.zprofile', '/etc/zprofile', '.zfbfmarks', 'file.zsh',
'.zcompdump', '.zlogin', '.zlogout', '.zshenv', '.zshrc',
'.zcompdump-file', '.zlog', '.zlog-file', '.zsh', '.zsh-file',
*** ../vim-9.0.1644/src/version.c   2023-06-22 12:41:13.308657143 +0100
--- src/version.c   2023-06-22 14:34:35.525362774 +0100
***
*** 697,698 
--- 697,700 
  {   /* Add new patch number below this line */
+ /**/
+     1645,
  /**/

-- 
hundred-and-one symptoms of being an internet addict:
208. Your goals for the future are obtaining a second Gbit connection
and upgrade your NAS to all SSD

 /// Bram Moolenaar -- b...@moolenaar.net -- 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 vim_dev+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/vim_dev/20230622133847.37F601C01AF%40moolenaar.net.


Patch 9.0.1644

2023-06-22 Fir de Conversatie Bram Moolenaar


Patch 9.0.1644
Problem:Not all filetype file name matches are tested.
Solution:   Add more file names to test with. (Jonas Strittmatter,
closes #12569)
Files:  src/testdir/test_filetype.vim


*** ../vim-9.0.1643/src/testdir/test_filetype.vim   2023-06-22 
12:18:51.192345394 +0100
--- src/testdir/test_filetype.vim   2023-06-22 12:36:03.341772270 +0100
***
*** 601,607 
  services: ['/etc/services', 'any/etc/services'],
  setserial: ['/etc/serial.conf', 'any/etc/serial.conf'],
  sexplib: ['file.sexp'],
! sh: ['.bashrc', 'file.bash', '/usr/share/doc/bash-completion/filter.sh', 
'/etc/udev/cdsymlinks.conf', 'any/etc/udev/cdsymlinks.conf'],
  sieve: ['file.siv', 'file.sieve'],
  sil: ['file.sil'],
  simula: ['file.sim'],
--- 601,607 
  services: ['/etc/services', 'any/etc/services'],
  setserial: ['/etc/serial.conf', 'any/etc/serial.conf'],
  sexplib: ['file.sexp'],
! sh: ['.bashrc', '.bash_profile', '.bash-profile', '.bash_logout', 
'.bash-logout', '.bash_aliases', '.bash-aliases', '/tmp/bash-fc-3Ozjlw', 
'/tmp/bash-fc.3Ozjlw', 'PKGBUILD', 'APKBUILD', 'file.bash', 
'/usr/share/doc/bash-completion/filter.sh', '/etc/udev/cdsymlinks.conf', 
'any/etc/udev/cdsymlinks.conf'],
  sieve: ['file.siv', 'file.sieve'],
  sil: ['file.sil'],
  simula: ['file.sim'],
*** ../vim-9.0.1643/src/version.c   2023-06-22 12:18:51.192345394 +0100
--- src/version.c   2023-06-22 12:39:53.220910477 +0100
***
*** 697,698 
--- 697,700 
  {   /* Add new patch number below this line */
+ /**/
+ 1644,
  /**/

-- 
hundred-and-one symptoms of being an internet addict:
206. You religiously respond immediately to e-mail, while ignoring
 your growing pile of snail mail.

 /// Bram Moolenaar -- b...@moolenaar.net -- 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 vim_dev+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/vim_dev/20230622114230.F3E0D1C0A9E%40moolenaar.net.


Patch 9.0.1643

2023-06-22 Fir de Conversatie Bram Moolenaar


Patch 9.0.1643
Problem:Filetype detection fails if file name ends in many '~'.
Solution:   Strip multiple '~' at the same time. (closes #12553)
Files:  runtime/filetype.vim, src/testdir/test_filetype.vim


*** ../vim-9.0.1642/runtime/filetype.vim2023-06-14 19:45:39.534903626 
+0100
--- runtime/filetype.vim2023-06-22 12:09:00.993020216 +0100
***
*** 21,27 
\ exe "doau filetypedetect BufRead " . fnameescape(expand(":r"))
  au BufNewFile,BufRead *~
\ let s:name = expand("") |
!   \ let s:short = substitute(s:name, '\~$', '', '') |
\ if s:name != s:short && s:short != "" |
\   exe "doau filetypedetect BufRead " . fnameescape(s:short) |
\ endif |
--- 21,27 
\ exe "doau filetypedetect BufRead " . fnameescape(expand(":r"))
  au BufNewFile,BufRead *~
\ let s:name = expand("") |
!   \ let s:short = substitute(s:name, '\~\+$', '', '') |
\ if s:name != s:short && s:short != "" |
\   exe "doau filetypedetect BufRead " . fnameescape(s:short) |
\ endif |
*** ../vim-9.0.1642/src/testdir/test_filetype.vim   2023-06-14 
19:45:39.534903626 +0100
--- src/testdir/test_filetype.vim   2023-06-22 12:14:33.692618543 +0100
***
*** 1,5 
--- 1,16 
  " Test :setfiletype
  
+ func Test_backup_strip()
+   filetype on
+   let fname = 'Xdetect.js~~~'
+   call writefile(['one', 'two', 'three'], fname, 'D')
+   exe 'edit ' .. fname
+   call assert_equal('javascript', &filetype)
+ 
+   bwipe!
+   filetype off
+ endfunc
+ 
  func Test_detection()
filetype on
augroup filetypedetect
*** ../vim-9.0.1642/src/version.c   2023-06-21 15:51:43.278744288 +0100
--- src/version.c   2023-06-22 12:16:52.676468207 +0100
***
*** 697,698 
--- 697,700 
  {   /* Add new patch number below this line */
+ /**/
+ 1643,
  /**/

-- 
$ echo pizza > /dev/oven

 /// Bram Moolenaar -- b...@moolenaar.net -- 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 vim_dev+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/vim_dev/20230622112001.4DDFF1C0A9C%40moolenaar.net.


Patch 9.0.1642

2023-06-21 Fir de Conversatie Bram Moolenaar


Patch 9.0.1642 (after 9.0.1641)
Problem:Build failure with tiny features.
Solution:   Add #ifdef's.
Files:  src/os_unix.c


*** ../vim-9.0.1641/src/os_unix.c   2023-06-21 13:42:44.799920602 +0100
--- src/os_unix.c   2023-06-21 15:48:52.227154475 +0100
***
*** 445,451 
--- 445,453 
return do_resize;
  while (do_resize)
  {
+ #ifdef FEAT_EVAL
ch_log(NULL, "calling handle_resize() in resize_func()");
+ #endif
handle_resize();
  }
  return FALSE;
***
*** 4169,4175 
--- 4171,4179 
{
columns = ws.ws_col;
rows = ws.ws_row;
+ #  ifdef FEAT_EVAL
ch_log(NULL, "Got size with TIOCGWINSZ: %ld x %ld", columns, rows);
+ #  endif
}
  }
  # else // TIOCGWINSZ
***
*** 4185,4191 
--- 4189,4197 
{
columns = ts.ts_cols;
rows = ts.ts_lines;
+ #  ifdef FEAT_EVAL
ch_log(NULL, "Got size with TIOCGSIZE: %ld x %ld", columns, rows);
+ #  endif
}
  }
  #  endif // TIOCGSIZE
***
*** 4201,4212 
--- 4207,4222 
if ((p = (char_u *)getenv("LINES")))
{
rows = atoi((char *)p);
+ #  ifdef FEAT_EVAL
ch_log(NULL, "Got 'lines' from $LINES: %ld", rows);
+ #  endif
}
if ((p = (char_u *)getenv("COLUMNS")))
{
columns = atoi((char *)p);
+ #  ifdef FEAT_EVAL
ch_log(NULL, "Got 'columns' from $COLUMNS: %ld", columns);
+ #  endif
}
  }
  
***
*** 4217,4223 
--- 4227,4235 
  if (columns == 0 || rows == 0)
  {
getlinecol(&columns, &rows);
+ # ifdef FEAT_EVAL
ch_log(NULL, "Got size from termcap: %ld x %ld", columns, rows);
+ # endif
  }
  #endif
  
***
*** 6519,6525 
--- 6531,6539 
// SIGWINCH.
if (do_resize)
{
+ #  ifdef FEAT_EVAL
ch_log(NULL, "calling handle_resize() in RealWaitForChar()");
+ #  endif
handle_resize();
}
  
*** ../vim-9.0.1641/src/version.c   2023-06-21 13:42:44.799920602 +0100
--- src/version.c   2023-06-21 15:51:12.474816279 +0100
***
*** 697,698 
--- 697,700 
  {   /* Add new patch number below this line */
+ /**/
+ 1642,
  /**/

-- 
hundred-and-one symptoms of being an internet addict:
198. You read all the quotes at Netaholics Anonymous and keep thinking
 "What's wrong with that?"

 /// Bram Moolenaar -- b...@moolenaar.net -- 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 vim_dev+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/vim_dev/20230621164238.0B6A81C0A9C%40moolenaar.net.


Patch 9.0.1641

2023-06-21 Fir de Conversatie Bram Moolenaar


Patch 9.0.1641
Problem:The log file does not give information about window sizes.
Solution:   Add a few log messages about obtaining the window size.
Files:  src/os_unix.c


*** ../vim-9.0.1640/src/os_unix.c   2023-05-20 16:39:03.337433572 +0100
--- src/os_unix.c   2023-06-21 13:29:00.975724835 +0100
***
*** 444,450 
--- 444,453 
  if (check_only)
return do_resize;
  while (do_resize)
+ {
+   ch_log(NULL, "calling handle_resize() in resize_func()");
handle_resize();
+ }
  return FALSE;
  }
  
***
*** 4166,4171 
--- 4169,4175 
{
columns = ws.ws_col;
rows = ws.ws_row;
+   ch_log(NULL, "Got size with TIOCGWINSZ: %ld x %ld", columns, rows);
}
  }
  # else // TIOCGWINSZ
***
*** 4181,4186 
--- 4185,4191 
{
columns = ts.ts_cols;
rows = ts.ts_lines;
+   ch_log(NULL, "Got size with TIOCGSIZE: %ld x %ld", columns, rows);
}
  }
  #  endif // TIOCGSIZE
***
*** 4194,4202 
--- 4199,4213 
  if (columns == 0 || rows == 0 || vim_strchr(p_cpo, CPO_TSIZE) != NULL)
  {
if ((p = (char_u *)getenv("LINES")))
+   {
rows = atoi((char *)p);
+   ch_log(NULL, "Got 'lines' from $LINES: %ld", rows);
+   }
if ((p = (char_u *)getenv("COLUMNS")))
+   {
columns = atoi((char *)p);
+   ch_log(NULL, "Got 'columns' from $COLUMNS: %ld", columns);
+   }
  }
  
  #ifdef HAVE_TGETENT
***
*** 4204,4210 
--- 4215,4224 
   * 3. try reading "co" and "li" entries from termcap
   */
  if (columns == 0 || rows == 0)
+ {
getlinecol(&columns, &rows);
+   ch_log(NULL, "Got size from termcap: %ld x %ld", columns, rows);
+ }
  #endif
  
  /*
***
*** 4241,4256 
  ws.ws_xpixel = cols * 5;
  ws.ws_ypixel = rows * 10;
  retval = ioctl(tty_fd, TIOCSWINSZ, &ws);
! ch_log(NULL, "ioctl(TIOCSWINSZ) %s",
!   retval == 0 ? "success" : "failed");
  # elif defined(TIOCSSIZE)
  struct ttysize ts;
  
  ts.ts_cols = cols;
  ts.ts_lines = rows;
  retval = ioctl(tty_fd, TIOCSSIZE, &ts);
! ch_log(NULL, "ioctl(TIOCSSIZE) %s",
!   retval == 0 ? "success" : "failed");
  # endif
  if (tty_fd != fd)
close(tty_fd);
--- 4255,4268 
  ws.ws_xpixel = cols * 5;
  ws.ws_ypixel = rows * 10;
  retval = ioctl(tty_fd, TIOCSWINSZ, &ws);
! ch_log(NULL, "ioctl(TIOCSWINSZ) %s", retval == 0 ? "success" : "failed");
  # elif defined(TIOCSSIZE)
  struct ttysize ts;
  
  ts.ts_cols = cols;
  ts.ts_lines = rows;
  retval = ioctl(tty_fd, TIOCSSIZE, &ts);
! ch_log(NULL, "ioctl(TIOCSSIZE) %s", retval == 0 ? "success" : "failed");
  # endif
  if (tty_fd != fd)
close(tty_fd);
***
*** 6506,6512 
--- 6518,6527 
// Check whether window has been resized, EINTR may be caused by
// SIGWINCH.
if (do_resize)
+   {
+   ch_log(NULL, "calling handle_resize() in RealWaitForChar()");
handle_resize();
+   }
  
// Interrupted by a signal, need to try again.  We ignore msec
// here, because we do want to check even after a timeout if
*** ../vim-9.0.1640/src/version.c   2023-06-17 16:19:26.906881209 +0100
--- src/version.c   2023-06-21 13:09:56.365247695 +0100
***
*** 697,698 
--- 697,700 
  {   /* Add new patch number below this line */
+ /**/
+ 1641,
  /**/

-- 
hundred-and-one symptoms of being an internet addict:
197. Your desk collapses under the weight of your computer peripherals.

 /// Bram Moolenaar -- b...@moolenaar.net -- 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 vim_dev+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/vim_dev/20230621124321.6D1F21C0A9C%40moolenaar.net.


Re: Bug in :vmap

2023-06-19 Fir de Conversatie Bram Moolenaar


Gary Johnson wrote:

> On 2023-06-15, Bram Moolenaar wrote:
> > > On 2023-06-15, Bram Moolenaar wrote:
> > > > > Help for :map- says that with , the right side of
> > > > > a mapping will not be echoed on the command line, but messages from
> > > > > the executed command are still given.  This works with :nmap but not
> > > > > with :vmap.  I would expect it to work with :vmap as well.
> > > > > 
> > > > > Steps to reproduce
> > > > > 
> > > > >  1. Put the following in a file, say foo.vim.
> > > > > 
> > > > > nmap  gx :call DebugSilent()
> > > > > vmap  gx :call DebugSilent()
> > > > > function DebugSilent()
> > > > > echomsg "from DebugSilent"
> > > > > endfunction
> > > > > 
> > > > >  2. Start vim and source that file.
> > > > > 
> > > > > $ vim -N --clean
> > > > > :so foo.vim
> > > > > 
> > > > >  3. Enter some word into the current buffer.
> > > > > 
> > > > >  4. Visually select that word.
> > > > > 
> > > > > viw
> > > > > 
> > > > >  5. Type the mapping.
> > > > > 
> > > > > gx
> > > > > 
> > > > >  6. Note that no message appears, or just flashes by briefly.
> > > > > 
> > > > >  7. Execute :messages to verify that the message was generated and
> > > > > saved in message history.
> > > > > 
> > > > >  8. Without visually selecting the word, type the mapping.
> > > > > 
> > > > > gx
> > > > > 
> > > > >  9. Note that the message does appear in the command line and
> > > > > remains there.
> > > > > 
> > > > > Expected behavior
> > > > > 
> > > > > I expect the message to remain in the command line after the
> > > > > execution of the vmap just as it does for a normal map.
> > > > 
> > > > It appears to work as you expect when 'cmdheight' is 2 or more.
> > > > 
> > > > Most likely the message is cleared when the "-- VISUAL --" mode message
> > > > is removed.  Setting 'noshowmode' helps.
> > > > 
> > > > This should not happen though, when the message overwrites the mode then
> > > > there is no need later to clear the mode message.
> > > 
> > > I would expect it to work like gf (which itself is inconsistent).
> > > If I put the cursor over "later" in the paragraph above and type
> > > gf, I get a persistent error message in the command line:
> > > 
> > > E447: Can't find file "later" in path
> > > 
> > > If I visually-select "later" with viw and type gf, I get the same
> > > message, but it appears for only about one second.  It seems like it
> > > should also persist, but at least I see it and can look in :messages
> > > to read it again.
> > > 
> > > 'cmdheight' doesn't seem to affect the behavior of gf, but setting
> > > 'noshowmode' does "fix" it.  It would be nice if visual mode could
> > > be made smarter about clearing "-- VISUAL --" when that message has
> > > been overwritten, or at least leave it for a second or two as
> > > {Visual}gf does.
> > 
> > The patch I made first had a strict condition of where the message is
> > displayed.  The "gf" error message is on a different line, causing that
> > condition not to be true.  I'll fix that.
> 
> Your second patch seems to work fine, but the problem in my original
> mapping and function remained.  I finally found and fixed the
> problem, but I don't understand what's going on.
> 
> This test mapping and function (from the original problem report)
> now works fine when I move the cursor over a word and type "viwgx".
> 
> vmap  gx :call DebugSilent()
> function DebugSilent()
> echomsg "from DebugSilent"
> endfunction
> 
> But if I add this :normal command to the function, the message
> disappears.
> 
> function DebugSilent()
> normal gvy
> echomsg "from DebugSilent"
> endfunction

When the "normal&

Patch 9.0.1640

2023-06-17 Fir de Conversatie Bram Moolenaar


Patch 9.0.1640 (after 9.0.1639)
Problem:Compiler warning for unused variables without the crypt feature.
Solution:   Adjust #ifdefs
Files:  src/fileio.c


*** ../vim-9.0.1639/src/fileio.c2023-06-17 15:34:58.873252369 +0100
--- src/fileio.c2023-06-17 16:16:58.135014988 +0100
***
*** 149,157 
  char_u*p;
  off_T filesize = 0;
  int   skip_read = FALSE;
  off_T   filesize_disk = 0;  // file size read from disk
  off_T   filesize_count = 0; // counter
- #ifdef FEAT_CRYPT
  char_u*cryptkey = NULL;
  int   did_ask_for_key = FALSE;
  #endif
--- 149,157 
  char_u*p;
  off_T filesize = 0;
  int   skip_read = FALSE;
+ #ifdef FEAT_CRYPT
  off_T   filesize_disk = 0;  // file size read from disk
  off_T   filesize_count = 0; // counter
  char_u*cryptkey = NULL;
  int   did_ask_for_key = FALSE;
  #endif
***
*** 425,431 
--- 425,433 
buf_store_time(curbuf, &st, fname);
curbuf->b_mtime_read = curbuf->b_mtime;
curbuf->b_mtime_read_ns = curbuf->b_mtime_ns;
+ #ifdef FEAT_CRYPT
filesize_disk = st.st_size;
+ #endif
  #ifdef UNIX
/*
 * Use the protection bits of the original file for the swap file.
***
*** 1106,1112 
--- 1108,1116 
  {
linerest = 0;
filesize = 0;
+ #ifdef FEAT_CRYPT
filesize_count = 0;
+ #endif
skip_count = lines_to_skip;
read_count = lines_to_read;
conv_restlen = 0;
***
*** 1333,1341 
  #endif
long read_size = size;
size = read_eintr(fd, ptr, read_size);
-   filesize_count += size;
  #ifdef FEAT_CRYPT
!   // hit end of file
eof = (size < read_size || filesize_count == filesize_disk);
  #endif
}
--- 1337,1345 
  #endif
long read_size = size;
size = read_eintr(fd, ptr, read_size);
  #ifdef FEAT_CRYPT
!   // Did we reach end of file?
!   filesize_count += size;
eof = (size < read_size || filesize_count == filesize_disk);
  #endif
}
*** ../vim-9.0.1639/src/version.c   2023-06-17 15:34:58.873252369 +0100
--- src/version.c   2023-06-17 16:17:45.402972439 +0100
***
*** 697,698 
--- 697,700 
  {   /* Add new patch number below this line */
+ /**/
+ 1640,
  /**/

-- 
A computer program does what you tell it to do, not what you want it to do.

 /// Bram Moolenaar -- b...@moolenaar.net -- 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 vim_dev+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/vim_dev/20230617152019.589B31C1241%40moolenaar.net.


Patch 9.0.1639

2023-06-17 Fir de Conversatie Bram Moolenaar


Patch 9.0.1639 (after 9.0.1638)
Problem:Build failure without the crypt feature.
Solution:   Adjust #ifdefs
Files:  src/fileio.c


*** ../vim-9.0.1638/src/fileio.c2023-06-17 15:00:19.934646967 +0100
--- src/fileio.c2023-06-17 15:14:07.685688674 +0100
***
*** 218,224 
--- 218,226 
  int   using_b_ffname;
  int   using_b_fname;
  static char *msg_is_a_directory = N_("is a directory");
+ #ifdef FEAT_CRYPT
  int   eof = FALSE;
+ #endif
  #ifdef FEAT_SODIUM
  int   may_need_lseek = FALSE;
  #endif
***
*** 1276,1285 
if (!curbuf->b_p_eol)
--tlen;
size = tlen;
eof = TRUE;
break;
}
- 
}
}
}
--- 1278,1288 
if (!curbuf->b_p_eol)
--tlen;
size = tlen;
+ #ifdef FEAT_CRYPT
eof = TRUE;
+ #endif
break;
}
}
}
}
***
*** 1288,1294 
/*
 * Read bytes from the file.
 */
! # ifdef FEAT_SODIUM
// Let the crypt layer work with a buffer size of 8192
//
// Sodium encryption requires a fixed block size to
--- 1291,1297 
/*
 * Read bytes from the file.
 */
! #ifdef FEAT_SODIUM
// Let the crypt layer work with a buffer size of 8192
//
// Sodium encryption requires a fixed block size to
***
*** 1327,1338 
may_need_lseek = FALSE;
}
}
! # endif
long read_size = size;
size = read_eintr(fd, ptr, read_size);
filesize_count += size;
// hit end of file
eof = (size < read_size || filesize_count == filesize_disk);
}
  
  #ifdef FEAT_CRYPT
--- 1330,1343 
may_need_lseek = FALSE;
}
}
! #endif
long read_size = size;
size = read_eintr(fd, ptr, read_size);
filesize_count += size;
+ #ifdef FEAT_CRYPT
// hit end of file
eof = (size < read_size || filesize_count == filesize_disk);
+ #endif
}
  
  #ifdef FEAT_CRYPT
*** ../vim-9.0.1638/src/version.c   2023-06-17 15:00:19.934646967 +0100
--- src/version.c   2023-06-17 15:34:14.973281749 +0100
***
*** 697,698 
--- 697,700 
  {   /* Add new patch number below this line */
+ /**/
+ 1639,
  /**/

-- 
hundred-and-one symptoms of being an internet addict:
189. You put your e-mail address in the upper left-hand corner of envelopes.

 /// Bram Moolenaar -- b...@moolenaar.net -- 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 vim_dev+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/vim_dev/20230617143536.4D0211C1241%40moolenaar.net.


Patch 9.0.1638

2023-06-17 Fir de Conversatie Bram Moolenaar


Patch 9.0.1638 (after 9.0.1637)
Problem:crypt tests hang and cause memory errors
Solution:   Move variable to start of function.
Files:  src/fileio.c


*** ../vim-9.0.1637/src/fileio.c2023-06-16 21:42:02.380360392 +0100
--- src/fileio.c2023-06-17 14:56:20.386925633 +0100
***
*** 218,223 
--- 218,224 
  int   using_b_ffname;
  int   using_b_fname;
  static char *msg_is_a_directory = N_("is a directory");
+ int   eof = FALSE;
  #ifdef FEAT_SODIUM
  int   may_need_lseek = FALSE;
  #endif
***
*** 1222,1228 
size -= conv_restlen;
}
  
-   int eof = FALSE;
if (read_buffer)
{
/*
--- 1223,1228 
***
*** 1306,1313 
{
// set size to 8K + Sodium Crypt Metadata
size = WRITEBUFSIZE + crypt_get_max_header_len()
!+ crypto_secretstream_xchacha20poly1305_HEADERBYTES
!+ crypto_secretstream_xchacha20poly1305_ABYTES;
may_need_lseek = TRUE;
}
  
--- 1306,1313 
{
// set size to 8K + Sodium Crypt Metadata
size = WRITEBUFSIZE + crypt_get_max_header_len()
!   + crypto_secretstream_xchacha20poly1305_HEADERBYTES
!   + crypto_secretstream_xchacha20poly1305_ABYTES;
may_need_lseek = TRUE;
}
  
***
*** 1328,1338 
}
}
  # endif
!   eof = size;
!   size = read_eintr(fd, ptr, size);
filesize_count += size;
// hit end of file
!   eof = (size < eof || filesize_count == filesize_disk);
}
  
  #ifdef FEAT_CRYPT
--- 1328,1338 
}
}
  # endif
!   long read_size = size;
!   size = read_eintr(fd, ptr, read_size);
filesize_count += size;
// hit end of file
!   eof = (size < read_size || filesize_count == filesize_disk);
}
  
  #ifdef FEAT_CRYPT
*** ../vim-9.0.1637/src/version.c   2023-06-16 21:42:02.380360392 +0100
--- src/version.c   2023-06-17 14:53:56.447093657 +0100
***
*** 697,698 
--- 697,700 
  {   /* Add new patch number below this line */
+ /**/
+ 1638,
  /**/

-- 
hundred-and-one symptoms of being an internet addict:
188. You purchase a laptop so you can surf while sitting on the can.

 /// Bram Moolenaar -- b...@moolenaar.net -- 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 vim_dev+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/vim_dev/20230617140059.156481C1241%40moolenaar.net.


Re: [vim/vim] fix warning about possibly uninitialized eof var in fileio. (PR #12549)

2023-06-17 Fir de Conversatie Bram Moolenaar


Christian wrote:

> So my gcc 12.2 started complaining about possibly using an uninitialized 
> variable eof:
> ,
> | fileio.c: In function ‘readfile’:
> | fileio.c:221:17: warning: ‘eof’ may be used uninitialized 
> [-Wmaybe-uninitialized]
> |   221 | int eof;
> |   | ^~~
> `
> 
> It is currently only initialized in the `if (read_buffer)` case but
> not in the else clause. There is the following code:
> 
> if (read_buffer)
>   eof = FALSE;
> else  [1]
> {
>   if (filesize == 0)
>[...]
>   else if (filesize > 0 ...  [4]
>   {
>   [...]
> if (curbuf->b_cryptstate->method_nr == CRYPT_M_SOD
>   && !eof && may_need_lseek)   [3]
> {
>   [...]
> 
> }
>   }
>   eof = size;[2]
> 
> In the `else` condition [1], eof will only be initialized at [2],
> while it looks like it may be used at [3].
> 
> So technically, the `eof` variable could be accessed uninitialized in
> the else if case [4]. This can not happen, because filesize is
> initialized to zero, so Vim cannot run into this case in practice and
> after the first loop, eof will be initialized.
> 
> However, I think it's worth it, to move the initialization of the
> `eof` variable to the beginning of the function and don't init it in
> both branches of the if/else condition and also also do not depend on
> the implicit initialization of the filesize variable.

My idea to move the declaration inside the loop does not appear to work
well.  "make test_crypt" prompts for a key several times, and eventually
allocated memory is corrupted.  Moving the declaration back to the start
of the function fixes most of this.

There still is one prompt for a key though.  Hmm, I noticed before that
"eof" is used temporarily to store "size", which is confusing.  When I
use a separate variable for that then it works better.  Not sure why,
perhaps because "eof" is int and "size" is long?

-- 
hundred-and-one symptoms of being an internet addict:
187. You promise yourself that you'll only stay online for another
 15 minutes...at least once every hour.

 /// Bram Moolenaar -- b...@moolenaar.net -- 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 vim_dev+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/vim_dev/20230617135929.23FAB1C1241%40moolenaar.net.


Patch 9.0.1637

2023-06-16 Fir de Conversatie Bram Moolenaar


Patch 9.0.1637
Problem:Compiler warning for uninitialized variable.
Solution:   Move the variable to an inner block and initialize it. (Christian
Brabandt, closes #12549)
Files:  src/fileio.c


*** ../vim-9.0.1636/src/fileio.c2023-05-27 18:02:50.192062438 +0100
--- src/fileio.c2023-06-16 21:35:59.249319541 +0100
***
*** 218,224 
  int   using_b_ffname;
  int   using_b_fname;
  static char *msg_is_a_directory = N_("is a directory");
- int   eof;
  #ifdef FEAT_SODIUM
  int   may_need_lseek = FALSE;
  #endif
--- 218,223 
***
*** 1223,1235 
size -= conv_restlen;
}
  
if (read_buffer)
{
/*
 * Read bytes from curbuf.  Used for converting text read
 * from stdin.
 */
-   eof = FALSE;
if (read_buf_lnum > from)
size = 0;
else
--- 1222,1234 
size -= conv_restlen;
}
  
+   int eof = FALSE;
if (read_buffer)
{
/*
 * Read bytes from curbuf.  Used for converting text read
 * from stdin.
 */
if (read_buf_lnum > from)
size = 0;
else
***
*** 5477,5483 
  int
  match_file_list(char_u *list, char_u *sfname, char_u *ffname)
  {
! char_ubuf[100];
  char_u*tail;
  char_u*regpat;
  char  allow_dirs;
--- 5476,5482 
  int
  match_file_list(char_u *list, char_u *sfname, char_u *ffname)
  {
! char_ubuf[MAXPATHL];
  char_u*tail;
  char_u*regpat;
  char  allow_dirs;
***
*** 5490,5496 
  p = list;
  while (*p)
  {
!   copy_option_part(&p, buf, 100, ",");
regpat = file_pat_to_reg_pat(buf, NULL, &allow_dirs, FALSE);
if (regpat == NULL)
break;
--- 5489,5495 
  p = list;
  while (*p)
  {
!   copy_option_part(&p, buf, MAXPATHL, ",");
regpat = file_pat_to_reg_pat(buf, NULL, &allow_dirs, FALSE);
if (regpat == NULL)
break;
*** ../vim-9.0.1636/src/version.c   2023-06-15 22:51:53.381597754 +0100
--- src/version.c   2023-06-16 21:41:14.208508095 +0100
***
*** 697,698 
--- 697,700 
  {   /* Add new patch number below this line */
+ /**/
+ 1637,
  /**/

-- 
hundred-and-one symptoms of being an internet addict:
184. You no longer ask prospective dates what their sign is, instead
 your line is "Hi, what's your URL?"

 /// Bram Moolenaar -- b...@moolenaar.net -- 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 vim_dev+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/vim_dev/20230616210413.B01B01C1238%40moolenaar.net.


Patch 9.0.1636

2023-06-15 Fir de Conversatie Bram Moolenaar


Patch 9.0.1636
Problem:Expanding a pattern interferes with command line completion.
Solution:   Set the file index only when appropriate. (closes #12519)
Files:  src/cmdexpand.c, src/testdir/test_cmdline.vim


*** ../vim-9.0.1635/src/cmdexpand.c 2023-05-20 14:06:56.669542805 +0100
--- src/cmdexpand.c 2023-06-15 22:48:58.833639165 +0100
***
*** 957,963 
  int   mode)
  {
  char_u*ss = NULL;
! static intfindex;
  static char_u *orig_save = NULL;  // kept value of orig
  int   orig_saved = FALSE;
  int   i;
--- 957,963 
  int   mode)
  {
  char_u*ss = NULL;
! static intfindex; // TODO: Move into expand_T
  static char_u *orig_save = NULL;  // kept value of orig
  int   orig_saved = FALSE;
  int   i;
***
*** 971,978 
  if (mode == WILD_CANCEL)
ss = vim_strsave(orig_save ? orig_save : (char_u *)"");
  else if (mode == WILD_APPLY)
!   ss = vim_strsave(findex == -1 ? (orig_save ?
!   orig_save : (char_u *)"") : xp->xp_files[findex]);
  
  // free old names
  if (xp->xp_numfiles != -1 && mode != WILD_ALL && mode != WILD_LONGEST)
--- 971,979 
  if (mode == WILD_CANCEL)
ss = vim_strsave(orig_save ? orig_save : (char_u *)"");
  else if (mode == WILD_APPLY)
!   ss = vim_strsave(findex == -1
!   ? (orig_save ? orig_save : (char_u *)"")
!   : xp->xp_files[findex]);
  
  // free old names
  if (xp->xp_numfiles != -1 && mode != WILD_ALL && mode != WILD_LONGEST)
***
*** 985,991 
if (compl_match_array != NULL)
cmdline_pum_remove();
  }
! findex = 0;
  
  if (mode == WILD_FREE)// only release file name
return NULL;
--- 986,994 
if (compl_match_array != NULL)
cmdline_pum_remove();
  }
! // TODO: Remove condition if "findex" is part of expand_T ?
! if (mode != WILD_EXPAND_FREE && mode != WILD_ALL && mode != WILD_ALL_KEEP)
!   findex = 0;
  
  if (mode == WILD_FREE)// only release file name
return NULL;
*** ../vim-9.0.1635/src/testdir/test_cmdline.vim2023-05-19 
21:40:57.854218815 +0100
--- src/testdir/test_cmdline.vim2023-06-15 22:45:43.109701709 +0100
***
*** 1336,1341 
--- 1336,1365 
call assert_equal('"py3file', @:)
  endfunc
  
+ " Test that expanding a pattern doesn't interfere with cmdline completion.
+ func Test_expand_during_cmdline_completion()
+   func ExpandStuff()
+ badd 

Re: X11 requirements -- solved

2023-06-15 Fir de Conversatie Bram Moolenaar


> i thought i had exhausted google, but with yet another stab at it, in
> vim.fandom.com i found reference to two packages i didn't have:  libxpm-dev
> and libxt-dev
> 
> i added both and boom, i again have a gui -- i don't know if i needed both
> of them, but now it builds fine
> 
> i apologize for the noise

libxt-dev is mentioned in SRC/INSTALL.  I expect this package contains
an include file that is needed for X11.

I thought libxpm-dev is only for Motif and Vim should build without it.
But it may depend on what kind of Motif is used.

-- 
hundred-and-one symptoms of being an internet addict:
179. You wonder why your household garbage can doesn't have an
 "empty recycle bin" button.

 /// Bram Moolenaar -- b...@moolenaar.net -- 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 vim_dev+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/vim_dev/20230615201458.BA5EE1C0923%40moolenaar.net.


Re: Bug in :vmap

2023-06-15 Fir de Conversatie Bram Moolenaar


> On 2023-06-15, Bram Moolenaar wrote:
> > > Help for :map- says that with , the right side of
> > > a mapping will not be echoed on the command line, but messages from
> > > the executed command are still given.  This works with :nmap but not
> > > with :vmap.  I would expect it to work with :vmap as well.
> > > 
> > > Steps to reproduce
> > > 
> > >  1. Put the following in a file, say foo.vim.
> > > 
> > > nmap  gx :call DebugSilent()
> > > vmap  gx :call DebugSilent()
> > > function DebugSilent()
> > > echomsg "from DebugSilent"
> > > endfunction
> > > 
> > >  2. Start vim and source that file.
> > > 
> > > $ vim -N --clean
> > > :so foo.vim
> > > 
> > >  3. Enter some word into the current buffer.
> > > 
> > >  4. Visually select that word.
> > > 
> > > viw
> > > 
> > >  5. Type the mapping.
> > > 
> > > gx
> > > 
> > >  6. Note that no message appears, or just flashes by briefly.
> > > 
> > >  7. Execute :messages to verify that the message was generated and
> > > saved in message history.
> > > 
> > >  8. Without visually selecting the word, type the mapping.
> > > 
> > > gx
> > > 
> > >  9. Note that the message does appear in the command line and
> > > remains there.
> > > 
> > > Expected behavior
> > > 
> > > I expect the message to remain in the command line after the
> > > execution of the vmap just as it does for a normal map.
> > 
> > It appears to work as you expect when 'cmdheight' is 2 or more.
> > 
> > Most likely the message is cleared when the "-- VISUAL --" mode message
> > is removed.  Setting 'noshowmode' helps.
> > 
> > This should not happen though, when the message overwrites the mode then
> > there is no need later to clear the mode message.
> 
> I would expect it to work like gf (which itself is inconsistent).
> If I put the cursor over "later" in the paragraph above and type
> gf, I get a persistent error message in the command line:
> 
> E447: Can't find file "later" in path
> 
> If I visually-select "later" with viw and type gf, I get the same
> message, but it appears for only about one second.  It seems like it
> should also persist, but at least I see it and can look in :messages
> to read it again.
> 
> 'cmdheight' doesn't seem to affect the behavior of gf, but setting
> 'noshowmode' does "fix" it.  It would be nice if visual mode could
> be made smarter about clearing "-- VISUAL --" when that message has
> been overwritten, or at least leave it for a second or two as
> {Visual}gf does.

The patch I made first had a strict condition of where the message is
displayed.  The "gf" error message is on a different line, causing that
condition not to be true.  I'll fix that.

-- 
hundred-and-one symptoms of being an internet addict:
178. You look for an icon to double-click to open your bedroom window.

 /// Bram Moolenaar -- b...@moolenaar.net -- 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 vim_dev+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/vim_dev/20230615174529.46E361C0D56%40moolenaar.net.


Patch 9.0.1635

2023-06-15 Fir de Conversatie Bram Moolenaar


Patch 9.0.1635 (after 9.0.1634)
Problem:Error message is cleared when removing mode message.
Solution:   Also reset flags when the message is further down.
Files:  src/message.c, src/testdir/test_messages.vim,
src/testdir/dumps/Test_message_not_cleared_after_mode_1.dump,
src/testdir/dumps/Test_message_not_cleared_after_mode_2.dump,
src/testdir/dumps/Test_message_not_cleared_after_mode_3.dump


*** ../vim-9.0.1634/src/message.c   2023-06-15 16:39:42.597971058 +0100
--- src/message.c   2023-06-15 18:40:00.662742816 +0100
***
*** 1643,1649 
  
  // When drawing over the command line no need to clear it later or remove
  // the mode message.
! if (msg_row == cmdline_row && msg_col == 0)
  {
clear_cmdline = FALSE;
mode_displayed = FALSE;
--- 1643,1649 
  
  // When drawing over the command line no need to clear it later or remove
  // the mode message.
! if (msg_row >= cmdline_row && msg_col == 0)
  {
clear_cmdline = FALSE;
mode_displayed = FALSE;
*** ../vim-9.0.1634/src/testdir/test_messages.vim   2023-06-15 
16:39:42.597971058 +0100
--- src/testdir/test_messages.vim   2023-06-15 18:37:32.130852605 +0100
***
*** 347,353 
endfunction
set showmode
set cmdheight=1
!   call setline(1, ['one', 'two', 'three'])
END
call writefile(lines, 'XmessageMode', 'D')
let buf = RunVimInTerminal('-S XmessageMode', {'rows': 10})
--- 347,354 
endfunction
set showmode
set cmdheight=1
!   call test_settime(1)
!   call setline(1, ['one', 'NoSuchFile', 'three'])
END
call writefile(lines, 'XmessageMode', 'D')
let buf = RunVimInTerminal('-S XmessageMode', {'rows': 10})
***
*** 361,366 
--- 362,373 
call TermWait(buf)
call VerifyScreenDump(buf, 'Test_message_not_cleared_after_mode_2', {})
  
+   " removing the mode message used to also clear the error message
+   call term_sendkeys(buf, ":set cmdheight=2\")
+   call term_sendkeys(buf, '2GvEgf')
+   call TermWait(buf)
+   call VerifyScreenDump(buf, 'Test_message_not_cleared_after_mode_3', {})
+ 
call StopVimInTerminal(buf)
  endfunc
  
*** 
../vim-9.0.1634/src/testdir/dumps/Test_message_not_cleared_after_mode_1.dump
2023-06-15 16:39:42.597971058 +0100
--- src/testdir/dumps/Test_message_not_cleared_after_mode_1.dump
2023-06-15 18:34:57.362930984 +0100
***
*** 1,5 
  >o+0&#ff0|n|e| @71
! |t|w|o| @71
  |t|h|r|e@1| @69
  |~+0#4040ff13&| @73
  |~| @73
--- 1,5 
  >o+0&#ff0|n|e| @71
! |N|o|S|u|c|h|F|i|l|e| @64
  |t|h|r|e@1| @69
  |~+0#4040ff13&| @73
  |~| @73
*** 
../vim-9.0.1634/src/testdir/dumps/Test_message_not_cleared_after_mode_2.dump
2023-06-15 16:39:42.597971058 +0100
--- src/testdir/dumps/Test_message_not_cleared_after_mode_2.dump
2023-06-15 18:34:58.438930594 +0100
***
*** 1,5 
  >o+0&#ff0|n|e| @71
! |t|w|o| @71
  |t|h|r|e@1| @69
  |~+0#4040ff13&| @73
  |~| @73
--- 1,5 
  >o+0&#ff0|n|e| @71
! |N|o|S|u|c|h|F|i|l|e| @64
  |t|h|r|e@1| @69
  |~+0#4040ff13&| @73
  |~| @73
*** 
../vim-9.0.1634/src/testdir/dumps/Test_message_not_cleared_after_mode_3.dump
2023-06-15 18:43:43.514532741 +0100
--- src/testdir/dumps/Test_message_not_cleared_after_mode_3.dump
2023-06-15 18:38:47.222800719 +0100
***
*** 0 
--- 1,10 
+ |o+0&#ff0|n|e| @71
+ |N|o|S|u|c|h|F|i|l>e| @64
+ |t|h|r|e@1| @69
+ |~+0#4040ff13&| @73
+ |~| @73
+ |~| @73
+ |~| @73
+ |~| @73
+ | +0#000&@74
+ |E+0#ff16#e02|4@1|7|:| |C|a|n|'|t| |f|i|n|d| |f|i|l|e| 
|"|N|o|S|u|c|h|F|i|l|e|"| |i|n| |p|a|t|h| +0#000#ff0@14|2|,|1|0| 
@9|A|l@1| 
*** ../vim-9.0.1634/src/version.c   2023-06-15 16:39:42.597971058 +0100
--- src/version.c   2023-06-15 18:43:57.882517762 +0100
***
*** 697,698 
--- 697,700 
  {   /* Add new patch number below this line */
+ /**/
+ 1635,
  /**/

-- 
Rule #1: Don't give somebody a tool that he's going to hurt himself with.

 /// Bram Moolenaar -- b...@moolenaar.net -- 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 vim_dev+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/vim_dev/20230615174529.4A55E1C0923%40moolenaar.net.


Patch 9.0.1634

2023-06-15 Fir de Conversatie Bram Moolenaar


Patch 9.0.1634
Problem:Message is cleared when removing mode message (Gary Johnson).
Solution:   Do not clear the command line after displaying a message.
Files:  src/message.c, src/testdir/test_messages.vim,
src/testdir/dumps/Test_message_not_cleared_after_mode_1.dump,
src/testdir/dumps/Test_message_not_cleared_after_mode_2.dump


*** ../vim-9.0.1633/src/message.c   2023-05-24 21:02:20.481162129 +0100
--- src/message.c   2023-06-15 16:24:41.185486445 +0100
***
*** 1641,1646 
--- 1641,1654 
attr &= ~MSG_HIST;
  }
  
+ // When drawing over the command line no need to clear it later or remove
+ // the mode message.
+ if (msg_row == cmdline_row && msg_col == 0)
+ {
+   clear_cmdline = FALSE;
+   mode_displayed = FALSE;
+ }
+ 
  // If the string starts with a composing character first draw a space on
  // which the composing char can be drawn.
  if (enc_utf8 && utf_iscomposing(utf_ptr2char(msgstr)))
*** ../vim-9.0.1633/src/testdir/test_messages.vim   2022-11-27 
14:39:27.885337780 +
--- src/testdir/test_messages.vim   2023-06-15 16:32:44.721389719 +0100
***
*** 336,341 
--- 336,369 
call StopVimInTerminal(buf)
  endfunc
  
+ func Test_message_not_cleared_after_mode()
+   CheckRunVimInTerminal
+ 
+   let lines =<< trim END
+   nmap  gx :call DebugSilent('normal')
+   vmap  gx :call DebugSilent('visual')
+   function DebugSilent(arg)
+   echomsg "from DebugSilent" a:arg
+   endfunction
+   set showmode
+   set cmdheight=1
+   call setline(1, ['one', 'two', 'three'])
+   END
+   call writefile(lines, 'XmessageMode', 'D')
+   let buf = RunVimInTerminal('-S XmessageMode', {'rows': 10})
+ 
+   call term_sendkeys(buf, 'gx')
+   call TermWait(buf)
+   call VerifyScreenDump(buf, 'Test_message_not_cleared_after_mode_1', {})
+ 
+   " removing the mode message used to also clear the intended message
+   call term_sendkeys(buf, 'vEgx')
+   call TermWait(buf)
+   call VerifyScreenDump(buf, 'Test_message_not_cleared_after_mode_2', {})
+ 
+   call StopVimInTerminal(buf)
+ endfunc
+ 
  " Test verbose message before echo command
  func Test_echo_verbose_system()
CheckRunVimInTerminal
*** 
../vim-9.0.1633/src/testdir/dumps/Test_message_not_cleared_after_mode_1.dump
2023-06-15 16:39:05.513763546 +0100
--- src/testdir/dumps/Test_message_not_cleared_after_mode_1.dump
2023-06-15 16:33:02.669381594 +0100
***
*** 0 
--- 1,10 
+ >o+0&#ff0|n|e| @71
+ |t|w|o| @71
+ |t|h|r|e@1| @69
+ |~+0#4040ff13&| @73
+ |~| @73
+ |~| @73
+ |~| @73
+ |~| @73
+ |~| @73
+ |f+0#000&|r|o|m| |D|e|b|u|g|S|i|l|e|n|t| |n|o|r|m|a|l| @33|1|,|1| 
@10|A|l@1| 
*** 
../vim-9.0.1633/src/testdir/dumps/Test_message_not_cleared_after_mode_2.dump
2023-06-15 16:39:05.521763592 +0100
--- src/testdir/dumps/Test_message_not_cleared_after_mode_2.dump
2023-06-15 16:33:03.925381017 +0100
***
*** 0 
--- 1,10 
+ >o+0&#ff0|n|e| @71
+ |t|w|o| @71
+ |t|h|r|e@1| @69
+ |~+0#4040ff13&| @73
+ |~| @73
+ |~| @73
+ |~| @73
+ |~| @73
+ |~| @73
+ |f+0#000&|r|o|m| |D|e|b|u|g|S|i|l|e|n|t| |v|i|s|u|a|l| @33|1|,|1| 
@10|A|l@1| 
*** ../vim-9.0.1633/src/version.c   2023-06-15 10:41:15.638227833 +0100
--- src/version.c   2023-06-15 16:33:55.745356239 +0100
***
*** 697,698 
--- 697,700 
  {   /* Add new patch number below this line */
+ /**/
+ 1634,
  /**/

-- 
hundred-and-one symptoms of being an internet addict:
177. You log off of your system because it's time to go to work.

 /// Bram Moolenaar -- b...@moolenaar.net -- 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 vim_dev+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/vim_dev/20230615160125.06CA91C0D56%40moolenaar.net.


Re: Bug in :vmap

2023-06-15 Fir de Conversatie Bram Moolenaar


> Help for :map- says that with , the right side of
> a mapping will not be echoed on the command line, but messages from
> the executed command are still given.  This works with :nmap but not
> with :vmap.  I would expect it to work with :vmap as well.
> 
> Steps to reproduce
> 
>  1. Put the following in a file, say foo.vim.
> 
> nmap  gx :call DebugSilent()
> vmap  gx :call DebugSilent()
> function DebugSilent()
> echomsg "from DebugSilent"
> endfunction
> 
>  2. Start vim and source that file.
> 
> $ vim -N --clean
> :so foo.vim
> 
>  3. Enter some word into the current buffer.
> 
>  4. Visually select that word.
> 
> viw
> 
>  5. Type the mapping.
> 
> gx
> 
>  6. Note that no message appears, or just flashes by briefly.
> 
>  7. Execute :messages to verify that the message was generated and
> saved in message history.
> 
>  8. Without visually selecting the word, type the mapping.
> 
> gx
> 
>  9. Note that the message does appear in the command line and
> remains there.
> 
> Expected behavior
> 
> I expect the message to remain in the command line after the
> execution of the vmap just as it does for a normal map.

It appears to work as you expect when 'cmdheight' is 2 or more.

Most likely the message is cleared when the "-- VISUAL --" mode message
is removed.  Setting 'noshowmode' helps.

This should not happen though, when the message overwrites the mode then
there is no need later to clear the mode message.

-- 
If Microsoft would build a car...
... The airbag system would ask "are you SURE?" before deploying.

 /// Bram Moolenaar -- b...@moolenaar.net -- 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 vim_dev+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/vim_dev/20230615153522.738AB1C0D56%40moolenaar.net.


Patch 9.0.1633

2023-06-15 Fir de Conversatie Bram Moolenaar


Patch 9.0.1633
Problem:Duplicate code for converting float to string.
Solution:   Use tv_get_string(). (closes #12521)
Files:  src/eval.c


*** ../vim-9.0.1632/src/eval.c  2023-06-01 19:26:23.435627545 +0100
--- src/eval.c  2023-06-15 10:35:46.813581256 +0100
***
*** 570,577 
  
  /*
   * Convert "tv" to a string.
!  * When "convert" is TRUE convert a List into a sequence of lines and convert
!  * a Float to a String.
   * Returns an allocated string (NULL when out of memory).
   */
  char_u *
--- 570,576 
  
  /*
   * Convert "tv" to a string.
!  * When "convert" is TRUE convert a List into a sequence of lines.
   * Returns an allocated string (NULL when out of memory).
   */
  char_u *
***
*** 579,585 
  {
  garray_T  ga;
  char_u*retval;
- char_unumbuf[NUMBUFLEN];
  
  if (convert && tv->v_type == VAR_LIST)
  {
--- 578,583 
***
*** 593,603 
ga_append(&ga, NUL);
retval = (char_u *)ga.ga_data;
  }
- else if (convert && tv->v_type == VAR_FLOAT)
- {
-   vim_snprintf((char *)numbuf, NUMBUFLEN, "%g", tv->vval.v_float);
-   retval = vim_strsave(numbuf);
- }
  else
retval = vim_strsave(tv_get_string(tv));
  return retval;
--- 591,596 
***
*** 606,613 
  /*
   * Top level evaluation function, returning a string.  Does not handle line
   * breaks.
!  * When "convert" is TRUE convert a List into a sequence of lines and convert
!  * a Float to a String.
   * Return pointer to allocated memory, or NULL for failure.
   */
  char_u *
--- 599,605 
  /*
   * Top level evaluation function, returning a string.  Does not handle line
   * breaks.
!  * When "convert" is TRUE convert a List into a sequence of lines.
   * Return pointer to allocated memory, or NULL for failure.
   */
  char_u *
*** ../vim-9.0.1632/src/version.c   2023-06-14 19:45:39.538903631 +0100
--- src/version.c   2023-06-15 10:37:47.333841087 +0100
***
*** 697,698 
--- 697,700 
  {   /* Add new patch number below this line */
+ /**/
+ 1633,
  /**/

-- 
hundred-and-one symptoms of being an internet addict:
175. You send yourself e-mail before you go to bed to remind you
 what to do when you wake up.

 /// Bram Moolenaar -- b...@moolenaar.net -- 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 vim_dev+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/vim_dev/20230615094250.202B51C0D56%40moolenaar.net.


Patch 9.0.1632

2023-06-14 Fir de Conversatie Bram Moolenaar
/git/attributes', '/etc/gitattributes', 
'/usr/local/etc/gitattributes', 'some.git/info/attributes'],
  gitcommit: ['COMMIT_EDITMSG', 'MERGE_MSG', 'TAG_EDITMSG', 
'NOTES_EDITMSG', 'EDIT_DESCRIPTION'],
! gitconfig: ['file.git/config', 'file.git/config.worktree', 
'file.git/worktrees/x/config.worktree', '.gitconfig', '.gitmodules', 
'file.git/modules//config', '/.config/git/config', '/etc/gitconfig', 
'/usr/local/etc/gitconfig', '/etc/gitconfig.d/file', 
'any/etc/gitconfig.d/file', '/.gitconfig.d/file', 'any/.config/git/config', 
'any/.gitconfig.d/file', 'some.git/config', 'some.git/modules/any/config'],
! gitignore: ['file.git/info/exclude', '.gitignore', '/.config/git/ignore', 
'some.git/info/exclude'],
  gitolite: ['gitolite.conf', '/gitolite-admin/conf/file', 
'any/gitolite-admin/conf/file'],
  gitrebase: ['git-rebase-todo'],
  gitsendemail: ['.gitsendemail.msg.xx'],
--- 253,262 
  gedcom: ['file.ged', 'lltx.txt', '/tmp/lltmp', '/tmp/lltmp-file', 
'any/tmp/lltmp', 'any/tmp/lltmp-file'],
  gemtext: ['file.gmi', 'file.gemini'],
  gift: ['file.gift'],
! gitattributes: ['file.git/info/attributes', '.gitattributes', 
'/.config/git/attributes', '/etc/gitattributes', 
'/usr/local/etc/gitattributes', 'some.git/info/attributes'] + 
WhenConfigHome('$XDG_CONFIG_HOME/git/attributes'),
  gitcommit: ['COMMIT_EDITMSG', 'MERGE_MSG', 'TAG_EDITMSG', 
'NOTES_EDITMSG', 'EDIT_DESCRIPTION'],
! gitconfig: ['file.git/config', 'file.git/config.worktree', 
'file.git/worktrees/x/config.worktree', '.gitconfig', '.gitmodules', 
'file.git/modules//config', '/.config/git/config', '/etc/gitconfig', 
'/usr/local/etc/gitconfig', '/etc/gitconfig.d/file', 
'any/etc/gitconfig.d/file', '/.gitconfig.d/file', 'any/.config/git/config', 
'any/.gitconfig.d/file', 'some.git/config', 'some.git/modules/any/config'] + 
WhenConfigHome('$XDG_CONFIG_HOME/git/config'),
! gitignore: ['file.git/info/exclude', '.gitignore', '/.config/git/ignore', 
'some.git/info/exclude'] + WhenConfigHome('$XDG_CONFIG_HOME/git/ignore'),
  gitolite: ['gitolite.conf', '/gitolite-admin/conf/file', 
'any/gitolite-admin/conf/file'],
  gitrebase: ['git-rebase-todo'],
  gitsendemail: ['.gitsendemail.msg.xx'],
***
*** 807,812 
--- 831,842 
  enddef
  
  def Test_filetype_detection()
+   SetupConfigHome()
+   if !empty(s:saveConfigHome)
+ defer setenv("XDG_CONFIG_HOME", s:saveConfigHome)
+   endif
+   mkdir(GetConfigHome(), 'R')
+ 
filetype on
CheckItems(s:GetFilenameChecks())
if has('fname_case')
*** ../vim-9.0.1631/src/version.c   2023-06-14 16:39:48.657873849 +0100
--- src/version.c   2023-06-14 19:44:08.922765583 +0100
***
*** 697,698 
--- 697,700 
  {   /* Add new patch number below this line */
+ /**/
+ 1632,
  /**/

-- 
Did you ever see a "Hit any key to continue" message in a music piece?

 /// Bram Moolenaar -- b...@moolenaar.net -- 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 vim_dev+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/vim_dev/20230614184610.23BF11C0CE4%40moolenaar.net.


Patch 9.0.1631

2023-06-14 Fir de Conversatie Bram Moolenaar
7;, 'E474:')
--- 376,382 
call assert_equal('"set filetype=' .. getcompletion('a*', 
'filetype')->join(), @:)
  endfunc
  
! func Test_set_option_errors()
call assert_fails('set scroll=-1', 'E49:')
call assert_fails('set backupcopy=', 'E474:')
call assert_fails('set regexpengine=3', 'E474:')
***
*** 478,484 
if has('python') || has('python3')
  call assert_fails('set pyxversion=6', 'E474:')
endif
!   call assert_fails("let &tabstop='ab'", 'E521:')
call assert_fails('set spellcapcheck=%\\(', 'E54:')
call assert_fails('set sessionoptions=curdir,sesdir', 'E474:')
call assert_fails('set foldmarker={{{,', 'E474:')
--- 478,484 
if has('python') || has('python3')
  call assert_fails('set pyxversion=6', 'E474:')
endif
!   call assert_fails("let &tabstop='ab'", ['E521:', 'E521:'])
call assert_fails('set spellcapcheck=%\\(', 'E54:')
call assert_fails('set sessionoptions=curdir,sesdir', 'E474:')
call assert_fails('set foldmarker={{{,', 'E474:')
***
*** 502,507 
--- 502,513 
call assert_fails('set t_#-&', 'E522:')
call assert_fails('let &formatoptions = "?"', 'E539:')
call assert_fails('call setbufvar("", "&formatoptions", "?")', 'E539:')
+   call assert_fails('call setwinvar(0, "&scrolloff", [])', ['E745:', 'E745:'])
+   call assert_fails('call setwinvar(0, "&list", [])', ['E745:', 'E745:'])
+   call assert_fails('call setwinvar(0, "&listchars", [])', ['E730:', 'E730:'])
+   call assert_fails('call setwinvar(0, "&nosuchoption", 0)', ['E355:', 
'E355:'])
+   call assert_fails('call setwinvar(0, "&nosuchoption", "")', ['E355:', 
'E355:'])
+   call assert_fails('call setwinvar(0, "&nosuchoption", [])', ['E355:', 
'E355:'])
  endfunc
  
  func Test_set_encoding()
*** ../vim-9.0.1630/src/testdir/test_vim9_assign.vim2023-06-10 
19:00:08.457416167 +0100
--- src/testdir/test_vim9_assign.vim2023-06-14 16:33:06.798336525 +0100
***
*** 145,150 
--- 145,156 
&ts %= 4
assert_equal(2, &ts)
  
+   assert_fails('&ts /= 0', ['E1154:', 'E1154:'])
+   assert_fails('&ts %= 0', ['E1154:', 'E1154:'])
+   assert_fails('&ts /= []', ['E745:', 'E745:'])
+   assert_fails('&ts %= []', ['E745:', 'E745:'])
+   assert_equal(2, &ts)
+ 
var f100: float = 100.0
f100 /= 5
assert_equal(20.0, f100)
*** ../vim-9.0.1630/src/testdir/test_vim9_builtin.vim   2023-06-08 
17:09:40.192768840 +0100
--- src/testdir/test_vim9_builtin.vim   2023-06-14 16:33:06.798336525 +0100
***
*** 3944,3950 
v9.CheckDefAndScriptFailure(['setwinvar("a", "b", 1)'], ['E1013: Argument 
1: type mismatch, expected number but got string', 'E1210: Number required for 
argument 1'])
v9.CheckDefAndScriptFailure(['setwinvar(1, 2, "c")'], ['E1013: Argument 2: 
type mismatch, expected string but got number', 'E1174: String required for 
argument 2'])
assert_fails('setwinvar(1, "", 10)', 'E461: Illegal variable name')
!   assert_fails('setwinvar(0, "&rulerformat", true)', 'E928:')
  enddef
  
  def Test_sha256()
--- 3944,3950 
v9.CheckDefAndScriptFailure(['setwinvar("a", "b", 1)'], ['E1013: Argument 
1: type mismatch, expected number but got string', 'E1210: Number required for 
argument 1'])
v9.CheckDefAndScriptFailure(['setwinvar(1, 2, "c")'], ['E1013: Argument 2: 
type mismatch, expected string but got number', 'E1174: String required for 
argument 2'])
assert_fails('setwinvar(1, "", 10)', 'E461: Illegal variable name')
!   assert_fails('setwinvar(0, "&rulerformat", true)', ['E928:', 'E928:'])
  enddef
  
  def Test_sha256()
*** ../vim-9.0.1630/src/testdir/test_vimscript.vim  2023-05-24 
21:02:20.489162125 +0100
--- src/testdir/test_vimscript.vim  2023-06-14 16:33:06.798336525 +0100
***
*** 7077,7083 
  call assert_equal(6, &scrolljump)
  let &scrolljump %= 5
  call assert_equal(1, &scrolljump)
! call assert_fails('let &scrolljump .= "j"', 'E734:')
  set scrolljump&vim
  
  let &foldlevelstart = 2
--- 7077,7083 
  call assert_equal(6, &scrolljump)
  let &scrolljump %= 5
  call assert_equal(1, &scrolljump)
! call assert_fails('let &scrolljump .= "j"', ['E734:', 'E734:'])
  set scrolljump&vim
  
  let &foldlevelstart = 2
*** ../vim-9.0.1630/src/version.c   2023-06-14 15:09:59.226017801 +0100
--- src/version.c   2023-06-14 16:33:42.638290614 +0100
***
*** 697,698 
--- 697,700 
  {   /* Add new patch number below this line */
+ /**/
+ 1631,
  /**/

-- 
"The question of whether computers can think is just like the question
of whether submarines can swim."  -- Edsger W. Dijkstra

 /// Bram Moolenaar -- b...@moolenaar.net -- 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 vim_dev+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/vim_dev/20230614154029.13C6A1C0CE4%40moolenaar.net.


Patch 9.0.1630

2023-06-14 Fir de Conversatie Bram Moolenaar


Patch 9.0.1630
Problem:"make clean" at the toplevel fails.
Solution:   Clean the indent and syntax directories in a sub-shell.  (Ben
Jackson, closes #12536, closes #12526)
Files:  Makefile


*** ../vim-9.0.1629/Makefile2023-06-13 22:44:53.538988256 +0100
--- Makefile2023-06-14 15:01:21.505716821 +0100
***
*** 46,55 
fi
@# When the target is "clean" also clean for the indent and syntax 
tests.
@if test "$@" = "clean" -o "$@" = "distclean" -o "$@" = "testclean"; 
then \
!   cd runtime/indent && \
!   $(MAKE) clean; \
!   cd runtime/syntax && \
!   $(MAKE) clean; \
fi
  
  # Executable used for running the indent tests.
--- 46,53 
fi
@# When the target is "clean" also clean for the indent and syntax 
tests.
@if test "$@" = "clean" -o "$@" = "distclean" -o "$@" = "testclean"; 
then \
!   (cd runtime/indent && $(MAKE) clean); \
!   (cd runtime/syntax && $(MAKE) clean); \
fi
  
  # Executable used for running the indent tests.
*** ../vim-9.0.1629/src/version.c   2023-06-14 13:10:09.803148193 +0100
--- src/version.c   2023-06-14 15:07:10.190914026 +0100
***
*** 697,698 ****
--- 697,700 
  {   /* Add new patch number below this line */
+ /**/
+ 1630,
  /**/

-- 
"Hit any key to continue" it said, but nothing happened after F sharp.

 /// Bram Moolenaar -- b...@moolenaar.net -- 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 vim_dev+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/vim_dev/20230614141029.C53CD1C0CE4%40moolenaar.net.


Patch 9.0.1629

2023-06-14 Fir de Conversatie Bram Moolenaar
f16idx(str, 4, v:false, v:true))
call assert_equal(-1, utf16idx(str, 5, v:false, v:true))
*** ../vim-9.0.1628/src/version.c   2023-06-13 22:44:53.538988256 +0100
--- src/version.c   2023-06-14 13:07:03.310895989 +0100
***
*** 697,698 
--- 697,700 
  {   /* Add new patch number below this line */
+ /**/
+     1629,
  /**/

-- 
"Hit any key to continue" does _not_ mean you can hit the on/off button!

 /// Bram Moolenaar -- b...@moolenaar.net -- 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 vim_dev+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/vim_dev/20230614121108.D7CEA1C0CE4%40moolenaar.net.


Patch 9.0.1628

2023-06-13 Fir de Conversatie Bram Moolenaar


Patch 9.0.1628
Problem:Syntax tests fail on FreeBSD.
Solution:   Pass the Vim executable path with VIMPROG. (Ken Takata,
closes #12535)  Adjust the paths.
Files:  Makefile, runtime/syntax/Makefile


*** ../vim-9.0.1627/Makefile2023-06-11 19:03:38.581053236 +0100
--- Makefile2023-06-13 22:18:05.490488690 +0100
***
*** 66,72 
  syntaxtest:
cd runtime/syntax && \
$(MAKE) clean && \
!   $(MAKE) test VIM="$(VIM_FOR_SYNTAXTEST)"
  
  
  #
--- 66,72 
  syntaxtest:
cd runtime/syntax && \
$(MAKE) clean && \
!   $(MAKE) test VIMPROG="$(VIM_FOR_SYNTAXTEST)"
  
  
  #
*** ../vim-9.0.1627/runtime/syntax/Makefile 2023-06-11 19:03:38.581053236 
+0100
--- runtime/syntax/Makefile 2023-06-13 22:41:57.311328346 +0100
***
*** 11,24 
  
  # ENVVARS = LC_ALL=C LANG=C LANGUAGE=C
  
! RUN_VIMTEST = VIMRUNTIME=$(VIMRUNTIME) $(VALGRIND) $(ENVVARS) $(VIMPROG) -f 
$(GUI_FLAG)
  
  # Run the tests that didn't run yet or failed previously.
  # If a test succeeds a testdir/done/{name} file will be written.
  # If a test fails a testdir/failed/{name}.dump file will be written.
  test:
@# the "vimcmd" file is used by the screendump utils
!   @echo "$(VIMPROG)" > testdir/vimcmd
@echo "$(RUN_VIMTEST)" >> testdir/vimcmd
VIMRUNTIME=$(VIMRUNTIME) $(VIMPROG) --clean --not-a-term -u 
testdir/runtest.vim
  
--- 11,24 
  
  # ENVVARS = LC_ALL=C LANG=C LANGUAGE=C
  
! RUN_VIMTEST = VIMRUNTIME=$(VIMRUNTIME) $(VALGRIND) $(ENVVARS) ../$(VIMPROG) 
-f $(GUI_FLAG)
  
  # Run the tests that didn't run yet or failed previously.
  # If a test succeeds a testdir/done/{name} file will be written.
  # If a test fails a testdir/failed/{name}.dump file will be written.
  test:
@# the "vimcmd" file is used by the screendump utils
!   @echo "../$(VIMPROG)" > testdir/vimcmd
@echo "$(RUN_VIMTEST)" >> testdir/vimcmd
VIMRUNTIME=$(VIMRUNTIME) $(VIMPROG) --clean --not-a-term -u 
testdir/runtest.vim
  
*** ../vim-9.0.1627/src/version.c   2023-06-11 19:03:38.581053236 +0100
--- src/version.c   2023-06-13 22:19:10.446307036 +0100
***
*** 697,698 
--- 697,700 
  {   /* Add new patch number below this line */
+ /**/
+     1628,
  /**/

-- 
You're as much use as a condom machine at the Vatican.
  -- Rimmer to Holly in Red Dwarf 'Queeg'

 /// Bram Moolenaar -- b...@moolenaar.net -- 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 vim_dev+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/vim_dev/20230613214733.1BEFC1C0D4E%40moolenaar.net.


Re: maps can't access class instance variable 'this'

2023-06-12 Fir de Conversatie Bram Moolenaar


> As the subject says, if I create a class that ultimately defines a mapping
> when a new instance is created, unfortunately the mapping can't access the
> "this" variable of the instance.
> 
> Is there a way to do this I'm not seeing in the documentation?

You probably need to use a closure.  That is the only way you can bind a
variable and pass the reference around.  You can find hints around
":help E1271".

Keep in mind that mappings work in the global namespace.  To access
something local to the script you can use  or .
You may first give  a try.

-- 
hundred-and-one symptoms of being an internet addict:
158. You get a tuner card so you can watch TV while surfing.

 /// Bram Moolenaar -- b...@moolenaar.net -- 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 vim_dev+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/vim_dev/20230612201811.5D3C01C0804%40moolenaar.net.


Patch 9.0.1627

2023-06-11 Fir de Conversatie Bram Moolenaar
 Current directory must be runtime/syntax.
+ 
+ " Only do this with the +eval feature
+ if 1
+ 
+ let cwd = getcwd()
+ if cwd !~ '[/\\]runtime[/\\]syntax\>'
+   echoerr 'Current directory must be "runtime/syntax"'
+   qall
+ endif
+ if !isdirectory('testdir')
+   echoerr '"testdir" directory not found'
+   qall
+ endif
+ 
+ " Use the script for source code screendump testing.  It sources other 
scripts,
+ " therefore we must "cd" there.
+ cd ../../src/testdir
+ source screendump.vim
+ exe 'cd ' .. fnameescape(cwd)
+ 
+ " For these tests we need to be able to run terminal Vim with 256 colors.  On
+ " MS-Windows the console only has 16 colors and the GUI can't run in a
+ " terminal.
+ if !CanRunVimInTerminal()
+   echomsg 'Cannot make screendumps, aborting'
+   qall
+ endif
+ 
+ cd testdir
+ if !isdirectory('done')
+   call mkdir('done')
+ endif
+ 
+ set nocp
+ set nowrapscan
+ set report=
+ set modeline
+ set debug=throw
+ set nomore
+ 
+ au! SwapExists * call HandleSwapExists()
+ func HandleSwapExists()
+   " Ignore finding a swap file for the test input, the user might be editing
+   " it and that's OK.
+   if expand('') =~ 'input[/\\].*\..*'
+ let v:swapchoice = 'e'
+   endif
+ endfunc
+ 
+ 
+ let failed_count = 0
+ for fname in glob('input/*.*', 1, 1)
+   if fname =~ '\~$'
+ " backup file, skip
+ continue
+   endif
+ 
+   let linecount = readfile(fname)->len()
+   let root = substitute(fname, 'input[/\\]\(.*\)\..*', '\1', '')
+ 
+   " Execute the test if the "done" file does not exist of when the input file
+   " is newer.
+   let in_time = getftime(fname)
+   let out_time = getftime('done/' .. root)
+   if out_time < 0 || in_time > out_time
+ for dumpname in glob('failed/' .. root .. '_\d*\.dump', 1, 1)
+   call delete(dumpname)
+ endfor
+ call delete('done/' .. root)
+ 
+ let lines =<< trim END
+   syntax on
+ END
+ call writefile(lines, 'Xtestscript')
+ let buf = RunVimInTerminal('-S Xtestscript ' .. fname, {})
+ 
+ " Screendump at the start of the file: root_00.dump
+ let fail = VerifyScreenDump(buf, root .. '_00', {})
+ 
+ " Make a Screendump every 18 lines of the file: root_NN.dump
+ let topline = 1
+ let nr = 1
+     while linecount - topline > 20
+   let topline += 18
+   call term_sendkeys(buf, printf("%dGzt", topline))
+   let fail += VerifyScreenDump(buf, root .. printf('_%02d', nr), {})
+   let nr += 1
+ endwhile
+ 
+ " Screendump at the end of the file: root_99.dump
+ call term_sendkeys(buf, 'Gzb')
+ let fail += VerifyScreenDump(buf, root .. '_99', {})
+ 
+ call StopVimInTerminal(buf)
+ call delete('Xtestscript')
+ 
+ if fail == 0
+   call writefile(['OK'], 'done/' . root)
+   echo "Test " . root . " OK\n"
+ else
+   let failed_count += 1
+ endif
+   endif
+ endfor
+ 
+ " Matching "if 1" at the start.
+ endif
+ 
+ if failed_count > 0
+   " have make report an error
+   cquit
+ endif
+ qall!
*** ../vim-9.0.1626/runtime/syntax/testdir/input/c.c1970-01-01 
00:00:00.0 +
--- runtime/syntax/testdir/input/c.c2023-06-10 23:45:32.100588238 +0100
***
*** 0 
--- 1,122 
+ /* vi:set ts=8 sts=4 sw=4 noet:
+  *
+  * VIM - Vi IMproved  by Bram Moolenaar
+  *
+  * Do ":help uganda"  in Vim to read copying and usage conditions.
+  * Do ":help credits" in Vim to see a list of people who contributed.
+  * See README.txt for an overview of the Vim source code.
+  */
+ 
+ #define EXTERN
+ #include "vim.h"
+ 
+ #ifdef __CYGWIN__
+ # include 
+ # include   // for cygwin_conv_to_posix_path() and/or
+   // cygwin_conv_path()
+ # include 
+ #endif
+ 
+ #if defined(MSWIN) && (!defined(FEAT_GUI_MSWIN) || defined(VIMDLL))
+ # include "iscygpty.h"
+ #endif
+ 
+ // Values for edit_type.
+ #define EDIT_NONE   0 // no edit type yet
+ #define EDIT_FILE   1 // file name argument[s] given, use argument list
+ #define EDIT_STDIN  2 // read file from stdin
+ #define EDIT_TAG3 // tag name argument given, use tagname
+ #define EDIT_QF   4   // start in quickfix mode
+ 
+ #if (defined(UNIX) || defined(VMS)) && !defined(NO_VIM_MAIN)
+ static int file_owned(char *fname);
+ #endif
+ static void mainerr(int, char_u *);
+ static void early_arg_scan(mparm_T *parmp);
+ #ifndef NO_VIM_MAIN
+ static void usage(void);
+ static void parse_command_name(mparm_T *parmp);
+ static voi

Patch 9.0.1626

2023-06-10 Fir de Conversatie Bram Moolenaar


Patch 9.0.1626
Problem:Visual area not shown when using 'showbreak' and start of line is
not visible. (Jaehwang Jung)
Solution:   Adjust "fromcol" for the space taken by 'showbreak'.
(closes #12514)
Files:  src/drawline.c, src/testdir/test_highlight.vim,
src/testdir/dumps/Test_visual_sbr_1.dump


*** ../vim-9.0.1625/src/drawline.c  2023-06-04 18:46:25.158494677 +0100
--- src/drawline.c  2023-06-10 19:39:17.117383542 +0100
***
*** 569,574 
--- 569,579 
if (wp->w_skipcol == 0 || wlv->startrow != 0 || !wp->w_p_wrap)
wlv->need_showbreak = FALSE;
wlv->vcol_sbr = wlv->vcol + MB_CHARLEN(sbr);
+ 
+   // Correct start of highlighted area for 'showbreak'.
+   if (wlv->fromcol >= wlv->vcol && wlv->fromcol < wlv->vcol_sbr)
+   wlv->fromcol = wlv->vcol_sbr;
+ 
// Correct end of highlighted area for 'showbreak',
// required when 'linebreak' is also set.
if (wlv->tocol == wlv->vcol)
***
*** 829,835 
  
if (wp->w_p_nu && wp->w_p_rnu)
// Do not overwrite the line number, change "123 text" to
!   // "123>>>xt".
while (skip < wp->w_width && VIM_ISDIGIT(ScreenLines[off]))
{
++off;
--- 834,840 
  
if (wp->w_p_nu && wp->w_p_rnu)
// Do not overwrite the line number, change "123 text" to
!   // "123<<w_width && VIM_ISDIGIT(ScreenLines[off]))
{
++off;
*** ../vim-9.0.1625/src/testdir/test_highlight.vim  2023-03-04 
19:57:28.342671183 +
--- src/testdir/test_highlight.vim  2023-06-10 19:35:52.218212318 +0100
***
*** 753,758 
--- 753,778 
call StopVimInTerminal(buf)
  endfunc
  
+ func Test_visual_sbr()
+   CheckScreendump
+ 
+   " check Visual highlight when 'showbreak' is set
+   let lines =<< trim END
+   set showbreak=>
+   call setline(1, 'Lorem ipsum dolor sit amet, consetetur sadipscing 
elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna 
aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores 
et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum 
dolor sit amet.')
+   exe "normal! z1\"
+   END
+   call writefile(lines, 'Xtest_visual_sbr', 'D')
+   let buf = RunVimInTerminal('-S Xtest_visual_sbr', {'rows': 6,'columns': 60})
+ 
+   call term_sendkeys(buf, "v$")
+   call VerifyScreenDump(buf, 'Test_visual_sbr_1', {})
+ 
+   " clean up
+   call term_sendkeys(buf, "\")
+   call StopVimInTerminal(buf)
+ endfunc
+ 
  " This test must come before the Test_cursorline test, as it appears this
  " defines the Normal highlighting group anyway.
  func Test_1_highlight_Normalgroup_exists()
*** ../vim-9.0.1625/src/testdir/dumps/Test_visual_sbr_1.dump2023-06-10 
19:39:56.713239842 +0100
--- src/testdir/dumps/Test_visual_sbr_1.dump2023-06-10 19:37:27.509807290 
+0100
***
*** 0 
--- 1,6 
+ |>+0#4040ff13#ff0| +0#000#e0e0e08|k|a|s|d| |g|u|b|e|r|g|r|e|n|,| 
|n|o| |s|e|a| |t|a|k|i|m|a|t|a| |s|a|n|c|t|u|s| |e|s|t| |L|o|r|e|m| |i|p|s|u|m| 
|d|o|l|o|r| |s|i|t| |a|m|e|t|.> +0&#ff0@1
+ @75
+ @75
+ @75
+ @75
+ |-+2&&@1| |V|I|S|U|A|L| |-@1| +0&&@34|2|9|6| @6|1|,|2|9|6|-|2|9@1| @4|A|l@1| 
*** ../vim-9.0.1625/src/version.c   2023-06-10 19:00:08.457416167 +0100
--- src/version.c   2023-06-10 19:31:29.191571628 +0100
***
*** 697,698 
--- 697,700 
  {   /* Add new patch number below this line */
+ /**/
+ 1626,
  /**/

-- 
We are the Borg of GNU GPL.  We will assimilate your source code.
Resistance is futile.

 /// Bram Moolenaar -- b...@moolenaar.net -- 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 vim_dev+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/vim_dev/20230610184108.995081C0642%40moolenaar.net.


Patch 9.0.1625

2023-06-10 Fir de Conversatie Bram Moolenaar


Patch 9.0.1625
Problem:"super" is not considered a reserved name.
Solution:   Add "super" to the list of reserved names. (closes #12515)
Files:  src/vim9script.c, src/userfunc.c, src/testdir/test_vim9_assign.vim


*** ../vim-9.0.1624/src/vim9script.c2023-05-19 19:01:13.292413300 +0100
--- src/vim9script.c2023-06-10 18:33:48.000962592 +0100
***
*** 1122,1127 
--- 1122,1128 
  "null_string",
  "null_channel",
  "null_job",
+ "super",
  "this",
  NULL
  };
*** ../vim-9.0.1624/src/userfunc.c  2023-06-10 16:45:09.402610453 +0100
--- src/userfunc.c  2023-06-10 18:48:08.562316245 +0100
***
*** 86,97 
return arg;
  }
  
! // Vim9 script: cannot use script var name for argument. In function: also
! // check local vars and arguments.
! if (!skip && argtypes != NULL && check_defined(arg, p - arg,
!  evalarg == NULL ? NULL : evalarg->eval_cctx,
   eap == NULL ? NULL : eap->cstack, TRUE) == FAIL)
!   return arg;
  
  if (newargs != NULL && ga_grow(newargs, 1) == FAIL)
return arg;
--- 86,108 
return arg;
  }
  
! // Extra checks in Vim9 script.
! if (!skip && argtypes != NULL)
! {
!   int c = *p;
!   *p = NUL;
!   int r = check_reserved_name(arg, FALSE);
!   *p = c;
!   if (r == FAIL)
!   return arg;
! 
!   // Cannot use script var name for argument. In function: also check
!   // local vars and arguments.
!   if (check_defined(arg, p - arg,
!  evalarg == NULL ? NULL : evalarg->eval_cctx,
   eap == NULL ? NULL : eap->cstack, TRUE) == FAIL)
!   return arg;
! }
  
  if (newargs != NULL && ga_grow(newargs, 1) == FAIL)
return arg;
*** ../vim-9.0.1624/src/testdir/test_vim9_assign.vim2023-05-02 
16:25:35.630819728 +0100
--- src/testdir/test_vim9_assign.vim2023-06-10 18:39:54.879665033 +0100
***
*** 311,316 
--- 311,318 
  
for name in ['true',
 'false',
+'this',
+'super',
 'null',
 'null_blob',
 'null_dict',
***
*** 322,327 
--- 324,338 
  v9.CheckDefExecAndScriptFailure(['var ' .. name .. ' =  0'], 'E1034:')
  v9.CheckDefExecAndScriptFailure(['var ' .. name .. ': bool'], 'E1034:')
endfor
+ 
+   var lines =<< trim END
+   vim9script
+   def Foo(super: bool)
+   echo 'something'
+   enddef
+   defcompile
+   END
+   v9.CheckScriptFailure(lines, 'E1034:')
  enddef
  
  def Test_null_values()
***
*** 1526,1531 
--- 1537,1543 
v9.CheckDefFailure(['var false = 1'], 'E1034:')
v9.CheckDefFailure(['var null = 1'], 'E1034:')
v9.CheckDefFailure(['var this = 1'], 'E1034:')
+   v9.CheckDefFailure(['var super = 1'], 'E1034:')
  
v9.CheckDefFailure(['[a; b; c] = g:list'], 'E1001:')
v9.CheckDefFailure(['var [a; b; c] = g:list'], 'E1080:')
*** ../vim-9.0.1624/src/version.c   2023-06-10 16:45:09.406610435 +0100
--- src/version.c   2023-06-10 18:57:51.932860075 +0100
***
*** 697,698 
--- 697,700 
  {   /* Add new patch number below this line */
+ /**/
+ 1625,
  /**/

-- 
hundred-and-one symptoms of being an internet addict:
146. You experience ACTUAL physical withdrawal symptoms when away
 from your 'puter and the net.

 /// Bram Moolenaar -- b...@moolenaar.net -- 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 vim_dev+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/vim_dev/20230610180040.1B6BF1C0792%40moolenaar.net.


Patch 9.0.1624

2023-06-10 Fir de Conversatie Bram Moolenaar
***
*** 697,698 
--- 697,700 
  {   /* Add new patch number below this line */
+ /**/
+     1624,
  /**/

-- 
hundred-and-one symptoms of being an internet addict:
144. You eagerly await the update of the "Cool Site of the Day."

 /// Bram Moolenaar -- b...@moolenaar.net -- 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 vim_dev+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/vim_dev/20230610154542.C48EC1C0642%40moolenaar.net.


Re: LSP: cursor positioning on a multi-byte character with composing characters

2023-06-10 Fir de Conversatie Bram Moolenaar


Yegappan wrote:

> > > I am updating the Vim9 LSP plugin to support various position
> > > encodings (utf-8, utf-16 and utf-32).
> > > I ran into a problem with positioning the cursor on a multibyte
> > > character with composing characters.
> > >
> > > The LSP plugin uses the Vim function setcursorcharpos() to position
> > > the cursor.  This function ignores composing characters. The LSP
> > > server counts the composing characters separately from
> > > the base character.  So when using the character index returned by the
> > > LSP server to
> > > position the cursor, the cursor is placed in an incorrect column.
> > >
> > > e.g:
> > >
> > > void fn(int aVar)
> > > {
> > > printf("aVar = %d\n", aVar);
> > > printf("𐐟˜Š𐐟˜Š𐐟˜Š𐐟˜Š = %d\n", aVar);
> > > printf("áb́áb́ = %d\n", aVar);
> > > printf("ą́ą́ą́ą́ = %d\n", aVar);
> > > }
> > >
> > > I have tried this test with clangd, pyright and gopls language servers
> > > and all of them count the
> > > composing characters as separate characters.
> > >
> > > One approach to solve this issue is to add an optional argument to the
> > > setcursorcharpos() function
> > > that either counts or ignores composing characters. The default is to
> > > ignore the composing
> > > characters.  Another approach is to add a function that computes the
> > > character offset ignoring the composing characters from a character
> > > offset that includes the composing characters.
> > >
> > > Any suggestions?
> >
> > Whether to count composing characters separately or not applies to many
> > functions.  Adding a flag to each function to specify how composing
> > characters are to be handled is going to require a lot of changes.  And
> > even for setcursorcharpos() I don't see a good way to add this flag.
> >
> > Assuming we have the text, using a separate function to ignore composing
> > characters would be a separate step and a universal solution.  I suppose
> > it could be something like:
> >
> > idx_without = charpos_dropcomposing({text}, {idx_with})
> >
> > It may not be needed now, but the opposite should be possible:
> >
> > idx_with = charpos_addcomposing({text}, {idx_without})
> >
> > Hopefully we can think of better (shorter) names.
> >
> 
> I have created PR https://github.com/vim/vim/pull/12513 to add these
> two new functions.  Should we merge these two functions into a single
> function with an argument to specify whether to count or not count
> combining characters?

Thanks for working on this.  My main concern at first is that the user
will be confused by seeing three functions:

charidx({string}, {idx} [, {countcc} [, {utf16}]])
charidx_addcc({string}, {idx})
charidx_dropcc({string}, {idx})

Only when reading the details we can find out that the {idx} of
charidx() is a byte index, the other two are character indexes.
Changing the argument name to {byteidx} would help.  We may have to do
that for other functions as well, to keep consistency.

Having the {countcc} argument for charidx() and a separate function name
for the other two is confusing.  Also because "addcc" and "dropcc" can
be seen as an alternative for {countcc} (and that's not really
incorrect), but there is no hint that the {idx} argument is used
differently.

Alternatively there would be a function that does have the {countcc}
argument and the name indicating that {idx} is a character index:

charidx_XXX({string}, {idx}, {countcc})

However, is this {countcc} argument really doing the same thing?  The
help for charidx() says:

When {countcc} is omitted or |FALSE|, then composing characters
are not counted separately, their byte length is added to the
preceding base character.
When {countcc} is |TRUE|, then composing characters are
counted as separate characters.

We can't use exactly the same for charidx_XXX(), since the index is not
in bytes.  And using a character index, we would have to mention whether
composing characters are counted separately.  This gets confusing, an
argument {countcc} which actually means something else, depending on
whether you look at the input or the result.

It's probably better to use two separate functions.  I hope we find
better names though.

The help for the new functions should be extra clear, since it's easy to
misunderstand.  We can discuss that on the PR.

-- 
Drink wet cement and get really stoned.

 /// Bram Moolenaar -- b...@moolenaar

Patch 9.0.1623

2023-06-09 Fir de Conversatie Bram Moolenaar


Patch 9.0.1623
Problem:The program to filetype translation is not exported.
Solution:   Export Exe2filetype().
Files:  runtime/autoload/dist/ft.vim, runtime/autoload/dist/script.vim


*** ../vim-9.0.1622/runtime/autoload/dist/ft.vim2023-05-29 
19:59:38.217805411 +0100
--- runtime/autoload/dist/ft.vim2023-06-09 20:57:34.635375695 +0100
***
*** 3,9 
  # Vim functions for file type detection
  #
  # Maintainer: Bram Moolenaar 
! # Last Change:2022 Apr 13
  
  # These functions are moved here from runtime/filetype.vim to make startup
  # faster.
--- 3,9 
  # Vim functions for file type detection
  #
  # Maintainer: Bram Moolenaar 
! # Last Change:2023 Jun 09
  
  # These functions are moved here from runtime/filetype.vim to make startup
  # faster.
***
*** 362,369 
else
  # recognize Prolog by specific text in the first non-empty line
  # require a blank after the '%' because Perl uses "%list" and "%translate"
! var l = getline(nextnonblank(1))
! if l =~ '\' || l =~ '^\s*\(%\+\(\s\|$\)\|/\*\)' || l =~ ':-'
setf prolog
  else
exe 'setf ' .. default
--- 362,369 
else
  # recognize Prolog by specific text in the first non-empty line
  # require a blank after the '%' because Perl uses "%list" and "%translate"
! var lnum = getline(nextnonblank(1))
! if lnum =~ '\' || lnum =~ '^\s*\(%\+\(\s\|$\)\|/\*\)' || lnum =~ 
':-'
setf prolog
  else
exe 'setf ' .. default
***
*** 472,483 
  def IsLProlog(): bool
# skip apparent comments and blank lines, what looks like
# LambdaProlog comment may be RAPID header
!   var l: number = nextnonblank(1)
!   while l > 0 && l < line('$') && getline(l) =~ '^\s*%' # LambdaProlog comment
! l = nextnonblank(l + 1)
endwhile
# this pattern must not catch a go.mod file
!   return getline(l) =~ '\ 0 && lnum < line('$') && getline(lnum) =~ '^\s*%' # 
LambdaProlog comment
! lnum = nextnonblank(lnum + 1)
endwhile
# this pattern must not catch a go.mod file
!   return getline(lnum) =~ '\' || l =~ '^\s*\(%\+\(\s\|$\)\|/\*\)' || l =~ ':-'
setf prolog
  else
setf perl
--- 504,511 
else
  # recognize Prolog by specific text in the first non-empty line
  # require a blank after the '%' because Perl uses "%list" and "%translate"
! var line = getline(nextnonblank(1))
! if line =~ '\' || line =~ '^\s*\(%\+\(\s\|$\)\|/\*\)' || line =~ 
':-'
setf prolog
  else
setf perl
***
*** 678,703 
  enddef
  
  # Called from filetype.vim and scripts.vim.
! export def SetFileTypeSH(name: string)
!   if did_filetype()
  # Filetype was already detected
! return
endif
!   if expand("") =~ g:ft_ignore_pat
! return
endif
if name =~ '\'
  # Some .sh scripts contain #!/bin/csh.
! SetFileTypeShell("csh")
! return
elseif name =~ '\'
  # Some .sh scripts contain #!/bin/tcsh.
! SetFileTypeShell("tcsh")
! return
elseif name =~ '\'
  # Some .sh scripts contain #!/bin/zsh.
! SetFileTypeShell("zsh")
! return
elseif name =~ '\'
  b:is_kornshell = 1
  if exists("b:is_bash")
--- 678,701 
  enddef
  
  # Called from filetype.vim and scripts.vim.
! # When "setft" is passed and false then the 'filetype' option is not set.
! export def SetFileTypeSH(name: string, setft = true): string
!   if setft && did_filetype()
  # Filetype was already detected
! return ''
endif
!   if setft && expand("") =~ g:ft_ignore_pat
! return ''
endif
if name =~ '\'
  # Some .sh scripts contain #!/bin/csh.
! return SetFileTypeShell("csh", setft)
elseif name =~ '\'
  # Some .sh scripts contain #!/bin/tcsh.
! return SetFileTypeShell("tcsh", setft)
elseif name =~ '\'
  # Some .sh scripts contain #!/bin/zsh.
! return SetFileTypeShell("zsh", setft)
elseif name =~ '\'
  b:is_kornshell = 1
  if exists("b:is_bash")
***
*** 724,757 
unlet b:is_bash
  endif
endif
!   SetFileTypeShell("sh")
  enddef
  
  # For shell-like file types, check for an "exec" command hidden in a comment,
  # as used for Tcl.
  # Also called from scripts.vim, thus can't be local to this script.
! export def SetFileTypeShell(name: string)
!   if did_filetype()
  

Patch 9.0.1622

2023-06-09 Fir de Conversatie Bram Moolenaar


Patch 9.0.1622
Problem:Filetype name t32 is a bit obscure.
Solution:   Rename t32 to trace32. (Christoph Sax, closes #12512)
Files:  runtime/filetype.vim, src/testdir/test_filetype.vim


*** ../vim-9.0.1621/runtime/filetype.vim2023-06-08 17:57:15.121742166 
+0100
--- runtime/filetype.vim2023-06-09 19:17:17.431275400 +0100
***
*** 2235,2241 
  au BufNewFile,BufRead *.tpp   setf tpp
  
  " TRACE32 Script Language
! au BufNewFile,BufRead *.cmm,*.t32 setf t32
  
  " Treetop
  au BufRead,BufNewFile *.treetop   setf treetop
--- 2235,2241 
  au BufNewFile,BufRead *.tpp   setf tpp
  
  " TRACE32 Script Language
! au BufNewFile,BufRead *.cmm,*.t32 setf trace32
  
  " Treetop
  au BufRead,BufNewFile *.treetop   setf treetop
*** ../vim-9.0.1621/src/testdir/test_filetype.vim   2023-06-08 
21:26:14.589704404 +0100
--- src/testdir/test_filetype.vim   2023-06-09 19:17:30.827270459 +0100
***
*** 662,668 
'any/etc/systemd/system/file.d/.#-file',
'any/etc/systemd/system/file.d/file.conf'],
  systemverilog: ['file.sv', 'file.svh'],
! t32: ['file.cmm', 'file.t32'],
  tags: ['tags'],
  tak: ['file.tak'],
  tal: ['file.tal'],
--- 662,668 
'any/etc/systemd/system/file.d/.#-file',
'any/etc/systemd/system/file.d/file.conf'],
  systemverilog: ['file.sv', 'file.svh'],
! trace32: ['file.cmm', 'file.t32'],
  tags: ['tags'],
  tak: ['file.tak'],
  tal: ['file.tal'],
*** ../vim-9.0.1621/src/version.c   2023-06-08 22:16:19.688379704 +0100
--- src/version.c   2023-06-09 19:19:20.295230054 +0100
***
*** 697,698 
--- 697,700 
  {   /* Add new patch number below this line */
+ /**/
+ 1622,
  /**/

-- 
I wish there was a knob on the TV to turn up the intelligence.
There's a knob called "brightness", but it doesn't seem to work. 

 /// Bram Moolenaar -- b...@moolenaar.net -- 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 vim_dev+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/vim_dev/20230609182036.F1ACC1C0642%40moolenaar.net.


Patch 9.0.1621

2023-06-08 Fir de Conversatie Bram Moolenaar
c/os_unix.h   2023-06-08 22:12:46.304254136 +0100
***
*** 216,239 
  #ifndef DFLT_HELPFILE
  # define DFLT_HELPFILE"$VIMRUNTIME/doc/help.txt"
  #endif
- #ifndef FILETYPE_FILE
- # define FILETYPE_FILE"filetype.vim"
- #endif
- #ifndef FTPLUGIN_FILE
- # define FTPLUGIN_FILE"ftplugin.vim"
- #endif
- #ifndef INDENT_FILE
- # define INDENT_FILE  "indent.vim"
- #endif
- #ifndef FTOFF_FILE
- # define FTOFF_FILE   "ftoff.vim"
- #endif
- #ifndef FTPLUGOF_FILE
- # define FTPLUGOF_FILE"ftplugof.vim"
- #endif
- #ifndef INDOFF_FILE
- # define INDOFF_FILE  "indoff.vim"
- #endif
  #ifndef SYS_MENU_FILE
  # define SYS_MENU_FILE"$VIMRUNTIME/menu.vim"
  #endif
--- 216,221 
*** ../vim-9.0.1620/src/version.c   2023-06-08 21:26:14.589704404 +0100
--- src/version.c   2023-06-08 22:15:13.276345568 +0100
***
*** 697,698 
--- 697,700 
  {   /* Add new patch number below this line */
+ /**/
+ 1621,
  /**/

-- 
The coffee just wasn't strong enough to defend itself -- Tom Waits

 /// Bram Moolenaar -- b...@moolenaar.net -- 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 vim_dev+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/vim_dev/20230608211652.B7A801C0642%40moolenaar.net.


Patch 9.0.1620

2023-06-08 Fir de Conversatie Bram Moolenaar


Patch 9.0.1620
Problem:Nix files are not recognized from the hashbang line.
Solution:   Add a hashbang check. (issue #12507)
Files:  runtime/autoload/dist/script.vim, src/testdir/test_filetype.vim


*** ../vim-9.0.1619/runtime/autoload/dist/script.vim2023-05-06 
21:21:48.400778151 +0100
--- runtime/autoload/dist/script.vim2023-06-08 21:20:35.192369941 +0100
***
*** 4,10 
  # Invoked from "scripts.vim" in 'runtimepath'
  #
  # Maintainer: Bram Moolenaar 
! # Last Change:2022 Feb 13
  
  export def DetectFiletype()
var line1 = getline(1)
--- 4,10 
  # Invoked from "scripts.vim" in 'runtimepath'
  #
  # Maintainer: Bram Moolenaar 
! # Last Change:2023 Jun 08
  
  export def DetectFiletype()
var line1 = getline(1)
***
*** 44,50 
elseif line1 =~ '^#!\s*[^/\\ ]*\>\([^/\\]\|$\)'
  name = substitute(line1, '^#!\s*\([^/\\ ]*\>\).*', '\1', '')
else
! name = substitute(line1, '^#!\s*\S*[/\\]\(\i\+\).*', '\1', '')
endif
  
# tcl scripts may have #!/bin/sh in the first line and "exec wish" in the
--- 44,50 
elseif line1 =~ '^#!\s*[^/\\ ]*\>\([^/\\]\|$\)'
  name = substitute(line1, '^#!\s*\([^/\\ ]*\>\).*', '\1', '')
else
! name = substitute(line1, '^#!\s*\S*[/\\]\(\f\+\).*', '\1', '')
endif
  
# tcl scripts may have #!/bin/sh in the first line and "exec wish" in the
***
*** 197,202 
--- 197,206 
elseif name =~ 'guile'
  setl ft=scheme
  
+ # Nix
+   elseif name =~ 'nix-shell'
+ setl ft=nix
+ 
endif
  enddef
  
*** ../vim-9.0.1619/src/testdir/test_filetype.vim   2023-06-08 
17:57:15.121742166 +0100
--- src/testdir/test_filetype.vim   2023-06-08 19:53:00.474048870 +0100
***
*** 852,857 
--- 852,858 
  expect: [['#!/path/expect']],
  gnuplot: [['#!/path/gnuplot']],
  make:   [['#!/path/make']],
+ nix:[['#!/path/nix-shell']],
  pike:   [['#!/path/pike'],
  ['#!/path/pike0'],
  ['#!/path/pike9']],
***
*** 902,907 
--- 903,909 
  scheme: [['#!/usr/bin/env VAR=val --ignore-environment scheme']],
  python: [['#!/usr/bin/env VAR=val -S python -w -T']],
  wml: [['#!/usr/bin/env VAR=val --split-string wml']],
+ nix: [['#!/usr/bin/env nix-shell']],
}
  enddef
  
*** ../vim-9.0.1619/src/version.c   2023-06-08 18:43:55.771781364 +0100
--- src/version.c   2023-06-08 19:39:04.062799054 +0100
***
*** 697,698 
--- 697,700 
  {   /* Add new patch number below this line */
+ /**/
+ 1620,
  /**/

-- 
hundred-and-one symptoms of being an internet addict:
136. You decide to stay in a low-paying job teaching just for the
 free Internet access.

 /// Bram Moolenaar -- b...@moolenaar.net -- 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 vim_dev+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/vim_dev/20230608202745.992FD1C0642%40moolenaar.net.


Re: [vim/vim] Vim receives ^[[O and ^[[I when FocusLost and FocusGained respectively in alacritty terminal emulator when mouse=a is set (Issue #12499)

2023-06-08 Fir de Conversatie Bram Moolenaar


> Note that XTerm defines mode ?1004 as ["Send FocusIn/FocusOut 
> events"](https://invisible-island.net/xterm/ctlseqs/ctlseqs.html#h4-Functions-using-CSI-_-ordered-by-the-final-character-lparen-s-rparen:CSI-?-Pm-h:Ps-=-1-0-0-4.1F7C
> ). And if you follow the 
> [FocusIn/FocusOut](https://invisible-island.net/xterm/ctlseqs/ctlseqs.html#h3-FocusIn_FocusOut)
>  link, you'll see "it causes xterm to send CSI I when the terminal gains 
> focus, and CSI O when it loses focus."
> 
> So those codes are literally part of the definition for mode ?1004 -
> terminals don't have any other option if they're claiming to support
> that mode.

Terminals may follow what xterm is doing here, or they can decide
otherwise, for whatever reason.  There have been discussions in the past
between terminal emulator maintainers that ended up in doing something
else.  These discussions often put the personal opinion of a maintainer
above the interest of the users.  The lack of a recognized authority
also plays a role.  The disappointing result is that I have a lot of
trouble making Vim work properly with all terminals.  It will take time.

-- 
hundred-and-one symptoms of being an internet addict:
134. You consider bandwidth to be more important than carats.

 /// Bram Moolenaar -- b...@moolenaar.net -- 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 vim_dev+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/vim_dev/20230608191731.B2C5B1C0100%40moolenaar.net.


Patch 9.0.1619

2023-06-08 Fir de Conversatie Bram Moolenaar


Patch 9.0.1619
Problem:The focus gained/lost escape sequences cause trouble for a
terminal where Vim does not expect them.
Solution:   Always recognize the codes for focus gained/lost. (closes #12499)
Files:  src/term.c


*** ../vim-9.0.1618/src/term.c  2023-02-23 13:53:58.247215042 +
--- src/term.c  2023-06-08 18:41:06.107980777 +0100
***
*** 2221,2227 
  // We hard-code the received escape sequences here.  There are the 
terminfo
  // entries kxIN and kxOUT, but they are rarely used and do hot have a
  // two-letter termcap name.
! if (use_xterm_like_mouse(term))
  {
char_u name[3];
  
--- 2221,2229 
  // We hard-code the received escape sequences here.  There are the 
terminfo
  // entries kxIN and kxOUT, but they are rarely used and do hot have a
  // two-letter termcap name.
! // This used to be done only for xterm-like terminals, but some others 
also
! // may produce these codes.  Always recognize them, as the chance of them
! // being used for something else is very small.
  {
char_u name[3];
  
***
*** 6447,6453 
  # endif // !USE_ON_FLY_SCROLL
  #endif // FEAT_GUI
  
! #if (defined(UNIX) || defined(VMS))
/*
 * Handle FocusIn/FocusOut event sequences reported by XTerm.
 * (CSI I/CSI O)
--- 6449,6455 
  # endif // !USE_ON_FLY_SCROLL
  #endif // FEAT_GUI
  
! #if defined(UNIX) || defined(VMS)
/*
 * Handle FocusIn/FocusOut event sequences reported by XTerm.
 * (CSI I/CSI O)
*** ../vim-9.0.1618/src/version.c   2023-06-08 17:57:15.125742171 +0100
--- src/version.c   2023-06-08 18:41:46.307934694 +0100
***
*** 697,698 
--- 697,700 
  {   /* Add new patch number below this line */
+ /**/
+ 1619,
  /**/

-- 
"The sun oozed over the horizon, shoved aside darkness, crept along the
greensward, and, with sickly fingers, pushed through the castle window,
revealing the pillaged princess, hand at throat, crown asunder, gaping
in frenzied horror at the sated, sodden amphibian lying beside her,
disbelieving the magnitude of the frog's deception, screaming madly,
"You lied!"
- Winner of the Bulwer-Lytton contest (San Jose State University),
  wherein one writes only the first line of a bad novel

 /// Bram Moolenaar -- b...@moolenaar.net -- 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 vim_dev+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/vim_dev/20230608174624.D6D721C0642%40moolenaar.net.


Patch 9.0.1618

2023-06-08 Fir de Conversatie Bram Moolenaar


Patch 9.0.1618
Problem:Trace32 files are not recognized.
Solution:   Add patterns for the t32 filetype. (Christoph Sax, closes #12505)
Files:  runtime/filetype.vim, src/testdir/test_filetype.vim


*** ../vim-9.0.1617/runtime/filetype.vim2023-06-07 18:26:58.025112415 
+0100
--- runtime/filetype.vim2023-06-08 17:54:31.393596868 +0100
***
*** 2234,2239 
--- 2234,2242 
  " TPP - Text Presentation Program
  au BufNewFile,BufRead *.tpp   setf tpp
  
+ " TRACE32 Script Language
+ au BufNewFile,BufRead *.cmm,*.t32 setf t32
+ 
  " Treetop
  au BufRead,BufNewFile *.treetop   setf treetop
  
*** ../vim-9.0.1617/src/testdir/test_filetype.vim   2023-06-07 
18:26:58.025112415 +0100
--- src/testdir/test_filetype.vim   2023-06-08 17:54:31.393596868 +0100
***
*** 662,667 
--- 662,668 
'any/etc/systemd/system/file.d/.#-file',
'any/etc/systemd/system/file.d/file.conf'],
  systemverilog: ['file.sv', 'file.svh'],
+ t32: ['file.cmm', 'file.t32'],
  tags: ['tags'],
  tak: ['file.tak'],
  tal: ['file.tal'],
*** ../vim-9.0.1617/src/version.c   2023-06-08 17:09:40.192768840 +0100
--- src/version.c   2023-06-08 17:56:08.233590580 +0100
***
*** 697,698 
--- 697,700 
  {   /* Add new patch number below this line */
+ /**/
+ 1618,
  /**/

-- 
Never eat yellow snow.

 /// Bram Moolenaar -- b...@moolenaar.net -- 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 vim_dev+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/vim_dev/20230608165756.331981C0642%40moolenaar.net.


Patch 9.0.1617

2023-06-08 Fir de Conversatie Bram Moolenaar
x27;])
v9.CheckDefAndScriptFailure(['charidx("a", 1, "")'], ['E1013: Argument 3: 
type mismatch, expected bool but got string', 'E1212: Bool required for 
argument 3'])
!   charidx('', 0)->assert_equal(-1)
charidx('', 1)->assert_equal(-1)
  enddef
  
--- 704,711 
v9.CheckDefAndScriptFailure(['charidx(0z10, 1)'], ['E1013: Argument 1: type 
mismatch, expected string but got blob', 'E1174: String required for argument 
1'])
v9.CheckDefAndScriptFailure(['charidx("a", "b")'], ['E1013: Argument 2: 
type mismatch, expected number but got string', 'E1210: Number required for 
argument 2'])
v9.CheckDefAndScriptFailure(['charidx("a", 1, "")'], ['E1013: Argument 3: 
type mismatch, expected bool but got string', 'E1212: Bool required for 
argument 3'])
!   v9.CheckDefAndScriptFailure(['charidx("a", 1, 0, "")'], ['E1013: Argument 
4: type mismatch, expected bool but got string', 'E1212: Bool required for 
argument 4'])
!   charidx('', 0)->assert_equal(0)
charidx('', 1)->assert_equal(-1)
  enddef
  
***
*** 4305,4310 
--- 4308,4321 
strtrans('')->assert_equal('')
  enddef
  
+ def Test_strutf16len()
+   v9.CheckDefAndScriptFailure(['strutf16len([])'], ['E1013: Argument 1: type 
mismatch, expected string but got list', 'E1174: String required for 
argument 1'])
+   v9.CheckDefAndScriptFailure(['strutf16len("a", "")'], ['E1013: Argument 2: 
type mismatch, expected bool but got string', 'E1212: Bool required for 
argument 2'])
+   ""->strutf16len()->assert_equal(0)
+   '-ą́-ą́'->strutf16len(true)->assert_equal(8)
+   '-ą́-ą́'->strutf16len(false)->assert_equal(4)
+ enddef
+ 
  def Test_strwidth()
v9.CheckDefAndScriptFailure(['strwidth(10)'], ['E1013: Argument 1: type 
mismatch, expected string but got number', 'E1174: String required for argument 
1'])
assert_equal(4, strwidth('abcd'))
***
*** 4727,4732 
--- 4738,4752 
v9.CheckDefFailure(['var l: list = uniq(["a", "b"])'], 'E1012: Type 
mismatch; expected list but got list')
  enddef
  
+ def Test_utf16idx()
+   v9.CheckDefAndScriptFailure(['utf16idx(0z10, 1)'], ['E1013: Argument 1: 
type mismatch, expected string but got blob', 'E1174: String required for 
argument 1'])
+   v9.CheckDefAndScriptFailure(['utf16idx("a", "b")'], ['E1013: Argument 2: 
type mismatch, expected number but got string', 'E1210: Number required for 
argument 2'])
+   v9.CheckDefAndScriptFailure(['utf16idx("a", 1, "")'], ['E1013: Argument 3: 
type mismatch, expected bool but got string', 'E1212: Bool required for 
argument 3'])
+   v9.CheckDefAndScriptFailure(['utf16idx("a", 1, 0, "")'], ['E1013: Argument 
4: type mismatch, expected bool but got string', 'E1212: Bool required for 
argument 4'])
+   utf16idx('', 0)->assert_equal(0)
+   utf16idx('', 1)->assert_equal(-1)
+ enddef
+ 
  def Test_uniq_const()
var lines =<< trim END
const l = [1, 2, 3, 4]
*** ../vim-9.0.1616/src/version.c   2023-06-07 19:09:52.536499675 +0100
--- src/version.c   2023-06-08 17:03:06.647411042 +0100
***
*** 697,698 
--- 697,700 
  {   /* Add new patch number below this line */
+ /**/
+ 1617,
  /**/

-- 
There are three kinds of persons: Those who can count and those who can't.

 /// Bram Moolenaar -- b...@moolenaar.net -- 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 vim_dev+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/vim_dev/20230608161024.74D221C0642%40moolenaar.net.



Re: Same number different colors for ctermbg and ctermfg

2023-06-08 Fir de Conversatie Bram Moolenaar


> On Wed, 24 May 2023 02:30:21 +0600
> Enan Ajmain <3nan.ajm...@gmail.com> wrote:
> > On Fri, 5 May 2023 22:18:07 +0600
> > Enan Ajmain <3nan.ajm...@gmail.com> wrote:
> > > On Fri, 05 May 2023 16:28:27 +0100
> > > Bram Moolenaar  wrote:
> > > > It's much more complicated than that.  E.g. search for
> > > > "cterm_ansi_idx" in src/term.c, this is used specifically for
> > > > MS-Windows.  Thus if you use an MS-Windows console and ssh to a
> > > > Linux system this mapping is missing and the colors are likely
> > > > messed up.
> > >
> > > Thanks.  Just a closing correction: the colors on
> > > vim-that-is-actually-on-Linux-but-using-over-ssh-in-Windows is NOT
> > > messed up. It shows perfectly. 'ctermfg=7' shows the proper color
> > > that's set in the terminal emulator. It's the native Vim on Windows
> > > that shows unexpected (or what I think is considered unexpected).
> > >
> > > But anyway, thanks.
> >
> > There has been a development:
> > https://github.com/microsoft/terminal/issues/15408
> 
> A comment from j4james (a collaborator for MS Terminal):
> 
> > If it were up to me, I'd dump their current win32 code, and replace it
> > with the whatever they're using on Linux, since that clearly already
> > works in Windows Terminal when vim is run from WSL. It's probably a
> > little more complicated than that, but there really should be no need
> > for them to be using this weird mix of legacy console APIs interspersed
> > with VT sequences.
> 
> This is not to put responsibility on Vim devs.  This is just to let the
> Windows users among Vim devs (Yegappan perhaps?  He picked up my half
> baked bugfix for 'shellcmdflag' for powershell last year and polished
> it for final merge) know that maybe we can use unix logic for win32 as
> well. Maybe. If someone wants to look into that.
> 
> (I'll investigate some and share my findings, but I know nothing about
> terminal stuff so can't say I'll be useful.)

The Vim code has quite a few assumptions about how things work on
MS-Windows.  The code to use a terminal is currently not included in the
MS-Windows build, only the GUI and console support is.  Also including
the terminal support should be possible, but it will be a bit of a
puzzle to adjust the #ifdef's to include the code and then to decide (at
runtime) which code is active.  We already have the VIMDLL macro, with
the gui.in_use flag, this would be an addition to that.

It should be doable, but it will be quite a bit of work to "get it
right".  We also need to keep in mind that this third way of using Vim
on MS-Windows can be expected to require maintenance for a long time,
thus it should not be a "quick hack".

-- 
Don't drink and drive.  You might hit a bump and spill your beer.

 /// Bram Moolenaar -- b...@moolenaar.net -- 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 vim_dev+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/vim_dev/20230608154601.3593C1C0642%40moolenaar.net.


Patch 9.0.1616

2023-06-07 Fir de Conversatie Bram Moolenaar
rror','nr':22},
  \ {'lnum':30,'col':15,'type':'i','text':'Info','nr':33},
  \ {'lnum':40,'col':20,'type':'x', 'text':'Other','nr':44},
! \ {'lnum':50,'col':25,'type':"\",'text':'one','nr':55}])
let l = split(execute('Xlist', ""), "\n")
call assert_equal([' 1:10 col 5 warning  11: Warning',
  \ ' 2:20 col 10 error  22: Error',
  \ ' 3:30 col 15 info  33: Info',
  \ ' 4:40 col 20 x  44: Other',
! \ ' 5:50 col 25  55: one'], l)
  
" Test for module names, one needs to explicitly set `'valid':v:true` so
call g:Xsetlist([
--- 167,181 
  \ {'lnum':20,'col':10,'type':'e','text':'Error','nr':22},
  \ {'lnum':30,'col':15,'type':'i','text':'Info','nr':33},
  \ {'lnum':40,'col':20,'type':'x', 'text':'Other','nr':44},
! \ {'lnum':50,'col':25,'type':"\",'text':'one','nr':55},
! \ {'lnum':0,'type':'e','text':'Check type field is output even 
when lnum==0. ("error" was not output by v9.0.0736.)','nr':66}])
let l = split(execute('Xlist', ""), "\n")
call assert_equal([' 1:10 col 5 warning  11: Warning',
  \ ' 2:20 col 10 error  22: Error',
  \ ' 3:30 col 15 info  33: Info',
  \ ' 4:40 col 20 x  44: Other',
!     \ ' 5:50 col 25  55: one',
!   \ ' 6 error  66: Check type field is output even when lnum==0. 
("error" was not output by v9.0.0736.)'], l)
  
" Test for module names, one needs to explicitly set `'valid':v:true` so
call g:Xsetlist([
***
*** 6428,6431 
--- 6430,6440 
bwipe!
  endfunc
  
+ func Test_quickfix_buffer_contents()
+   call setqflist([{'filename':'filename', 'pattern':'pattern', 
'text':'text'}])
+   copen
+   call assert_equal(['filename|pattern| text'], getline(1, '$'))  " The 
assert failed with Vim v9.0.0736; '| text' did not appear after the pattern.
+   call setqflist([], 'f')
+ endfunc
+ 
  " vim: shiftwidth=2 sts=2 expandtab
*** ../vim-9.0.1615/src/version.c   2023-06-07 18:26:58.025112415 +0100
--- src/version.c   2023-06-07 19:08:58.832508449 +0100
***
*** 697,698 
--- 697,700 
  {   /* Add new patch number below this line */
+ /**/
+ 1616,
  /**/

-- 
hundred-and-one symptoms of being an internet addict:
129. You cancel your newspaper subscription.

 /// Bram Moolenaar -- b...@moolenaar.net -- 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 vim_dev+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/vim_dev/20230607181042.B4AC01C0642%40moolenaar.net.


Re: charidx() return value when the string length in bytes is passed as the index

2023-06-07 Fir de Conversatie Bram Moolenaar


Yegappan wrote:

> The byteidx() function returns the length of a string in bytes when
> the specified character
> index is equal to the number of characters in the string:
> 
> echo byteidx("abc", 3)
> 3

When increasing the index we get:
echo byteidx("abc", 0) byteidx("abc", 1) byteidx("abc", 2) 
byteidx("abc", 3) byteidx("abc", 4)
0 1 2 3 -1

> But the charidx() function returns -1 when the specified byte index is
> equal to the number
> of bytes in the string:
> 
> echo charidx("abc", 3)
> -1

echo charidx("abc", 0) charidx("abc", 1) charidx("abc", 2) 
charidx("abc", 3) charidx("abc", 4)
0 1 2 -1 -1

That is unexpected, for single-byte characters the byte index and
character index are the same.

> When I implemented the support for charidx() in 8.2.2233, I didn't
> handle this case properly.
> Should we change charidx() to return the number of characters in the
> string in this case?
> This will help in the LSP plugin where the language server specifies
> the index after the last character in some cases (e.g. completion).
> The LSP plugin currently checks for this case and then uses
> strcharlen() to get the number of characters.  This involves computing
> the string length two times.

It would be good if we can make this consistent.  There is a tiny
backwards compatibility problem, but does it matter?  I can't think of a
situation where a plugin would rely on getting -1 instead of the number
of characters.

If we change this, your plugin would still need to handle using an older
Vim version.  I suppose that's not much of a problem.

-- 
hundred-and-one symptoms of being an internet addict:
126. You brag to all of your friends about your date Saturday night...but
 you don't tell them it was only in a chat room.

 /// Bram Moolenaar -- b...@moolenaar.net -- 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 vim_dev+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/vim_dev/20230607172738.F2F4E1C0758%40moolenaar.net.


Patch 9.0.1615

2023-06-07 Fir de Conversatie Bram Moolenaar


Patch 9.0.1615
Problem:URL shortcut files are not recognized.
Solution:   Add a pattern for URL shortcut files. (closes #12474)
Files:  runtime/filetype.vim, src/testdir/test_filetype.vim


*** ../vim-9.0.1614/runtime/filetype.vim2023-06-03 17:56:26.632203045 
+0100
--- runtime/filetype.vim2023-06-07 18:23:15.148869993 +0100
***
*** 2298,2303 
--- 2298,2306 
  au BufNewFile,BufRead */.config/upstart/*.conf   setf 
upstart
  au BufNewFile,BufRead */.config/upstart/*.override   setf upstart
  
+ " URL shortcut
+ au BufNewFile,BufRead *.url   setf urlshortcut
+ 
  " Vala
  au BufNewFile,BufRead *.vala  setf vala
  
*** ../vim-9.0.1614/src/testdir/test_filetype.vim   2023-06-03 
17:56:26.632203045 +0100
--- src/testdir/test_filetype.vim   2023-06-07 18:23:15.148869993 +0100
***
*** 709,714 
--- 709,715 
  upstreamdat: ['upstream.dat', 'UPSTREAM.DAT', 'upstream.file.dat', 
'UPSTREAM.FILE.DAT', 'file.upstream.dat', 'FILE.UPSTREAM.DAT'],
  upstreaminstalllog: ['upstreaminstall.log', 'UPSTREAMINSTALL.LOG', 
'upstreaminstall.file.log', 'UPSTREAMINSTALL.FILE.LOG', 
'file.upstreaminstall.log', 'FILE.UPSTREAMINSTALL.LOG'],
  upstreamlog: ['fdrupstream.log', 'upstream.log', 'UPSTREAM.LOG', 
'upstream.file.log', 'UPSTREAM.FILE.LOG', 'file.upstream.log', 
'FILE.UPSTREAM.LOG', 'UPSTREAM-file.log', 'UPSTREAM-FILE.LOG'],
+ urlshortcut: ['file.url'],
  usd: ['file.usda', 'file.usd'],
  usserverlog: ['usserver.log', 'USSERVER.LOG', 'usserver.file.log', 
'USSERVER.FILE.LOG', 'file.usserver.log', 'FILE.USSERVER.LOG'],
  usw2kagtlog: ['usw2kagt.log', 'USW2KAGT.LOG', 'usw2kagt.file.log', 
'USW2KAGT.FILE.LOG', 'file.usw2kagt.log', 'FILE.USW2KAGT.LOG'],
*** ../vim-9.0.1614/src/version.c   2023-06-06 15:59:52.901253625 +0100
--- src/version.c   2023-06-07 18:24:51.516986615 +0100
***
*** 697,698 
--- 697,700 
  {   /* Add new patch number below this line */
+ /**/
+ 1615,
  /**/

-- 
hundred-and-one symptoms of being an internet addict:
128. You can access the Net -- via your portable and cellular phone.

 /// Bram Moolenaar -- b...@moolenaar.net -- 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 vim_dev+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/vim_dev/20230607172739.040CA1C0792%40moolenaar.net.


Patch 9.0.1614

2023-06-06 Fir de Conversatie Bram Moolenaar


Patch 9.0.1614
Problem:strlen() called too often for :spellrepall.
Solution:   Store the result in a variable. (closes #12497)
Files:  src/spell.c, src/testdir/test_spell.vim


*** ../vim-9.0.1613/src/spell.c 2023-05-25 17:14:18.219481255 +0100
--- src/spell.c 2023-06-06 15:57:43.521597343 +0100
***
*** 2890,2896 
  {
  pos_T pos = curwin->w_cursor;
  char_u*frompat;
- int   addlen;
  char_u*line;
  char_u*p;
  int   save_ws = p_ws;
--- 2890,2895 
***
*** 2901,2909 
emsg(_(e_no_previous_spell_replacement));
return;
  }
! addlen = (int)(STRLEN(repl_to) - STRLEN(repl_from));
  
! frompat = alloc(STRLEN(repl_from) + 7);
  if (frompat == NULL)
return;
  sprintf((char *)frompat, "\\V\\<%s\\>", repl_from);
--- 2900,2910 
emsg(_(e_no_previous_spell_replacement));
return;
  }
! size_trepl_from_len = STRLEN(repl_from);
! size_trepl_to_len = STRLEN(repl_to);
! int   addlen = (int)(repl_to_len - repl_from_len);
  
! frompat = alloc(repl_from_len + 7);
  if (frompat == NULL)
return;
  sprintf((char *)frompat, "\\V\\<%s\\>", repl_from);
***
*** 2922,2935 
// when changing "etc" to "etc.".
line = ml_get_curline();
if (addlen <= 0 || STRNCMP(line + curwin->w_cursor.col,
!  repl_to, STRLEN(repl_to)) != 0)
{
p = alloc(STRLEN(line) + addlen + 1);
if (p == NULL)
break;
mch_memmove(p, line, curwin->w_cursor.col);
STRCPY(p + curwin->w_cursor.col, repl_to);
!   STRCAT(p, line + curwin->w_cursor.col + STRLEN(repl_from));
ml_replace(curwin->w_cursor.lnum, p, FALSE);
changed_bytes(curwin->w_cursor.lnum, curwin->w_cursor.col);
  #if defined(FEAT_PROP_POPUP)
--- 2923,2936 
// when changing "etc" to "etc.".
line = ml_get_curline();
if (addlen <= 0 || STRNCMP(line + curwin->w_cursor.col,
!  repl_to, repl_to_len) != 0)
{
p = alloc(STRLEN(line) + addlen + 1);
if (p == NULL)
break;
mch_memmove(p, line, curwin->w_cursor.col);
STRCPY(p + curwin->w_cursor.col, repl_to);
!   STRCAT(p, line + curwin->w_cursor.col + repl_from_len);
ml_replace(curwin->w_cursor.lnum, p, FALSE);
changed_bytes(curwin->w_cursor.lnum, curwin->w_cursor.col);
  #if defined(FEAT_PROP_POPUP)
***
*** 2945,2951 
}
++sub_nsubs;
}
!   curwin->w_cursor.col += (colnr_T)STRLEN(repl_to);
  }
  
  p_ws = save_ws;
--- 2946,2952 
}
++sub_nsubs;
}
!   curwin->w_cursor.col += (colnr_T)repl_to_len;
  }
  
  p_ws = save_ws;
*** ../vim-9.0.1613/src/testdir/test_spell.vim  2023-05-31 18:57:10.513953154 
+0100
--- src/testdir/test_spell.vim  2023-06-06 15:54:26.798124994 +0100
***
*** 281,287 
set spell& spelllang& dictionary& ignorecase&
  endfunc
  
! func Test_spellreall()
new
set spell
call assert_fails('spellrepall', 'E752:')
--- 281,287 
set spell& spelllang& dictionary& ignorecase&
  endfunc
  
! func Test_spellrepall()
new
set spell
call assert_fails('spellrepall', 'E752:')
*** ../vim-9.0.1613/src/version.c   2023-06-05 21:52:41.847715785 +0100
--- src/version.c   2023-06-06 15:56:26.689802604 +0100
***
*** 697,698 
--- 697,700 
  {   /* Add new patch number below this line */
+ /**/
+ 1614,
  /**/

-- 
hundred-and-one symptoms of being an internet addict:
122. You ask if the Netaholics Anonymous t-shirt you ordered can be
 sent to you via e-mail.

 /// Bram Moolenaar -- b...@moolenaar.net -- 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 vim_dev+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/vim_dev/20230606150038.EB9561C0EB0%40moolenaar.net.


Patch 9.0.1613

2023-06-05 Fir de Conversatie Bram Moolenaar


Patch 9.0.1613
Problem:Some make output gets picked up by 'errorformat'.
Solution:   Ignore make output by default. (Gregory Anders, closes #12481)
Files:  src/option.h, src/testdir/test_quickfix.vim


*** ../vim-9.0.1612/src/option.h2023-05-06 19:19:59.424601316 +0100
--- src/option.h2023-06-05 21:50:09.964101854 +0100
***
*** 89,95 
  #   ifdef VMS
  #define DFLT_EFM  "%A%p^,%C%%CC-%t-%m,%Cat line number %l in file 
%f,%f|%l| %m"
  #   else // Unix, probably
! #define DFLT_EFM  "%*[^\"]\"%f\"%*\\D%l: %m,\"%f\"%*\\D%l: %m,%-G%f:%l: 
(Each undeclared identifier is reported only once,%-G%f:%l: for each function 
it appears in.),%-GIn file included from %f:%l:%c:,%-GIn file included from 
%f:%l:%c\\,,%-GIn file included from %f:%l:%c,%-GIn file included from 
%f:%l,%-G%*[ ]from %f:%l:%c,%-G%*[ ]from %f:%l:,%-G%*[ ]from %f:%l\\,,%-G%*[ 
]from %f:%l,%f:%l:%c:%m,%f(%l):%m,%f:%l:%m,\"%f\"\\, line %l%*\\D%c%*[^ ] 
%m,%D%*\\a[%*\\d]: Entering directory %*[`']%f',%X%*\\a[%*\\d]: Leaving 
directory %*[`']%f',%D%*\\a: Entering directory %*[`']%f',%X%*\\a: Leaving 
directory %*[`']%f',%DMaking %*\\a in %f,%f|%l| %m"
  #   endif
  #  endif
  # endif
--- 89,95 
  #   ifdef VMS
  #define DFLT_EFM  "%A%p^,%C%%CC-%t-%m,%Cat line number %l in file 
%f,%f|%l| %m"
  #   else // Unix, probably
! #define DFLT_EFM  "%*[^\"]\"%f\"%*\\D%l: %m,\"%f\"%*\\D%l: 
%m,%-Gg%\\?make[%*\\d]: *** [%f:%l:%m,%-Gg%\\?make: *** [%f:%l:%m,%-G%f:%l: 
(Each undeclared identifier is reported only once,%-G%f:%l: for each function 
it appears in.),%-GIn file included from %f:%l:%c:,%-GIn file included from 
%f:%l:%c\\,,%-GIn file included from %f:%l:%c,%-GIn file included from 
%f:%l,%-G%*[ ]from %f:%l:%c,%-G%*[ ]from %f:%l:,%-G%*[ ]from %f:%l\\,,%-G%*[ 
]from %f:%l,%f:%l:%c:%m,%f(%l):%m,%f:%l:%m,\"%f\"\\, line %l%*\\D%c%*[^ ] 
%m,%D%*\\a[%*\\d]: Entering directory %*[`']%f',%X%*\\a[%*\\d]: Leaving 
directory %*[`']%f',%D%*\\a: Entering directory %*[`']%f',%X%*\\a: Leaving 
directory %*[`']%f',%DMaking %*\\a in %f,%f|%l| %m"
  #   endif
  #  endif
  # endif
*** ../vim-9.0.1612/src/testdir/test_quickfix.vim   2023-05-27 
14:10:04.319182880 +0100
--- src/testdir/test_quickfix.vim   2023-06-05 21:50:09.968101844 +0100
***
*** 1200,1206 
  "Xtestfile", line 6 col 19; this is an error
  gcc -c -DHAVE_CONFIsing-prototypes -I/usr/X11R6/include  version.c
  Xtestfile:9: parse error before `asd'
! make: *** [vim] Error 1
  in file "Xtestfile" linenr 10: there is an error
  
  2 returned
--- 1200,1206 
  "Xtestfile", line 6 col 19; this is an error
  gcc -c -DHAVE_CONFIsing-prototypes -I/usr/X11R6/include  version.c
  Xtestfile:9: parse error before `asd'
! make: *** [src/vim/testdir/Makefile:100: test_quickfix] Error 1
  in file "Xtestfile" linenr 10: there is an error
  
  2 returned
*** ../vim-9.0.1612/src/version.c   2023-06-05 20:44:34.734261086 +0100
--- src/version.c   2023-06-05 21:49:23.488233763 +0100
***
*** 697,698 
--- 697,700 
  {   /* Add new patch number below this line */
+ /**/
+ 1613,
  /**/

-- 
~
~
~
".signature" 4 lines, 50 characters written

 /// Bram Moolenaar -- b...@moolenaar.net -- 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 vim_dev+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/vim_dev/20230605205317.E548B1C0542%40moolenaar.net.


Patch 9.0.1612

2023-06-05 Fir de Conversatie Bram Moolenaar


Patch 9.0.1612
Problem:"skipcol" not reset when using multi-byte characters.
Solution:   Compare with w_virtcol instead of w_cursor.col. (closes #12457)
Files:  src/move.c, src/testdir/test_scroll_opt.vim,
src/testdir/dumps/Test_smoothscroll_multi_1.dump


*** ../vim-9.0.1611/src/move.c  2023-06-05 18:41:11.757624535 +0100
--- src/move.c  2023-06-05 20:43:48.818215644 +0100
***
*** 2414,2423 
}
check_topfill(curwin, FALSE);
  #endif
!   // TODO: if the line doesn't fit may optimize w_skipcol
!   if (curwin->w_topline == curwin->w_cursor.lnum
!   && curwin->w_skipcol >= curwin->w_cursor.col)
!   reset_skipcol();
if (curwin->w_topline != old_topline
|| curwin->w_skipcol != old_skipcol
  #ifdef FEAT_DIFF
--- 2414,2427 
}
check_topfill(curwin, FALSE);
  #endif
!   if (curwin->w_topline == curwin->w_cursor.lnum)
!   {
!   validate_virtcol();
!   if (curwin->w_skipcol >= curwin->w_virtcol)
!   // TODO: if the line doesn't fit may optimize w_skipcol instead
!   // of making it zero
!   reset_skipcol();
!   }
if (curwin->w_topline != old_topline
|| curwin->w_skipcol != old_skipcol
  #ifdef FEAT_DIFF
*** ../vim-9.0.1611/src/testdir/test_scroll_opt.vim 2023-06-05 
18:41:11.757624535 +0100
--- src/testdir/test_scroll_opt.vim 2023-06-05 20:42:09.790085119 +0100
***
*** 124,129 
--- 124,144 
call StopVimInTerminal(buf)
  endfunc
  
+ func Test_smoothscroll_multibyte()
+   CheckScreendump
+ 
+   let lines =<< trim END
+   set scrolloff=0 smoothscroll
+   call setline(1, [repeat('ϛ', 45), repeat('2', 36)])
+   exe "normal G35l\k"
+   END
+   call writefile(lines, 'XSmoothMultibyte', 'D')
+   let buf = RunVimInTerminal('-S XSmoothMultibyte', #{rows: 6, cols: 40})
+   call VerifyScreenDump(buf, 'Test_smoothscroll_multi_1', {})
+ 
+   call StopVimInTerminal(buf)
+ endfunc
+ 
  func Test_smoothscroll_number()
CheckScreendump
  
*** ../vim-9.0.1611/src/testdir/dumps/Test_smoothscroll_multi_1.dump
2023-06-05 20:44:25.390252548 +0100
--- src/testdir/dumps/Test_smoothscroll_multi_1.dump2023-06-05 
20:42:41.442132040 +0100
***
*** 0 
--- 1,6 
+ |ϛ+0&#ff0@34>ϛ@4
+ @5| @34
+ |2@35| @3
+ |~+0#4040ff13&| @38
+ |~| @38
+ | +0#000&@21|1|,|7|1|-|3|6| @6|A|l@1| 
*** ../vim-9.0.1611/src/version.c   2023-06-05 19:46:14.436726710 +0100
--- src/version.c   2023-06-05 20:40:05.361845840 +0100
***
*** 697,698 
--- 697,700 
  {   /* Add new patch number below this line */
+ /**/
+ 1612,
  /**/

-- 
hundred-and-one symptoms of being an internet addict:
121. You ask for e-mail adresses instead of telephone numbers.

 /// Bram Moolenaar -- b...@moolenaar.net -- 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 vim_dev+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/vim_dev/20230605194541.03B2C1C0542%40moolenaar.net.


Patch 9.0.1611

2023-06-05 Fir de Conversatie Bram Moolenaar


Patch 9.0.1611
Problem:v:maxcol can be changed in a :for loop.
Solution:   Check for read-only loop variable. (closes #12470)
Files:  src/evalvars.c, src/testdir/test_eval_stuff.vim


*** ../vim-9.0.1610/src/evalvars.c  2023-05-24 21:02:20.485162125 +0100
--- src/evalvars.c  2023-06-05 19:25:11.236071546 +0100
***
*** 3842,3848 
}
  
if ((flags & ASSIGN_FOR_LOOP) == 0
!&& var_check_permission(di, name) == FAIL)
goto failed;
}
else
--- 3842,3849 
}
  
if ((flags & ASSIGN_FOR_LOOP) == 0
!? var_check_permission(di, name) == FAIL
!: var_check_ro(di->di_flags, name, FALSE))
goto failed;
}
else
*** ../vim-9.0.1610/src/testdir/test_eval_stuff.vim 2022-09-21 
21:59:58.273433517 +0100
--- src/testdir/test_eval_stuff.vim 2023-06-05 19:27:51.141337993 +0100
***
*** 126,131 
--- 126,132 
call assert_fails("for x in 99", 'E1098:')
call assert_fails("for x in function('winnr')", 'E1098:')
call assert_fails("for x in {'a': 9}", 'E1098:')
+   call assert_fails("for v:maxcol in range(1)", 'E46:')
  
if 0
  /1/5/2/s/\n
*** ../vim-9.0.1610/src/version.c   2023-06-05 18:41:11.761624543 +0100
--- src/version.c   2023-06-05 19:45:40.516871709 +0100
***
*** 697,698 
--- 697,700 
  {   /* Add new patch number below this line */
+ /**/
+ 1611,
  /**/

-- 
"Computers in the future may weigh no more than 1.5 tons."
   Popular Mechanics, 1949

 /// Bram Moolenaar -- b...@moolenaar.net -- 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 vim_dev+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/vim_dev/20230605184643.A9C471C0542%40moolenaar.net.


Patch 9.0.1610

2023-06-05 Fir de Conversatie Bram Moolenaar


Patch 9.0.1610
Problem:Display is wrong when 'smoothscroll' is set and scrolling multiple
lines.
Solution:   Redraw with UPD_NOT_VALID when "skipcol" is or was set.
(closes #12490, closes #12468)
Files:  src/move.c, src/testdir/test_scroll_opt.vim,
src/testdir/dumps/Test_smooth_multi_skipcol_1.dump,
src/testdir/dumps/Test_smooth_multi_skipcol_2.dump,
src/testdir/dumps/Test_smooth_multi_skipcol_3.dump


*** ../vim-9.0.1609/src/move.c  2023-06-04 19:29:18.632643893 +0100
--- src/move.c  2023-06-05 18:38:39.129392959 +0100
***
*** 1786,1792 
int width1 = curwin->w_width - curwin_col_off();
int width2 = width1 + curwin_col_off2();
int size = 0;
-   linenr_Tprev_topline = curwin->w_topline;
colnr_T prev_skipcol = curwin->w_skipcol;
  
if (do_sms)
--- 1786,1791 
***
*** 1850,1859 
}
}
  
!   // TODO: is comparing w_topline with prev_topline still needed?
!   if (curwin->w_topline == prev_topline
!   || curwin->w_skipcol != prev_skipcol)
!   // need to redraw because wl_size of the topline may now be invalid
redraw_later(UPD_NOT_VALID);
  }
  else
--- 1849,1857 
}
}
  
!   if (prev_skipcol > 0 || curwin->w_skipcol > 0)
!   // need to redraw more, because wl_size of the (new) topline may
!   // now be invalid
redraw_later(UPD_NOT_VALID);
  }
  else
*** ../vim-9.0.1609/src/testdir/test_scroll_opt.vim 2023-06-03 
22:08:11.526360596 +0100
--- src/testdir/test_scroll_opt.vim 2023-06-05 18:33:30.848795225 +0100
***
*** 798,807 
  
let lines =<< trim END
setlocal cursorline scrolloff=0 smoothscroll
!   call setline(1, repeat([''], 9))
call setline(3, repeat('a', 50))
!   call setline(8, 'bbb')
!   call setline(9, 'ccc')
redraw
END
call writefile(lines, 'XSmoothMultiSkipcol', 'D')
--- 798,808 
  
let lines =<< trim END
setlocal cursorline scrolloff=0 smoothscroll
!   call setline(1, repeat([''], 8))
call setline(3, repeat('a', 50))
!   call setline(4, repeat('a', 50))
!   call setline(7, 'bbb')
!   call setline(8, 'ccc')
redraw
END
call writefile(lines, 'XSmoothMultiSkipcol', 'D')
***
*** 811,816 
--- 812,820 
call term_sendkeys(buf, "3\")
call VerifyScreenDump(buf, 'Test_smooth_multi_skipcol_2', {})
  
+   call term_sendkeys(buf, "2\")
+   call VerifyScreenDump(buf, 'Test_smooth_multi_skipcol_3', {})
+ 
call StopVimInTerminal(buf)
  endfunc
  
*** ../vim-9.0.1609/src/testdir/dumps/Test_smooth_multi_skipcol_1.dump  
2023-06-03 22:08:11.526360596 +0100
--- src/testdir/dumps/Test_smooth_multi_skipcol_1.dump  2023-06-05 
18:33:30.848795225 +0100
***
*** 2,9 
  | +0&&@39
  |a@39
  @10| @29
! @40
! @40
  @40
  @40
  |b@2| @36
--- 2,9 
  | +0&&@39
  |a@39
  @10| @29
! |a@39
! @10| @29
  @40
  @40
  |b@2| @36
*** ../vim-9.0.1609/src/testdir/dumps/Test_smooth_multi_skipcol_2.dump  
2023-06-03 22:08:11.526360596 +0100
--- src/testdir/dumps/Test_smooth_multi_skipcol_2.dump  2023-06-05 
18:33:30.848795225 +0100
***
*** 1,6 
  |<+0#4040ff13#ff0@2|a+8#000&@5>a| @29
! | +0&&@39
! @40
  @40
  @40
  |b@2| @36
--- 1,6 
  |<+0#4040ff13#ff0@2|a+8#000&@5>a| @29
! |a+0&&@39
! @10| @29
  @40
  @40
  |b@2| @36
*** ../vim-9.0.1609/src/testdir/dumps/Test_smooth_multi_skipcol_3.dump  
2023-06-05 18:41:00.881609065 +0100
--- src/testdir/dumps/Test_smooth_multi_skipcol_3.dump  2023-06-05 
18:33:30.848795225 +0100
***
*** 0 
--- 1,10 
+ |<+0#4040ff13#ff0@2|a+8#000&@5>a| @29
+ | +0&&@39
+ @40
+ |b@2| @36
+ |c@2| @36
+ |~+0#4040ff13&| @38
+ |~| @38
+ |~| @38
+ |~| @38
+ | +0#000&@21|4|,|5|0| @9|B|o|t| 
*** ../vim-9.0.1609/src/version.c   2023-06-05 16:53:20.817489906 +0100
--- src/version.c   2023-06-05 18:36:37.793182231 +0100
***
*** 697,698 
--- 697,700 
  {   /* Add new patch number below this line */
+ /**/
+ 1610,
  /**/

-- 
hundred-and-one symptoms of being an internet addict:
119. You are reading a book and look for the scroll bar to get to
 the next page.

 /// Bram Moolenaar -- b...@moolenaar.net -- http://www.Moolenaar.net   \\\
///  \\\
\\\sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ ///
 \\\help me help AIDS victims -- http://ICCF-Holland.

Patch 9.0.1609

2023-06-05 Fir de Conversatie Bram Moolenaar


Patch 9.0.1609
Problem:Crash when an object indirectly references itself.
Solution:   Avoid clearing an object while it is already being cleared.
(closes #12494)
Files:  src/vim9class.c, src/testdir/test_vim9_class.vim


*** ../vim-9.0.1608/src/vim9class.c 2023-06-04 18:11:31.998816728 +0100
--- src/vim9class.c 2023-06-05 16:39:27.490940490 +0100
***
*** 1497,1502 
--- 1497,1505 
  static void
  object_clear(object_T *obj)
  {
+ // Avoid a recursive call, it can happen if "obj" has a circular 
reference.
+ obj->obj_refcount = INT_MAX;
+ 
  class_T *cl = obj->obj_class;
  
  // the member values are just after the object structure
***
*** 1619,1624 
--- 1622,1629 
  first_object = obj;
  }
  
+ static object_T   *next_nonref_obj = NULL;
+ 
  /*
   * Call this function when an object has been cleared and is about to be 
freed.
   * It is removed from the list headed by "first_object".
***
*** 1632,1637 
--- 1637,1646 
obj->obj_prev_used->obj_next_used = obj->obj_next_used;
  else if (first_object == obj)
first_object = obj->obj_next_used;
+ 
+ // update the next object to check if needed
+ if (obj == next_nonref_obj)
+   next_nonref_obj = obj->obj_next_used;
  }
  
  /*
***
*** 1641,1651 
  object_free_nonref(int copyID)
  {
  int   did_free = FALSE;
- object_T  *next_obj;
  
! for (object_T *obj = first_object; obj != NULL; obj = next_obj)
  {
!   next_obj = obj->obj_next_used;
if ((obj->obj_copyID & COPYID_MASK) != (copyID & COPYID_MASK))
{
// Free the object and items it contains.
--- 1650,1659 
  object_free_nonref(int copyID)
  {
  int   did_free = FALSE;
  
! for (object_T *obj = first_object; obj != NULL; obj = next_nonref_obj)
  {
!   next_nonref_obj = obj->obj_next_used;
if ((obj->obj_copyID & COPYID_MASK) != (copyID & COPYID_MASK))
{
// Free the object and items it contains.
***
*** 1654,1659 
--- 1662,1668 
}
  }
  
+ next_nonref_obj = NULL;
  return did_free;
  }
  
*** ../vim-9.0.1608/src/testdir/test_vim9_class.vim 2023-06-04 
18:11:31.998816728 +0100
--- src/testdir/test_vim9_class.vim 2023-06-05 15:45:05.119622922 +0100
***
*** 925,930 
--- 925,957 
echo Point.pl Point.pd
END
call v9.CheckScriptSuccess(lines)
+ 
+   let lines =<< trim END
+   vim9script
+ 
+   interface View
+   endinterface
+ 
+   class Widget
+ this.view: View
+   endclass
+ 
+   class MyView implements View
+ this.widget: Widget
+ 
+ def new()
+   # this will result in a circular reference to this object
+   this.widget = Widget.new(this)
+ enddef
+   endclass
+ 
+   var view = MyView.new()
+ 
+   # overwrite "view", will be garbage-collected next
+   view = MyView.new()
+   test_garbagecollect_now()
+   END
+   call v9.CheckScriptSuccess(lines)
  endfunc
  
  def Test_class_function()
*** ../vim-9.0.1608/src/version.c   2023-06-05 15:00:00.343485274 +0100
--- src/version.c   2023-06-05 15:43:14.115773128 +0100
***
*** 697,698 
--- 697,700 
  {   /* Add new patch number below this line */
+ /**/
+     1609,
  /**/

-- 
Support your right to bare arms!  Wear short sleeves!

 /// Bram Moolenaar -- b...@moolenaar.net -- 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 vim_dev+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/vim_dev/20230605155351.85EE91C0542%40moolenaar.net.


Patch 9.0.1608

2023-06-05 Fir de Conversatie Bram Moolenaar


Patch 9.0.1608
Problem:update_topline() is called twice.
Solution:   Do not call update_topline() before curs_columns(). (Luuk van
Baal, closes #12495)
Files:  src/window.c


*** ../vim-9.0.1607/src/window.c2023-06-02 14:16:31.907127068 +0100
--- src/window.c2023-06-05 14:57:16.235763546 +0100
***
*** 7032,7042 
  }
  
  if (wp == curwin)
- {
-   if (get_scrolloff_value())
-   update_topline();
curs_columns(FALSE);// validate w_wrow
! }
  if (prev_height > 0)
wp->w_prev_fraction_row = wp->w_wrow;
  
--- 7032,7039 
  }
  
  if (wp == curwin)
curs_columns(FALSE);// validate w_wrow
! 
  if (prev_height > 0)
wp->w_prev_fraction_row = wp->w_wrow;
  
***
*** 7055,7067 
  wp->w_lines_valid = 0;
  changed_line_abv_curs_win(wp);
  invalidate_botline_win(wp);
! if (wp == curwin)
! {
!   skip_update_topline = (*p_spk != 'c');
!   update_topline();
curs_columns(TRUE); // validate w_wrow
!   skip_update_topline = FALSE;
! }
  redraw_win_later(wp, UPD_NOT_VALID);
  wp->w_redr_status = TRUE;
  }
--- 7052,7061 
  wp->w_lines_valid = 0;
  changed_line_abv_curs_win(wp);
  invalidate_botline_win(wp);
! 
! if (wp == curwin && *p_spk == 'c')
curs_columns(TRUE); // validate w_wrow
! 
  redraw_win_later(wp, UPD_NOT_VALID);
  wp->w_redr_status = TRUE;
  }
*** ../vim-9.0.1607/src/version.c   2023-06-04 19:29:18.636643905 +0100
--- src/version.c   2023-06-05 14:58:29.747636055 +0100
***
*** 697,698 
--- 697,700 
  {   /* Add new patch number below this line */
+ /**/
+ 1608,
  /**/

-- 
hundred-and-one symptoms of being an internet addict:
118. You are on a first-name basis with your ISP's staff.

 /// Bram Moolenaar -- b...@moolenaar.net -- 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 vim_dev+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/vim_dev/20230605140113.8F1551C0542%40moolenaar.net.


Patch 9.0.1607

2023-06-04 Fir de Conversatie Bram Moolenaar


Patch 9.0.1607
Problem:screenpos() returns wrong row with diff filler lines.
Solution:   Only add filler lines when appropriate.  Also don't add the
'smoothscroll' marker when w_skipcol is zero. (closes #12485,
closes #12484)
Files:  src/move.c, src/testdir/test_cursor_func.vim


*** ../vim-9.0.1606/src/move.c  2023-06-03 22:08:11.522360596 +0100
--- src/move.c  2023-06-04 19:27:24.104636327 +0100
***
*** 344,350 
check_topline = TRUE;
else if (check_top_offset())
check_topline = TRUE;
!   else if (curwin->w_cursor.lnum == curwin->w_topline)
{
colnr_T vcol;
  
--- 344,351 
check_topline = TRUE;
else if (check_top_offset())
check_topline = TRUE;
!   else if (curwin->w_skipcol > 0
!&& curwin->w_cursor.lnum == curwin->w_topline)
{
colnr_T vcol;
  
***
*** 1459,1465 
  
  #ifdef FEAT_DIFF
// Add filler lines above this buffer line.
!   row += diff_check_fill(wp, lnum);
  #endif
  
colnr_T off = win_col_off(wp);
--- 1460,1467 
  
  #ifdef FEAT_DIFF
// Add filler lines above this buffer line.
!   row += lnum == wp->w_topline ? wp->w_topfill
!: diff_check_fill(wp, lnum);
  #endif
  
colnr_T off = win_col_off(wp);
***
*** 1479,1485 
col += off;
width = wp->w_width - off + win_col_off2(wp);
  
!   if (pos->lnum == wp->w_topline)
col -= wp->w_skipcol;
  
// long line wrapping, adjust row
--- 1481,1487 
col += off;
width = wp->w_width - off + win_col_off2(wp);
  
!   if (lnum == wp->w_topline)
col -= wp->w_skipcol;
  
// long line wrapping, adjust row
***
*** 1848,1853 
--- 1850,1856 
}
}
  
+   // TODO: is comparing w_topline with prev_topline still needed?
if (curwin->w_topline == prev_topline
|| curwin->w_skipcol != prev_skipcol)
// need to redraw because wl_size of the topline may now be invalid
*** ../vim-9.0.1606/src/testdir/test_cursor_func.vim2023-06-03 
17:11:40.789005400 +0100
--- src/testdir/test_cursor_func.vim2023-06-04 19:25:42.232818166 +0100
***
*** 132,144 
1split
normal G$
redraw
call assert_equal({'row': winrow + 0,
\ 'col': wincol + 20 - 1,
\ 'curscol': wincol + 20 - 1,
\ 'endcol': wincol + 20 - 1},
\ screenpos(win_getid(), line('.'), col('.')))
  
!   " w_skipcol should be subtracted
setlocal nowrap
normal 050zl$
call assert_equal({'row': winrow + 0,
--- 132,145 
1split
normal G$
redraw
+   " w_skipcol should be subtracted
call assert_equal({'row': winrow + 0,
\ 'col': wincol + 20 - 1,
\ 'curscol': wincol + 20 - 1,
\ 'endcol': wincol + 20 - 1},
\ screenpos(win_getid(), line('.'), col('.')))
  
!   " w_leftcol should be subtracted
setlocal nowrap
normal 050zl$
call assert_equal({'row': winrow + 0,
***
*** 203,208 
--- 204,222 
windo diffthis
wincmd w
call assert_equal(#{col: 3, row: 7, endcol: 3, curscol: 3}, screenpos(0, 4, 
1))
+   call assert_equal(#{col: 3, row: 8, endcol: 3, curscol: 3}, screenpos(0, 5, 
1))
+   exe "normal! 3\"
+   call assert_equal(#{col: 3, row: 4, endcol: 3, curscol: 3}, screenpos(0, 4, 
1))
+   call assert_equal(#{col: 3, row: 5, endcol: 3, curscol: 3}, screenpos(0, 5, 
1))
+   exe "normal! \"
+   call assert_equal(#{col: 3, row: 3, endcol: 3, curscol: 3}, screenpos(0, 4, 
1))
+   call assert_equal(#{col: 3, row: 4, endcol: 3, curscol: 3}, screenpos(0, 5, 
1))
+   exe "normal! \"
+   call assert_equal(#{col: 3, row: 2, endcol: 3, curscol: 3}, screenpos(0, 4, 
1))
+   call assert_equal(#{col: 3, row: 3, endcol: 3, curscol: 3}, screenpos(0, 5, 
1))
+   exe "normal! \"
+   call assert_equal(#{col: 3, row: 1, endcol: 3, curscol: 3}, screenpos(0, 4, 
1))
+   call assert_equal(#{col: 3, row: 2, endcol: 3, curscol: 3}, screenpos(0, 5, 
1))
  
windo diffoff
bwipe!
*** ../vim-9.0.1606/src/version.c   2023-06-04 18:46:25.158494677 +0100
--- src/version.c   2023-06-04 19:26:09.652769031 +0100
***
*** 697,698 
--- 697,700 
  {   /* Add new patch number below this line */
+ /**/
+ 1607,
  /**/

-- 
Two percent of zero is almost nothing.

 /// Bram Moolenaar -- b...@moolenaar.net -- http://www.Moolenaar.net   \\\
/// 

Patch 9.0.1606

2023-06-04 Fir de Conversatie Bram Moolenaar


Patch 9.0.1606
Problem:Using freed memory when 'foldcolumn' is set.
Solution:   Save extra pointer to free it later. (closes #12492)
Files:  src/drawline.c, src/testdir/test_fold.vim


*** ../vim-9.0.1605/src/drawline.c  2023-06-03 19:44:42.573842760 +0100
--- src/drawline.c  2023-06-04 18:44:44.706639414 +0100
***
*** 150,155 
--- 150,156 
  // saved "extra" items for when draw_state becomes WL_LINE (again)
  int   saved_n_extra;
  char_u*saved_p_extra;
+ char_u*saved_p_extra_free;
  int   saved_extra_attr;
  int   saved_n_attr_skip;
  int   saved_extra_for_textprop;
***
*** 230,236 
return;
  
  wlv->n_extra = (int)fill_foldcolumn(wlv->p_extra_free,
!   wp, FALSE, wlv->lnum);
  wlv->p_extra_free[wlv->n_extra] = NUL;
  wlv->p_extra = wlv->p_extra_free;
  wlv->c_extra = NUL;
--- 231,237 
return;
  
  wlv->n_extra = (int)fill_foldcolumn(wlv->p_extra_free,
!wp, FALSE, wlv->lnum);
  wlv->p_extra_free[wlv->n_extra] = NUL;
  wlv->p_extra = wlv->p_extra_free;
  wlv->c_extra = NUL;
***
*** 979,984 
--- 980,988 
wlv->draw_state = WL_START;
wlv->saved_n_extra = wlv->n_extra;
wlv->saved_p_extra = wlv->p_extra;
+   vim_free(wlv->saved_p_extra_free);
+   wlv->saved_p_extra_free = wlv->p_extra_free;
+   wlv->p_extra_free = NULL;
wlv->saved_extra_attr = wlv->extra_attr;
wlv->saved_n_attr_skip = wlv->n_attr_skip;
wlv->saved_extra_for_textprop = wlv->extra_for_textprop;
***
*** 1015,1020 
--- 1019,1027 
wlv->c_extra = wlv->saved_c_extra;
wlv->c_final = wlv->saved_c_final;
wlv->p_extra = wlv->saved_p_extra;
+   vim_free(wlv->p_extra_free);
+   wlv->p_extra_free = wlv->saved_p_extra_free;
+   wlv->saved_p_extra_free = NULL;
wlv->extra_attr = wlv->saved_extra_attr;
wlv->n_attr_skip = wlv->saved_n_attr_skip;
wlv->extra_for_textprop = wlv->saved_extra_for_textprop;
***
*** 4119,4123 
--- 4126,4131 
  #endif
  
  vim_free(wlv.p_extra_free);
+ vim_free(wlv.saved_p_extra_free);
  return wlv.row;
  }
*** ../vim-9.0.1605/src/testdir/test_fold.vim   2023-02-18 20:15:39.693994664 
+
--- src/testdir/test_fold.vim   2023-06-04 18:39:12.691154215 +0100
***
*** 1755,1758 
--- 1755,1772 
call assert_equal(1, line('.'))
  endfunc
  
+ " This was using freed memory
+ func Test_foldcolumn_linebreak_control_char()
+   CheckFeature linebreak
+ 
+   5vnew
+   setlocal foldcolumn=1 linebreak
+   call setline(1, "aaa\b")
+   redraw
+   call assert_equal([' aaa^', ' Ab  '], ScreenLines([1, 2], 5))
+   call assert_equal(screenattr(1, 5), screenattr(2, 2))
+ 
+   bwipe!
+ endfunc
+ 
  " vim: shiftwidth=2 sts=2 expandtab
*** ../vim-9.0.1605/src/version.c   2023-06-04 18:11:31.998816728 +0100
--- src/version.c   2023-06-04 18:41:23.378943516 +0100
***
*** 697,698 
--- 697,700 
  {   /* Add new patch number below this line */
+ /**/
+ 1606,
  /**/

-- 
hundred-and-one symptoms of being an internet addict:
115. You are late picking up your kid from school and try to explain
 to the teacher you were stuck in Web traffic.

 /// Bram Moolenaar -- b...@moolenaar.net -- 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 vim_dev+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/vim_dev/20230604174659.2EA731C0C30%40moolenaar.net.


Patch 9.0.1605

2023-06-04 Fir de Conversatie Bram Moolenaar


Patch 9.0.1605
Problem:Crash when calling method on super in child constructor. (Israel
Chauca Fuentes)
Solution:   Clear the type list. (Ernie Rael, closes #12489, closes #12471)
Files:  src/userfunc.c, src/vim9class.c, src/testdir/test_vim9_class.vim


*** ../vim-9.0.1604/src/userfunc.c  2023-05-24 21:02:20.489162125 +0100
--- src/userfunc.c  2023-06-04 18:06:41.187146212 +0100
***
*** 5651,5658 
  //type_T  **uf_arg_types;
  //type_T  *uf_ret_type;
  
! ufunc->uf_type_list.ga_len = 0;
! ufunc->uf_type_list.ga_data = NULL;
  
  // TODO:   partial_T  *uf_partial;
  
--- 5651,5658 
  //type_T  **uf_arg_types;
  //type_T  *uf_ret_type;
  
! // make uf_type_list empty
! ga_init(&ufunc->uf_type_list);
  
  // TODO:   partial_T  *uf_partial;
  
*** ../vim-9.0.1604/src/vim9class.c 2023-04-18 19:07:21.194891892 +0100
--- src/vim9class.c 2023-06-04 18:07:57.411053618 +0100
***
*** 1025,1031 
if (*fup == NULL)
goto cleanup;
  
!   mch_memmove(*fup, gap->ga_data, sizeof(ufunc_T *) * gap->ga_len);
vim_free(gap->ga_data);
if (loop == 1)
cl->class_class_function_count_child = gap->ga_len;
--- 1025,1033 
if (*fup == NULL)
goto cleanup;
  
!   if (gap->ga_len != 0)
!   mch_memmove(*fup, gap->ga_data,
! sizeof(ufunc_T *) * gap->ga_len);
vim_free(gap->ga_data);
if (loop == 1)
cl->class_class_function_count_child = gap->ga_len;
*** ../vim-9.0.1604/src/testdir/test_vim9_class.vim 2023-05-19 
19:01:13.292413300 +0100
--- src/testdir/test_vim9_class.vim 2023-06-04 17:58:25.647933367 +0100
***
*** 1636,1641 
--- 1636,1663 
END
v9.CheckScriptSuccess(lines)
unlet g:result
+ 
+   # Using super, Child invokes Base method which has optional arg. #12471
+   lines =<< trim END
+ vim9script
+ 
+ class Base
+ this.success: bool = false
+ def Method(arg = 0)
+ this.success = true
+ enddef
+ endclass
+ 
+ class Child extends Base
+ def new()
+ super.Method()
+ enddef
+ endclass
+ 
+ var obj = Child.new()
+ assert_equal(true, obj.success)
+   END
+   v9.CheckScriptSuccess(lines)
  enddef
  
  
*** ../vim-9.0.1604/src/version.c   2023-06-04 16:55:23.342362151 +0100
--- src/version.c   2023-06-04 18:00:50.823659423 +0100
***
*** 697,698 
--- 697,700 
  {   /* Add new patch number below this line */
+ /**/
+ 1605,
  /**/

-- 
hundred-and-one symptoms of being an internet addict:
114. You are counting items, you go "0,1,2,3,4,5,6,7,8,9,A,B,C,D...".

 /// Bram Moolenaar -- b...@moolenaar.net -- 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 vim_dev+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/vim_dev/20230604171202.7D9051C0595%40moolenaar.net.


Patch 9.0.1604

2023-06-04 Fir de Conversatie Bram Moolenaar
ortError('testdir/' .. fname, lnum, 'space before Tab')
  endif
  
  # skip files that are known to have trailing white space
***
*** 76,82 
: fname =~ 'test_vim9_script.vim' ? '[^,:3]\s$'
: fname =~ 'test_visual.vim' ? '[^/]\s$'
: '[^\\]\s$')
!   assert_equal(0, lnum, 'testdir/' .. fname .. ': trailing white space')
  endif
endfor
  
--- 84,90 
: fname =~ 'test_vim9_script.vim' ? '[^,:3]\s$'
: fname =~ 'test_visual.vim' ? '[^/]\s$'
: '[^\\]\s$')
!   ReportError('testdir/' .. fname, lnum, 'trailing white space')
  endif
endfor
  
***
*** 88,93 
--- 96,102 
set nowrapscan
  
for fpath in glob('../../runtime/doc/*.txt', 0, 1)
+ g:ignoreSwapExists = 'e'
  exe 'edit ' .. fpath
  
  var fname = fnamemodify(fpath, ":t")
***
*** 106,112 
  || fname == 'usr_27.txt' && getline(lnum) =~ "\[^\? \t\]"
  continue
endif
!   assert_equal(0, lnum, fpath .. ': space before tab')
if lnum == 0
  break
endif
--- 115,121 
  || fname == 'usr_27.txt' && getline(lnum) =~ "\[^\? \t\]"
  continue
endif
!   ReportError(fpath, lnum, 'space before tab')
if lnum == 0
  break
endif
***
*** 123,140 
  || fname == 'change.txt' && getline(lnum) =~ "foobar bla $"
  continue
endif
!   assert_equal(0, lnum, fpath .. ': trailing white space')
if lnum == 0
  break
endif
  endwhile
  
! # TODO: Do check and fix help files
! ## Check over 80 columns
  #cursor(1, 1)
  #while 1
  #  lnum = search('\%>80v.*$')
! #  assert_equal(0, lnum, fpath .. ': line over 80 columns')
  #  if lnum == 0
  #break
  #  endif
--- 132,148 
  || fname == 'change.txt' && getline(lnum) =~ "foobar bla $"
  continue
    endif
!   ReportError('testdir' .. fpath, lnum, 'trailing white space')
if lnum == 0
  break
endif
  endwhile
  
! ## TODO: Check for line over 80 columns
  #cursor(1, 1)
  #while 1
  #  lnum = search('\%>80v.*$')
! #  ReportError(fpath, lnum, 'line over 80 columns')
  #  if lnum == 0
  #break
  #  endif
*** ../vim-9.0.1603/src/testdir/runtest.vim 2023-01-28 19:18:56.725720605 
+
--- src/testdir/runtest.vim 2023-06-04 16:53:47.626311774 +0100
***
*** 111,119 
--- 111,123 
  else
let s:test_script_fname = expand('%')
  endif
+ 
  au! SwapExists * call HandleSwapExists()
  func HandleSwapExists()
if exists('g:ignoreSwapExists')
+ if type(g:ignoreSwapExists) == v:t_string
+   let v:swapchoice = g:ignoreSwapExists
+ endif
  return
endif
" Ignore finding a swap file for the test script (the user might be
*** ../vim-9.0.1603/src/version.c   2023-06-03 22:08:11.526360596 +0100
--- src/version.c   2023-06-04 16:37:17.687269957 +0100
***
*** 697,698 
--- 697,700 
  {   /* Add new patch number below this line */
+ /**/
+ 1604,
  /**/

-- 
hundred-and-one symptoms of being an internet addict:
113. You are asked about a bus schedule, you wonder if it is 16 or 32 bits.

 /// Bram Moolenaar -- b...@moolenaar.net -- 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 vim_dev+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/vim_dev/2023060417.D07261C0595%40moolenaar.net.


Re: test_codestyle failure

2023-06-04 Fir de Conversatie Bram Moolenaar


> > Op zo 4 jun. 2023 02:25 schreef Ernie Rael :
> >
> > Earlier today I rebased and pushed a couple patches that were last
> > pushed around a month ago (cleanly). Getting lots of test failures
> > as shown below. Is there something I need to fix?
> >
> > -ernie
> >
> > Failures:
> > From test_codestyle.vim:
> > Found errors in Test_source_files():
> > command line..script
> > /home/runner/work/vim/vim/src/testdir/runtest.vim[569]..function
> > RunTheTest[52]..Test_source_files line 40: ../evalfunc.c: missing
> > white space after "if"/"while"/"for": Expected 0 but got 642
> > command line..script
> > /home/runner/work/vim/vim/src/testdir/runtest.vim[569]..function
> > RunTheTest[52]..Test_source_files line 40: ../list.c: missing
> > white space after "if"/"while"/"for": Expected 0 but got 2340
> >
> >
> > Check line 642 in evalfunc.c and line 2340 in list.c
> 
> Doh! I psyched myself out. Given that it used to be OK, when I saw the 
> "Expected 0", I thought it was a count.

I suppose the standard error message is a bit confusing here.
I'll change it to use assert_report() with a clearer message.

-- 
Nobody will ever need more than 640 kB RAM.
-- Bill Gates, 1983
Windows 98 requires 16 MB RAM.
-- Bill Gates, 1999
Logical conclusion: Nobody will ever need Windows 98.

 /// Bram Moolenaar -- b...@moolenaar.net -- 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 vim_dev+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/vim_dev/20230604153612.A15191C0595%40moolenaar.net.


Re: LSP: cursor positioning on a multi-byte character with composing characters

2023-06-03 Fir de Conversatie Bram Moolenaar


Yegappan wrote:

> I am updating the Vim9 LSP plugin to support various position
> encodings (utf-8, utf-16 and utf-32).
> I ran into a problem with positioning the cursor on a multibyte
> character with composing characters.
> 
> The LSP plugin uses the Vim function setcursorcharpos() to position
> the cursor.  This function ignores composing characters. The LSP
> server counts the composing characters separately from
> the base character.  So when using the character index returned by the
> LSP server to
> position the cursor, the cursor is placed in an incorrect column.
> 
> e.g:
> 
> void fn(int aVar)
> {
> printf("aVar = %d\n", aVar);
> printf("𐟘Š𐟘Š𐟘Š𐟘Š = %d\n", aVar);
> printf("áb́áb́ = %d\n", aVar);
> printf("ą́ą́ą́ą́ = %d\n", aVar);
> }
> 
> I have tried this test with clangd, pyright and gopls language servers
> and all of them count the
> composing characters as separate characters.
> 
> One approach to solve this issue is to add an optional argument to the
> setcursorcharpos() function
> that either counts or ignores composing characters. The default is to
> ignore the composing
> characters.  Another approach is to add a function that computes the
> character offset ignoring the composing characters from a character
> offset that includes the composing characters.
> 
> Any suggestions?

Whether to count composing characters separately or not applies to many
functions.  Adding a flag to each function to specify how composing
characters are to be handled is going to require a lot of changes.  And
even for setcursorcharpos() I don't see a good way to add this flag.

Assuming we have the text, using a separate function to ignore composing
characters would be a separate step and a universal solution.  I suppose
it could be something like:

idx_without = charpos_dropcomposing({text}, {idx_with})

It may not be needed now, but the opposite should be possible:

idx_with = charpos_addcomposing({text}, {idx_without})

Hopefully we can think of better (shorter) names.

It can possibly already be done with a combination of byteidxcomp() and
charidx(), since these have a choice of counting composing characters or
not.  That does require two function calls though.

-- 
Corduroy pillows: They're making headlines!

 /// Bram Moolenaar -- b...@moolenaar.net -- 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 vim_dev+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/vim_dev/20230603224801.CE0581C0595%40moolenaar.net.


Patch 9.0.1603

2023-06-03 Fir de Conversatie Bram Moolenaar


Patch 9.0.1603
Problem:Display wrong when scrolling multiple lines with 'smoothscroll'
set.
Solution:   Redraw when w_skipcol changed. (closes #12477, closes #12468)
Files:  src/move.c, src/testdir/test_scroll_opt.vim,
src/testdir/dumps/Test_smooth_multi_skipcol_1.dump,
src/testdir/dumps/Test_smooth_multi_skipcol_2.dump


*** ../vim-9.0.1602/src/move.c  2023-06-03 17:11:40.789005400 +0100
--- src/move.c  2023-06-03 22:05:22.406255106 +0100
***
*** 1785,1790 
--- 1785,1791 
int width2 = width1 + curwin_col_off2();
int size = 0;
linenr_Tprev_topline = curwin->w_topline;
+   colnr_T prev_skipcol = curwin->w_skipcol;
  
if (do_sms)
size = linetabsize(curwin, curwin->w_topline);
***
*** 1847,1854 
}
}
  
!   if (curwin->w_topline == prev_topline)
!   // need to redraw even though w_topline didn't change
redraw_later(UPD_NOT_VALID);
  }
  else
--- 1848,1856 
}
}
  
!   if (curwin->w_topline == prev_topline
!   || curwin->w_skipcol != prev_skipcol)
!   // need to redraw because wl_size of the topline may now be invalid
redraw_later(UPD_NOT_VALID);
  }
  else
*** ../vim-9.0.1602/src/testdir/test_scroll_opt.vim 2023-06-03 
19:44:42.573842760 +0100
--- src/testdir/test_scroll_opt.vim 2023-06-03 21:59:16.737811644 +0100
***
*** 777,783 
call setline(14, '')
END
call writefile(lines, 'XSmoothIncsearch', 'D')
!   let buf = RunVimInTerminal('-S XSmoothIncsearch', #{rows: 8, cols:40})
  
call term_sendkeys(buf, "/b")
call VerifyScreenDump(buf, 'Test_smooth_incsearch_1', {})
--- 777,783 
call setline(14, '')
END
call writefile(lines, 'XSmoothIncsearch', 'D')
!   let buf = RunVimInTerminal('-S XSmoothIncsearch', #{rows: 8, cols: 40})
  
call term_sendkeys(buf, "/b")
call VerifyScreenDump(buf, 'Test_smooth_incsearch_1', {})
***
*** 791,795 
--- 791,817 
  
call StopVimInTerminal(buf)
  endfunc
+ 
+ " Test scrolling multiple lines and stopping at non-zero skipcol.
+ func Test_smoothscroll_multi_skipcol()
+   CheckScreendump
+ 
+   let lines =<< trim END
+   setlocal cursorline scrolloff=0 smoothscroll
+   call setline(1, repeat([''], 9))
+   call setline(3, repeat('a', 50))
+   call setline(8, 'bbb')
+   call setline(9, 'ccc')
+   redraw
+   END
+   call writefile(lines, 'XSmoothMultiSkipcol', 'D')
+   let buf = RunVimInTerminal('-S XSmoothMultiSkipcol', #{rows: 10, cols: 40})
+   call VerifyScreenDump(buf, 'Test_smooth_multi_skipcol_1', {})
+ 
+   call term_sendkeys(buf, "3\")
+   call VerifyScreenDump(buf, 'Test_smooth_multi_skipcol_2', {})
+ 
+   call StopVimInTerminal(buf)
+ endfunc
  
  " vim: shiftwidth=2 sts=2 expandtab
*** ../vim-9.0.1602/src/testdir/dumps/Test_smooth_multi_skipcol_1.dump  
2023-06-03 22:07:46.862347954 +0100
--- src/testdir/dumps/Test_smooth_multi_skipcol_1.dump  2023-06-03 
21:59:16.737811644 +0100
***
*** 0 
--- 1,10 
+ > +8&#ff0@39
+ | +0&&@39
+ |a@39
+ @10| @29
+ @40
+ @40
+ @40
+ @40
+ |b@2| @36
+ @22|1|,|0|-|1| @8|T|o|p| 
*** ../vim-9.0.1602/src/testdir/dumps/Test_smooth_multi_skipcol_2.dump  
2023-06-03 22:07:46.870347959 +0100
--- src/testdir/dumps/Test_smooth_multi_skipcol_2.dump  2023-06-03 
21:59:16.737811644 +0100
***
*** 0 
--- 1,10 
+ |<+0#4040ff13#ff0@2|a+8#000&@5>a| @29
+ | +0&&@39
+ @40
+ @40
+ @40
+ |b@2| @36
+ |c@2| @36
+ |~+0#4040ff13&| @38
+ |~| @38
+ | +0#000&@21|3|,|5|0| @9|B|o|t| 
*** ../vim-9.0.1602/src/version.c   2023-06-03 19:44:42.573842760 +0100
--- src/version.c   2023-06-03 22:02:05.786062481 +0100
***
*** 697,698 
--- 697,700 
  {   /* Add new patch number below this line */
+ /**/
+ 1603,
  /**/

-- 
hundred-and-one symptoms of being an internet addict:
111. You and your friends get together regularly on IRC, even though
 all of you live in the same street.

 /// Bram Moolenaar -- b...@moolenaar.net -- 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 

Patch 9.0.1602

2023-06-03 Fir de Conversatie Bram Moolenaar
src/testdir/dumps/Test_smooth_marker_over_double_width_2.dump   
2023-06-03 19:19:17.631718177 +0100
***
*** 0 
--- 1,6 
+ |<+0#4040ff13#ff0@2| +0#000&|口*&@6>口| +&@19
+ |~+0#4040ff13&| @38
+ |~| @38
+ |~| @38
+ |~| @38
+ | +0#000&@21|1|,|6|8|-|5|9| @6|A|l@1| 
*** ../vim-9.0.1601/src/version.c   2023-06-03 17:56:26.632203045 +0100
--- src/version.c   2023-06-03 19:42:08.210990902 +0100
***
*** 697,698 
--- 697,700 
  {   /* Add new patch number below this line */
+ /**/
+ 1602,
  /**/

-- 
hundred-and-one symptoms of being an internet addict:
108. While reading a magazine, you look for the Zoom icon for a better
 look at a photograph.

 /// Bram Moolenaar -- b...@moolenaar.net -- 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 vim_dev+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/vim_dev/20230603184546.52D531C0595%40moolenaar.net.


Patch 9.0.1601

2023-06-03 Fir de Conversatie Bram Moolenaar


Patch 9.0.1601
Problem:Filetype detection fails for *.conf file without comments.
(Dmitrii Tcyganok)
Solution:   Use "conf" filetype as a fallback for an empty .conf file.
(closes #12487, closes #12483)
Files:  runtime/filetype.vim, src/testdir/test_filetype.vim


*** ../vim-9.0.1600/runtime/filetype.vim2023-05-28 22:11:17.800701909 
+0100
--- runtime/filetype.vim2023-06-03 17:55:22.172195149 +0100
***
*** 2811,2818 
  " Generic configuration file. Use FALLBACK, it's just guessing!
  au filetypedetect BufNewFile,BufRead,StdinReadPost *
\ if !did_filetype() && expand("") !~ g:ft_ignore_pat
!   \&& (getline(1) =~ '^#' || getline(2) =~ '^#' || getline(3) =~ '^#'
!   \   || getline(4) =~ '^#' || getline(5) =~ '^#') |
\   setf FALLBACK conf |
\ endif
  
--- 2811,2820 
  " Generic configuration file. Use FALLBACK, it's just guessing!
  au filetypedetect BufNewFile,BufRead,StdinReadPost *
\ if !did_filetype() && expand("") !~ g:ft_ignore_pat
!   \&& (expand("") =~# '\.conf$'
!   \   || getline(1) =~ '^#' || getline(2) =~ '^#'
!   \   || getline(3) =~ '^#' || getline(4) =~ '^#'
!   \   || getline(5) =~ '^#') |
\   setf FALLBACK conf |
\ endif
  
*** ../vim-9.0.1600/src/testdir/test_filetype.vim   2023-05-29 
19:59:38.217805411 +0100
--- src/testdir/test_filetype.vim   2023-06-03 17:49:27.324471067 +0100
***
*** 122,128 
  cobol: ['file.cbl', 'file.cob', 'file.lib'],
  coco: ['file.atg'],
  conaryrecipe: ['file.recipe'],
! conf: ['auto.master'],
  config: ['configure.in', 'configure.ac', '/etc/hostname.file', 
'any/etc/hostname.file'],
  confini: ['/etc/pacman.conf', 'any/etc/pacman.conf', 'mpv.conf', 
'any/.aws/config', 'any/.aws/credentials', 'file.nmconnection'],
  context: ['tex/context/any/file.tex', 'file.mkii', 'file.mkiv', 
'file.mkvi', 'file.mkxl', 'file.mklx'],
--- 122,128 
  cobol: ['file.cbl', 'file.cob', 'file.lib'],
  coco: ['file.atg'],
  conaryrecipe: ['file.recipe'],
! conf: ['auto.master', 'file.conf'],
  config: ['configure.in', 'configure.ac', '/etc/hostname.file', 
'any/etc/hostname.file'],
  confini: ['/etc/pacman.conf', 'any/etc/pacman.conf', 'mpv.conf', 
'any/.aws/config', 'any/.aws/credentials', 'file.nmconnection'],
  context: ['tex/context/any/file.tex', 'file.mkii', 'file.mkiv', 
'file.mkvi', 'file.mkxl', 'file.mklx'],
*** ../vim-9.0.1600/src/version.c   2023-06-03 17:11:40.789005400 +0100
--- src/version.c   2023-06-03 17:52:48.224109504 +0100
***
*** 697,698 
--- 697,700 
  {   /* Add new patch number below this line */
+ /**/
+ 1601,
  /**/

-- 
hundred-and-one symptoms of being an internet addict:
103. When you find yourself in the "Computer" section of Barnes & Noble
 enjoying yourself.

 /// Bram Moolenaar -- b...@moolenaar.net -- 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 vim_dev+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/vim_dev/20230603165804.C08AB1C0595%40moolenaar.net.


Patch 9.0.1600

2023-06-03 Fir de Conversatie Bram Moolenaar


Patch 9.0.1600
Problem:screenpos() does not take w_skipcol into account.
Solution:   Subtract w_skipcol from column. (closes #12486, closes #12476)
Files:  src/move.c, src/testdir/test_cursor_func.vim


*** ../vim-9.0.1599/src/move.c  2023-06-01 19:26:23.435627545 +0100
--- src/move.c  2023-06-03 16:37:52.429066161 +0100
***
*** 1479,1484 
--- 1479,1487 
col += off;
width = wp->w_width - off + win_col_off2(wp);
  
+   if (pos->lnum == wp->w_topline)
+   col -= wp->w_skipcol;
+ 
// long line wrapping, adjust row
if (wp->w_p_wrap
&& col >= (colnr_T)wp->w_width
*** ../vim-9.0.1599/src/testdir/test_cursor_func.vim2022-12-18 
12:28:54.334332509 +
--- src/testdir/test_cursor_func.vim2023-06-03 17:09:35.949150162 +0100
***
*** 127,133 
\ 'curscol': wincol + 7,
\ 'endcol': wincol + 7}, winid->screenpos(line('$'), 8))
call assert_equal({'row': 0, 'col': 0, 'curscol': 0, 'endcol': 0},
! \ winid->screenpos(line('$'), 22))
  
close
call assert_equal({}, screenpos(999, 1, 1))
--- 127,166 
\ 'curscol': wincol + 7,
\ 'endcol': wincol + 7}, winid->screenpos(line('$'), 8))
call assert_equal({'row': 0, 'col': 0, 'curscol': 0, 'endcol': 0},
!   \ winid->screenpos(line('$'), 22))
! 
!   1split
!   normal G$
!   redraw
!   call assert_equal({'row': winrow + 0,
!   \ 'col': wincol + 20 - 1,
!   \ 'curscol': wincol + 20 - 1,
!   \ 'endcol': wincol + 20 - 1},
!   \ screenpos(win_getid(), line('.'), col('.')))
! 
!   " w_skipcol should be subtracted
!   setlocal nowrap
!   normal 050zl$
!   call assert_equal({'row': winrow + 0,
!   \ 'col': wincol + 10 - 1,
!   \ 'curscol': wincol + 10 - 1,
!   \ 'endcol': wincol + 10 - 1},
!   \ screenpos(win_getid(), line('.'), col('.')))
! 
!   " w_skipcol should only matter for the topline
! " FIXME: This fails because pline_m_win() does not take w_skipcol into
! " account.  If it does, then other tests fail.
! "  wincmd +
! "  setlocal wrap smoothscroll
! "  call setline(line('$') + 1, 'last line')
! "  exe "normal \G$"
! "  redraw
! "  call assert_equal({'row': winrow + 1,
! " \ 'col': wincol + 9 - 1,
! " \ 'curscol': wincol + 9 - 1,
! " \ 'endcol': wincol + 9 - 1},
! " \ screenpos(win_getid(), line('.'), col('.')))
!   close
  
close
call assert_equal({}, screenpos(999, 1, 1))
*** ../vim-9.0.1599/src/version.c   2023-06-02 14:16:31.911127060 +0100
--- src/version.c   2023-06-03 15:52:51.189041376 +0100
***
*** 697,698 
--- 697,700 
  {   /* Add new patch number below this line */
+ /**/
+ 1600,
  /**/

-- 
A meeting is an event at which the minutes are kept and the hours are lost.

 /// Bram Moolenaar -- b...@moolenaar.net -- 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 vim_dev+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/vim_dev/20230603161254.A00231C0595%40moolenaar.net.


Re: [vim/vim] add set pathignore+= feature like wildignore but to prevent the find at all in some directories (Issue #12482)

2023-06-03 Fir de Conversatie Bram Moolenaar


> FWIW, I find the whitelisting approach detailed in the linked gist
> both elegant (this is rare in Vimland) and effective, so I don't think
> this would be needed.

Right, using 'wildignore' for this should just work.

It appears the remaining issue is performance.  Currently when
'wildignore' contains something like "*/.git/*" then all files in and
below a ".git" directory will be discarded.  But the search in this
directory still happens, and can take quite a bit of time.

Without changing the options, the implementation could check for
encountering a directory which will have all matches discarded by
'wildignore' and do not scan that directory.  This needs to be done
carefully.  And avoiding expanding matches into a full path and
compiling the patterns in 'wildignore' when no match is possible,
otherwise we make other cases slower.


-- 
Contrary to popular belief, Unix is user friendly.
It just happens to be selective about who it makes friends with.
   -- Dave Parnas

 /// Bram Moolenaar -- b...@moolenaar.net -- 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 vim_dev+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/vim_dev/20230603115419.196AF1C0595%40moolenaar.net.


Re: Syntax highlighting performance adversely affected by inefficient use of in_id_list()

2023-06-02 Fir de Conversatie Bram Moolenaar


Brett Stahlman wrote:

> Some time ago, while testing various configurations of a plugin that makes 
> very heavy use of syntax regions, I noticed that in certain configurations, 
> redraws were timing out after the default 2 second 'redrawtime'. In an 
> attempt to understand why, I profiled Vim and discovered that much of the 
> time was spent in the in_id_list() function, which was called over 115 
> million times in the space of a few seconds. Shocked that any function 
> could need to be called so frequently, I began digging around in the
> Vim source to understand what was happening. What I discovered was
> that in_id_list() is used in a very inefficient strategy for finding
> all syntax groups in the current group's 'contains' or 'nextgroup'
> list. The calls are made within syn_current_attr() in a loop over
> *all* syntax items, and because  in_id_list() performs a linear search
> of the 'contains' or 'nextgroup' list for each iteration of this outer
> loop, the cost of the algorithm is O(M x N), where M is the number of
> defined syntax items, and N is the size of the current item's
> 'contains' or 'nextgroup' list. Moreover, this nested loop is executed
> each time the current syntax item changes, so buffers with lots of
> syntax regions in a small screen area will be hit especially hard.

[...]

Thanks for looking into this.  Although your use case appears to be very
specific.  I was planning on taking another look at syntax highlighting
mechanisms, but several other things will come first, thus it might be a
while before I get to it.  That is going to be in the context of ideas
to use treesitter and TextMate.  After making changes for that
performance probably has to be tuned again.

The syntax engine is very complex.  Making changes always has the risk
of introducing bugs.  There is not that much testing at the moment.
Ideally every syntax plugin comes with at least a minimal test.  I know
some authors have their own tests, which is fine to check the plugin
before sending out a new version.  But it is not useful for checking the
implementation.  Also, every author has to reinvent the wheel.

It would be very helpful to start by adding a few syntax plugin tests,
with a generic way to do this.  Once we have the setup and a few
examples, we can ask others to create more tests.  Using screendump
tests would be the simplest and most comprehensive.  But executing them
would be a bit slow.  We can run them separately from "make test" to
avoid slowing everything down.  The indent tests can function as a rough
example, have a "syntax.ext" file as input and a "syntax_ext.dump" file
as a reference output.  Something has to be added for variants with
settings.

Once we have some number of tests like this I would feel more confident
in changing the code to optimize for performance.  The tests could also
output timing to be able to compare before/after performance.  Comparing
times only works locally, since every setup is different.

-- 
hundred-and-one symptoms of being an internet addict:
96. On Super Bowl Sunday, you followed the score by going to the
Yahoo main page instead of turning on the TV.

 /// Bram Moolenaar -- b...@moolenaar.net -- 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 vim_dev+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/vim_dev/20230602191305.BBEBF1C0C30%40moolenaar.net.


Patch 9.0.1599

2023-06-02 Fir de Conversatie Bram Moolenaar
p->w_cursor.lnum = lnum;
}
else if (wp == curwin)
***
*** 6835,6866 
  static void
  win_fix_cursor(int normal)
  {
- long  so = get_scrolloff_value();
  win_T *wp = curwin;
- linenr_T  nlnum = 0;
- linenr_T  lnum = wp->w_cursor.lnum;
- linenr_T  bot;
- linenr_T  top;
  
! if (wp->w_buffer->b_ml.ml_line_count < wp->w_height)
!   return;
! if (skip_win_fix_cursor)
return;
  
  // Determine valid cursor range.
! so = MIN(wp->w_height / 2, so);
  wp->w_cursor.lnum = wp->w_topline;
! top = cursor_down_inner(wp, so);
  wp->w_cursor.lnum = wp->w_botline - 1;
! bot = cursor_up_inner(wp, so);
  wp->w_cursor.lnum = lnum;
  // Check if cursor position is above or below valid cursor range.
  if (lnum > bot && (wp->w_botline - wp->w_buffer->b_ml.ml_line_count) != 1)
nlnum = bot;
  else if (lnum < top && wp->w_topline != 1)
nlnum = (so == wp->w_height / 2) ? bot : top;
  
! if (nlnum)  // Cursor is invalid for current scroll position.
  {
if (normal)  // Save to jumplist and set cursor to avoid scrolling.
{
--- 6837,6869 
  static void
  win_fix_cursor(int normal)
  {
  win_T *wp = curwin;
  
! if (skip_win_fix_cursor || wp->w_buffer->b_ml.ml_line_count < 
wp->w_height)
return;
  
  // Determine valid cursor range.
! long so = MIN(wp->w_height / 2, get_scrolloff_value());
! linenr_T lnum = wp->w_cursor.lnum;
! 
  wp->w_cursor.lnum = wp->w_topline;
! cursor_down_inner(wp, so);
! linenr_T top = wp->w_cursor.lnum;
! 
  wp->w_cursor.lnum = wp->w_botline - 1;
! cursor_up_inner(wp, so);
! linenr_T bot = wp->w_cursor.lnum;
! 
  wp->w_cursor.lnum = lnum;
+ 
  // Check if cursor position is above or below valid cursor range.
+ linenr_T nlnum = 0;
  if (lnum > bot && (wp->w_botline - wp->w_buffer->b_ml.ml_line_count) != 1)
nlnum = bot;
  else if (lnum < top && wp->w_topline != 1)
nlnum = (so == wp->w_height / 2) ? bot : top;
  
! if (nlnum != 0)  // Cursor is invalid for current scroll position.
  {
if (normal)  // Save to jumplist and set cursor to avoid scrolling.
{
*** ../vim-9.0.1598/src/testdir/test_window_cmd.vim 2023-05-06 
12:53:33.711345001 +0100
--- src/testdir/test_window_cmd.vim 2023-06-02 14:16:08.579164110 +0100
***
*** 1819,1827 
  
  func Test_splitkeep_misc()
set splitkeep=screen
-   set splitbelow
  
call setline(1, range(1, &lines))
norm Gzz
let top = line('w0')
" No scroll when aucmd_win is opened
--- 1819,1838 
  
  func Test_splitkeep_misc()
set splitkeep=screen
  
call setline(1, range(1, &lines))
+   " Cursor is adjusted to start and end of buffer
+   norm M
+   wincmd s
+   resize 1
+   call assert_equal(1, line('.'))
+   wincmd j
+   norm GM
+   resize 1
+   call assert_equal(&lines, line('.'))
+   only!
+ 
+   set splitbelow
norm Gzz
let top = line('w0')
" No scroll when aucmd_win is opened
*** ../vim-9.0.1598/src/version.c   2023-06-01 20:26:52.064180242 +0100
--- src/version.c   2023-06-02 14:14:29.471321762 +0100
***
*** 697,698 
--- 697,700 
  {   /* Add new patch number below this line */
+ /**/
+ 1599,
  /**/

-- 
hundred-and-one symptoms of being an internet addict:
93. New mail alarm on your palmtop annoys other churchgoers.

 /// Bram Moolenaar -- b...@moolenaar.net -- 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 vim_dev+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/vim_dev/20230602131704.58A891C0916%40moolenaar.net.


Patch 9.0.1598

2023-06-01 Fir de Conversatie Bram Moolenaar
een_getbytes(int row, int col, char_u *bytes, int *attrp)
***
*** 1212,1218 
return;
  
  off = LineOffset[row] + col;
! *attrp = ScreenAttrs[off];
  bytes[0] = ScreenLines[off];
  bytes[1] = NUL;
  
--- 1213,1220 
return;
  
  off = LineOffset[row] + col;
! if (attrp != NULL)
!   *attrp = ScreenAttrs[off];
  bytes[0] = ScreenLines[off];
  bytes[1] = NUL;
  
*** ../vim-9.0.1597/src/testdir/test_functions.vim  2023-05-24 
21:02:20.489162125 +0100
--- src/testdir/test_functions.vim  2023-06-01 20:17:49.89396 +0100
***
*** 3217,3222 
--- 3217,3247 
call assert_equal(-1, screenattr(-1, -1))
call assert_equal(-1, screenchar(-1, -1))
call assert_equal([], screenchars(-1, -1))
+ 
+   " Run this in a separate Vim instance to avoid messing up.
+   let after =<< trim [CODE]
+ scriptencoding utf-8
+ call setline(1, '口')
+ redraw
+ call assert_equal(0, screenattr(1, 1))
+ call assert_equal(char2nr('口'), screenchar(1, 1))
+ call assert_equal([char2nr('口')], screenchars(1, 1))
+ call assert_equal('口', screenstring(1, 1))
+ call writefile(v:errors, 'Xresult')
+ qall!
+   [CODE]
+ 
+   let encodings = ['utf-8', 'cp932', 'cp936', 'cp949', 'cp950']
+   if !has('win32')
+ let encodings += ['euc-jp']
+   endif
+   for enc in encodings
+ let msg = 'enc=' .. enc
+ if RunVim([], after, $'--clean --cmd "set encoding={enc}"')
+   call assert_equal([], readfile('Xresult'), msg)
+ endif
+ call delete('Xresult')
+   endfor
  endfunc
  
  " Test for getcurpos() and setpos()
*** ../vim-9.0.1597/src/testdir/test_utf8.vim   2023-05-08 15:31:34.251545087 
+0100
--- src/testdir/test_utf8.vim   2023-06-01 20:17:49.89396 +0100
***
*** 135,140 
--- 135,153 
call assert_equal("B", screenstring(1, 2))
call assert_equal("C\u0308", screenstring(1, 3))
  
+   " 1-cell, with 6 composing characters
+   set maxcombine=6
+   call setline(1, ["ABC" .. repeat("\u0308", 6)])
+   redraw
+   call assert_equal([0x0041], screenchars(1, 1))
+   call assert_equal([0x0042], 1->screenchars(2))
+   " This should not use uninitialized memory
+   call assert_equal([0x0043] + repeat([0x0308], 6), screenchars(1, 3))
+   call assert_equal("A", screenstring(1, 1))
+   call assert_equal("B", screenstring(1, 2))
+   call assert_equal("C" .. repeat("\u0308", 6), screenstring(1, 3))
+   set maxcombine&
+ 
    " 2-cells, with composing characters
let text = "\u3042\u3044\u3046\u3099"
call setline(1, text)
*** ../vim-9.0.1597/src/version.c   2023-06-01 19:26:23.435627545 +0100
--- src/version.c   2023-06-01 20:16:22.041494837 +0100
***
*** 697,698 
--- 697,700 
  {   /* Add new patch number below this line */
+ /**/
+ 1598,
  /**/

-- 
>From "know your smileys":
 C=}>;*{)) Drunk, devilish chef with a toupee in an updraft,
   a mustache, and a double chin

 /// Bram Moolenaar -- b...@moolenaar.net -- 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 vim_dev+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/vim_dev/20230601192724.921D71C1B27%40moolenaar.net.


Patch 9.0.1597

2023-06-01 Fir de Conversatie Bram Moolenaar


Patch 9.0.1597
Problem:Cursor ends up below the window after a put.
Solution:   Mark w_crow and w_botline invalid when changing the cursor line.
(closes #12465)
Files:  src/eval.c, src/move.c, src/register.c, src/testdir/test_put.vim,
src/testdir/dumps/Test_put_in_last_displayed_line_1.dump


*** ../vim-9.0.1596/src/eval.c  2023-05-19 19:01:13.292413300 +0100
--- src/eval.c  2023-06-01 19:23:13.048692262 +0100
***
*** 6322,6327 
--- 6322,6331 
  
  if (name[0] == 'w' && dollar_lnum)
  {
+   // the "w_valid" flags are not reset when moving the cursor, but they
+   // do matter for update_topline() and validate_botline().
+   check_cursor_moved(curwin);
+ 
pos.col = 0;
if (name[1] == '0') // "w0": first visible line
{
*** ../vim-9.0.1596/src/move.c  2023-05-19 14:04:23.133885852 +0100
--- src/move.c  2023-06-01 19:23:33.008570939 +0100
***
*** 715,733 
  /*
   * Call this function when the length of the cursor line (in screen
   * characters) has changed, and the change is before the cursor.
   * Need to take care of w_botline separately!
   */
  void
  changed_cline_bef_curs(void)
  {
! curwin->w_valid &= ~(VALID_WROW|VALID_WCOL|VALID_VIRTCOL
|VALID_CHEIGHT|VALID_TOPLINE);
  }
  
  void
  changed_cline_bef_curs_win(win_T *wp)
  {
! wp->w_valid &= ~(VALID_WROW|VALID_WCOL|VALID_VIRTCOL
|VALID_CHEIGHT|VALID_TOPLINE);
  }
  
--- 715,735 
  /*
   * Call this function when the length of the cursor line (in screen
   * characters) has changed, and the change is before the cursor.
+  * If the line length changed the number of screen lines might change,
+  * requiring updating w_topline.  That may also invalidate w_crow.
   * Need to take care of w_botline separately!
   */
  void
  changed_cline_bef_curs(void)
  {
! curwin->w_valid &= ~(VALID_WROW|VALID_WCOL|VALID_VIRTCOL|VALID_CROW
|VALID_CHEIGHT|VALID_TOPLINE);
  }
  
  void
  changed_cline_bef_curs_win(win_T *wp)
  {
! wp->w_valid &= ~(VALID_WROW|VALID_WCOL|VALID_VIRTCOL|VALID_CROW
|VALID_CHEIGHT|VALID_TOPLINE);
  }
  
*** ../vim-9.0.1596/src/register.c  2023-05-09 17:09:25.657491200 +0100
--- src/register.c  2023-06-01 19:25:30.523904258 +0100
***
*** 2098,2103 
--- 2098,2104 
{
// make sure curwin->w_virtcol is updated
changed_cline_bef_curs();
+   invalidate_botline();
curwin->w_cursor.col += (colnr_T)(totlen - 1);
}
if (VIsual_active)
*** ../vim-9.0.1596/src/testdir/test_put.vim2023-04-22 15:35:08.857815545 
+0100
--- src/testdir/test_put.vim2023-06-01 19:18:06.346953669 +0100
***
*** 262,266 
--- 262,284 
call StopVimInTerminal(buf)
  endfunc
  
+ func Test_put_in_last_displayed_line()
+   CheckRunVimInTerminal
+ 
+   let lines =<< trim END
+   vim9script
+   autocmd CursorMoved * eval line('w$')
+   @a = 'x'->repeat(&columns * 2 - 2)
+   range(&lines)->setline(1)
+   feedkeys('G"ap')
+   END
+   call writefile(lines, 'Xtest_put_last_line', 'D')
+   let buf = RunVimInTerminal('-S Xtest_put_last_line', #{rows: 10})
+ 
+   call VerifyScreenDump(buf, 'Test_put_in_last_displayed_line_1', {})
+ 
+   call StopVimInTerminal(buf)
+ endfunc
+ 
  
  " vim: shiftwidth=2 sts=2 expandtab
*** ../vim-9.0.1596/src/testdir/dumps/Test_put_in_last_displayed_line_1.dump
2023-06-01 19:25:52.255789000 +0100
--- src/testdir/dumps/Test_put_in_last_displayed_line_1.dump2023-06-01 
19:18:54.082543033 +0100
***
*** 0 
--- 1,10 
+ |2+0&#ff0| @73
+ |3| @73
+ |4| @73
+ |5| @73
+ |6| @73
+ |7| @73
+ |8| @73
+ |9|x@73
+ @73>x| 
+ @57|1|0|,|1|4|9| @7|B|o|t| 
*** ../vim-9.0.1596/src/version.c   2023-06-01 12:45:15.875667908 +0100
--- src/version.c   2023-06-01 19:18:40.114660538 +0100
***
*** 697,698 
--- 697,700 
  {   /* Add new patch number below this line */
+ /**/
+ 1597,
  /**/

-- 
>From "know your smileys":
 :-| :-|   Deja' vu!

 /// Bram Moolenaar -- b...@moolenaar.net -- 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 t

Patch 9.0.1596

2023-06-01 Fir de Conversatie Bram Moolenaar


Patch 9.0.1596
Problem::registers command does not work in sandbox.
Solution:   Add flag to the command. (closes #12473)
Files:  src/ex_cmds.h, src/testdir/test_registers.vim


*** ../vim-9.0.1595/src/ex_cmds.h   2023-01-27 13:16:14.670850401 +
--- src/ex_cmds.h   2023-06-01 12:41:07.447910816 +0100
***
*** 1286,1292 
EX_TRLBAR|EX_CMDWIN|EX_LOCK_OK,
ADDR_NONE),
  EXCMD(CMD_registers,  "registers",ex_display,
!   EX_EXTRA|EX_NOTRLCOM|EX_TRLBAR|EX_CMDWIN|EX_LOCK_OK,
ADDR_NONE),
  EXCMD(CMD_resize, "resize",   ex_resize,
EX_RANGE|EX_TRLBAR|EX_WORD1|EX_CMDWIN|EX_LOCK_OK,
--- 1286,1292 
EX_TRLBAR|EX_CMDWIN|EX_LOCK_OK,
ADDR_NONE),
  EXCMD(CMD_registers,  "registers",ex_display,
!   EX_EXTRA|EX_NOTRLCOM|EX_TRLBAR|EX_SBOXOK|EX_CMDWIN|EX_LOCK_OK,
ADDR_NONE),
  EXCMD(CMD_resize, "resize",   ex_resize,
EX_RANGE|EX_TRLBAR|EX_WORD1|EX_CMDWIN|EX_LOCK_OK,
*** ../vim-9.0.1595/src/testdir/test_registers.vim  2023-05-09 
17:09:25.657491200 +0100
--- src/testdir/test_registers.vim  2023-06-01 11:54:09.823182365 +0100
***
*** 51,58 
  call feedkeys("i\=2*4\n\")
  call feedkeys(":ls\n", 'xt')
  
! let a = execute('display')
! let b = execute('registers')
  
  call assert_equal(a, b)
  call assert_match('^\nType Name Content\n'
--- 51,59 
  call feedkeys("i\=2*4\n\")
  call feedkeys(":ls\n", 'xt')
  
! " these commands work in the sandbox
! let a = execute('sandbox display')
! let b = execute('sandbox registers')
  
  call assert_equal(a, b)
  call assert_match('^\nType Name Content\n'
*** ../vim-9.0.1595/src/version.c   2023-05-31 18:57:10.513953154 +0100
--- src/version.c   2023-06-01 12:42:43.623812020 +0100
***
*** 697,698 
--- 697,700 
  {   /* Add new patch number below this line */
+ /**/
+     1596,
  /**/

-- 
I AM THANKFUL...
...for a lawn that needs mowing, windows that need cleaning
and gutters that need fixing because it means I have a home.

 /// Bram Moolenaar -- b...@moolenaar.net -- 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 vim_dev+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/vim_dev/20230601114732.F2A0D1C1B32%40moolenaar.net.


  1   2   3   4   5   6   7   8   9   10   >