Compare commits

...

12 Commits

Author SHA1 Message Date
Christian Brabandt
c9a4a8ab28 patch 9.0.1663: Termdebug on MS-Windows: some file names are not recognized
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)
2023-06-24 20:02:25 +01:00
Bram Moolenaar
4e2406c7a9 patch 9.0.1662: crash when using a class member twice
Problem:    Crash when using a class member twice. (Christian J. Robinson)
Solution:   Make a copy of the value.
2023-06-24 19:22:21 +01:00
Son Luong Ngoc
b46e0f3263 patch 9.0.1661: BUCK files are not recognized
Problem:    BUCK files are not recognized.
Solution:   Recognize BUCK files as "bzl". (Son Luong Ngoc, closes #12564)
2023-06-24 17:11:04 +01:00
Yegappan Lakshmanan
2d8e998544 patch 9.0.1660: error for using matchfuzzy() returning a list of dicts
Problem:    Error for using matchfuzzy() in Vim9 script returning a list of
            dicts.
Solution:   Make return type of matchfuzzy() list<any>. (Yegappan Lakshmanan,
            closes #12574)
2023-06-24 16:42:25 +01:00
Christian Brabandt
279de0cd1f patch 9.0.1659: Termdebug: default highlight cleared if changing colorscheme
Problem:    Termdebug: default highlight cleared when changing colorscheme.
Solution:   Use a ColorScheme autocommand. (Christian Brabandt, closes #12566,
            closes #12555)
2023-06-24 14:20:36 +01:00
Christian Brabandt
c8b6d4b378 patch 9.0.1658: autoload files for "zig" are not installed
Problem:    Autoload files for "zig" are not installed.
Solution:   Add install and uninstall rules in the makefile. (Christian
            Brabandt, closes #12577, closes #12567)
2023-06-24 13:30:04 +01:00
Bram Moolenaar
79186bee78 patch 9.0.1657: one more syntax test depends on the system
Problem:    One more syntax test depends on the system.
Solution:   Use "dash" instead of "sh".
2023-06-24 01:35:51 +01:00
Bram Moolenaar
7d0dbd0070 patch 9.0.1656: syntax test fails when detected shell type differs
Problem:    Syntax test fails when detected shell type differs.
Solution:   Avoid using "/bin/sh", it depends on the system.  Add a check that
            the shell type detection is correct.
2023-06-24 00:56:50 +01:00
Bram Moolenaar
2f43ec9363 patch 9.0.1655: syntax test fails when Vim window is not tall enough
Problem:    Syntax test fails when Vim window is not tall enough.
Solution:   Make sure each terminal window is closed.
2023-06-23 22:59:26 +01:00
Bram Moolenaar
813b7a85f2 patch 9.0.1654: MS-Windows: test for default 'viewdir' fails
Problem:    MS-Windows: test for default 'viewdir' fails.
Solution:   Escape the pattern.
2023-06-23 22:56:47 +01:00
Christian Brabandt
b8b1c8ebd4 patch 9.0.1653: Amiga: default 'viewdir' may not work
Problem:    Amiga: default 'viewdir' may not work.
Solution:   Use "home:" instead of "$VIM". Add a test. (Christian Brabandt,
            closes #12576)
2023-06-23 22:23:01 +01:00
Bram Moolenaar
bd32e8ad8d patch 9.0.1652: unclear why syntax test fails on Mac
Problem:    Unclear why syntax test fails on Mac.
Solution:   Echo v:errors when it's not empty.
2023-06-23 21:36:31 +01:00
30 changed files with 210 additions and 59 deletions

View File

@@ -8912,9 +8912,9 @@ A jump table for the options with a short description can be found at |Q_op|.
displayed when 'verbosefile' is set.
*'viewdir'* *'vdir'*
'viewdir' 'vdir' string (default for Amiga "$VIM/vimfiles/view",
'viewdir' 'vdir' string (default for Amiga "home:vimfiles/view",
for Win32: "$HOME/vimfiles/view",
for Unix: "~/.vim/view",
for Unix: "$HOME/.vim/view",
for macOS: "$VIM/vimfiles/view"
for VMS: "sys$login:vimfiles/view")
global

View File

@@ -266,11 +266,11 @@ au BufNewFile,BufRead */etc/blkid.tab,*/etc/blkid.tab.old setf xml
" BSDL
au BufNewFile,BufRead *.bsd,*.bsdl setf bsdl
" Bazel (http://bazel.io)
" 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 further below.
autocmd BufRead,BufNewFile *.BUILD,BUILD setf bzl
" 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,9 +2605,9 @@ au BufNewFile,BufRead *asterisk*/*voicemail.conf* call s:StarSetf('asteriskvm')
" Bazaar version control
au BufNewFile,BufRead bzr_log.* setf bzr
" Bazel build file
" Bazel and Buck2 build file
if !has("fname_case")
au BufNewFile,BufRead *.BUILD,BUILD setf bzl
au BufNewFile,BufRead *.BUILD,BUILD,BUCK setf bzl
endif
" BIND zone

View File

@@ -2,7 +2,7 @@
"
" Author: Bram Moolenaar
" Copyright: Vim license applies, see ":help license"
" Last Change: 2022 Nov 10
" 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,6 +81,8 @@ func s:Breakpoint2SignNumber(id, subid)
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,9 +92,21 @@ func s:Highlight(init, old, new)
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
" 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()
@@ -588,14 +602,14 @@ func s:GdbOutCallback(channel, text)
return
endif
if a:text =~ '^\^error,msg='
let text = s:DecodeMessage(a:text[11:])
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:])
let text = s:DecodeMessage(a:text[1:], v:false)
else
call s:CommOutput(a:channel, a:text)
return
@@ -611,21 +625,20 @@ func s:GdbOutCallback(channel, text)
call win_gotoid(curwinid)
endfunc
" Decode a message from gdb. quotedText starts with a ", return the text up
" 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
" - 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)
func s:DecodeMessage(quotedText, literal)
if a:quotedText[0] != '"'
echoerr 'DecodeMessage(): missing quote in ' . a:quotedText
return
endif
return a:quotedText
\ ->substitute('^"\|".*\|\\n', '', 'g')
\ ->substitute('\\t', "\t", 'g')
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')
@@ -637,6 +650,13 @@ func s:DecodeMessage(quotedText)
" \ ->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'
@@ -645,7 +665,7 @@ func s:GetFullname(msg)
if a:msg !~ 'fullname'
return ''
endif
let name = s:DecodeMessage(substitute(a:msg, '.*fullname=', '', ''))
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')
@@ -658,7 +678,7 @@ func s:GetAsmAddr(msg)
if a:msg !~ 'addr='
return ''
endif
let addr = s:DecodeMessage(substitute(a:msg, '.*addr=', '', ''))
let addr = s:DecodeMessage(substitute(a:msg, '.*addr=', '', ''), v:false)
return addr
endfunc
@@ -1522,5 +1542,8 @@ func s:BufUnloaded()
endfor
endfunc
call s:InitHighlight()
call s:InitAutocmd()
let &cpo = s:keepcpo
unlet s:keepcpo

View File

@@ -1,4 +1,4 @@
>#+0#0000e05#ffffff0|!| |/|b|i|n|/|s|h| +0#0000000&@64
>#+0#0000e05#ffffff0|!| |/|b|i|n|/|d|a|s|h| +0#0000000&@62
|e+0#af5f00255&|x|p|o|r|t| +0#0000000&|`+0#e000e06&|e+0#af5f00255&|c|h|o| +0#e000002&|'+0#af5f00255&|A+0#e000002&|=|B|'+0#af5f00255&|`+0#e000e06&| +0#0000000&@55
|p+0#af5f00255&|r|i|n|t|e|n|v| +0#0000000&|A| @64
|e+0#af5f00255&|c|h|o| +0#e000002&|a| |`+0#e000e06&|#+0#0000e05&|f|o@1|`+0#e000e06&| +0#0000000&|b| @59
@@ -17,4 +17,4 @@
|~| @73
|~| @73
|~| @73
|"+0#0000000&|i|n|p|u|t|/|s|h|_|0|1|.|s|h|"| |4|L|,| |5|8|B| @32|1|,|1| @10|A|l@1|
|i+0#0000000&|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|

View File

@@ -1,4 +1,4 @@
|#+0#0000e05#ffffff0|!| |/|b|i|n|/|s|h| +0#0000000&@64
|#+0#0000e05#ffffff0|!| |/|b|i|n|/|d|a|s|h| +0#0000000&@62
|e+0#af5f00255&|x|p|o|r|t| +0#0000000&|`+0#e000e06&|e+0#af5f00255&|c|h|o| +0#e000002&|'+0#af5f00255&|A+0#e000002&|=|B|'+0#af5f00255&|`+0#e000e06&| +0#0000000&@55
|p+0#af5f00255&|r|i|n|t|e|n|v| +0#0000000&|A| @64
>e+0#af5f00255&|c|h|o| +0#e000002&|a| |`+0#e000e06&|#+0#0000e05&|f|o@1|`+0#e000e06&| +0#0000000&|b| @59
@@ -17,4 +17,4 @@
|~| @73
|~| @73
|~| @73
|"+0#0000000&|i|n|p|u|t|/|s|h|_|0|1|.|s|h|"| |4|L|,| |5|8|B| @32|4|,|1| @10|A|l@1|
|:+0#0000000&|r|e|d|r|a|w| @49|4|,|1| @10|A|l@1|

View File

@@ -17,4 +17,4 @@
|#+0#0000e05&| |J|u|l| |2|6|,| |2|0|1|8|:| |w|h|y| |i|s|n|'|t| |`|.@1|`| |b|e|i|n|g| |t|e|r|m|i|n|a|t|e|d| |p|r|o|p|e|r|l|y|?| +0#0000000&@17
|#+0#0000e05&| |c|o|m@1|e|n|t| +0#0000000&@65
|c+0#af5f00255&|a|s|e| +0#0000000&|"+0#af5f00255&|$+0#e000e06&|a@2|"+0#af5f00255&| +0#0000000&|i+0#af5f00255&|n| +0#0000000&@60
|"|i|n|p|u|t|/|s|h|_|0|2|.|s|h|"| |3|0|L|,| |4|9|7|B| @30|1|,|1| @10|T|o|p|
|i|s|_|k|o|r|n|s|h|e|l@1|:| |1|,| @40|1|,|1| @10|T|o|p|

View File

@@ -17,4 +17,4 @@
|a|s| |w|e|l@1| |a|s| |b|a|s|h| +0#0000000&@59
|V+0#00e0e07&|a|r|i|a|b|l|e|=+0#0000000&|$+0#e000e06&|{|V|a|r|i|a|b|l|e|B|:+0#af5f00255&|-|$+0#e000e06&|{|V|a|r|i|a|b|l|e|C|:+0#af5f00255&|-|e+0#0000000&|n|g|}+0#e000e06&@1| +0#0000000&@7|#+0#0000e05&| |:|-| |i|s| |k|s|h| |a|n|d| |b|a|s|h| +0#0000000&@6
@75
|"|i|n|p|u|t|/|s|h|_|0|3|.|s|h|"| |3@1|L|,| |9|7|1|B| @30|1|,|1| @10|T|o|p|
|i|s|_|k|o|r|n|s|h|e|l@1|:| |1|,| @40|1|,|1| @10|T|o|p|

View File

@@ -1,4 +1,4 @@
>#+0#0000e05#ffffff0|!|/|b|i|n|/|s|h| +0#0000000&@65
>#+0#0000e05#ffffff0|!|/|b|i|n|/|d|a|s|h| +0#0000000&@63
|#+0#0000e05&| |s|h|4| +0#0000000&@69
|V+0#00e0e07&|a|r|i|a|b|l|e|=+0#0000000&|$+0#e000e06&|{|V|a|r|i|a|b|l|e|B|:+0#af5f00255&|-|{+0#0000000&|V|a|r|i|a|b|l|e|C|}|}+0#e000e06&| +0#0000000&@40
|V+0#00e0e07&|a|r|i|a|b|l|e|=+0#0000000&|$+0#e000e06&|{|V|a|r|i|a|b|l|e|B|:+0#af5f00255&|-|$+0#e000e06&|{|V|a|r|i|a|b|l|e|C|:+0#af5f00255&|-|{+0#0000000&|V|a|r|3|:|=|e|n|g|}|}+0#e000e06&@1| +0#0000000&@26
@@ -17,4 +17,4 @@
|:+0#0000e05&| +0#0000000&|$+0#e000e06&|{|V|a|r|i|a|b|l|e|B|:+0#af5f00255&|-|$+0#e000e06&|{|V|a|r|i|a|b|l|e|C|:+0#af5f00255&|-|{+0#0000000&|V|a|r|3|:|=|e|n|g|}|}+0#e000e06&@1| +0#0000000&@33
|:+0#0000e05&| +0#0000000&|$+0#e000e06&|{|V|a|r|i|a|b|l|e|B|:+0#af5f00255&|=|$+0#e000e06&|{|V|a|r|i|a|b|l|e|C|:+0#af5f00255&|=|{+0#0000000&|V|a|r|3|:|=|$+0#e000e06&|{|V|a|r|4|:+0#af5f00255&|-|e+0#0000000&|n|g|}+0#e000e06&|}+0#0000000&|}+0#e000e06&@1| +0#0000000&@24
@75
|"|i|n|p|u|t|/|s|h|_|0|4|.|s|h|"| |2|7|L|,| |9|4|0|B| @30|1|,|1| @10|T|o|p|
|i|s|_|d|a|s|h|:| |1|,| |i|s|_|p|o|s|i|x|:| |1|,| |i|s|_|s|h|:| |1|,| @22|1|,|1| @10|T|o|p|

View File

@@ -1,4 +1,4 @@
>#+0#0000e05#ffffff0|!|/|b|i|n|/|s|h| |-|x| +0#0000000&@62
>#+0#0000e05#ffffff0|!|/|b|i|n|/|d|a|s|h| |-|x| +0#0000000&@60
|#+0#0000e05&| |s|h|5| +0#0000000&@69
|#+0#0000e05&| |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#0000000&@6
|#+0#0000e05&| |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#0000000&@6
@@ -17,4 +17,4 @@
|V+0#00e0e07&|a|r|i|a|b|l|e|1|=+0#0000000&|$+0#e000e06&|H|O|M|E| +0#0000000&@59
|V+0#00e0e07&|a|r|i|a|b|l|e|2|=+0#0000000&|'+0#af5f00255&|$+0#e000002&|H|O|M|E|'+0#af5f00255&| +0#0000000&@57
|V+0#00e0e07&|a|r|i|a|b|l|e|3|=+0#0000000&|"+0#af5f00255&|$+0#e000e06&|H|O|M|E|"+0#af5f00255&| +0#0000000&@57
|"|i|n|p|u|t|/|s|h|_|0|5|.|s|h|"| |3|7|3|L|,| |1|2|9|5|4|B| @27|1|,|1| @10|T|o|p|
|i|s|_|d|a|s|h|:| |1|,| |i|s|_|p|o|s|i|x|:| |1|,| |i|s|_|s|h|:| |1|,| @22|1|,|1| @10|T|o|p|

View File

@@ -17,4 +17,4 @@
|V+0#00e0e07&|a|r|i|a|b|l|e|N|a|m|e|=+0#0000000&|"+0#af5f00255&|$+0#e000e06&|{|B|a|s|i|c|C|o|n|f|i|g|N|a|m|e|}|_+0#e000002&|*|"+0#af5f00255&| +0#0000000&@39
@75
|#+0#0000e05&| |E|c|h|o| |s|o|m|e| |k|s|h| |s|p|e|c|i|a|l| |v|a|r|i|a|b|l|e|s| +0#0000000&@41
|"|i|n|p|u|t|/|s|h|_|0|6|.|s|h|"| |7|1|L|,| |1|6|7@1|B| @29|1|,|1| @10|T|o|p|
|i|s|_|k|o|r|n|s|h|e|l@1|:| |1|,| @40|1|,|1| @10|T|o|p|

View File

@@ -1,4 +1,4 @@
>#+0#0000e05#ffffff0|!|/|b|i|n|/|s|h| +0#0000000&@65
>#+0#0000e05#ffffff0|!|/|b|i|n|/|d|a|s|h| +0#0000000&@63
|#+0#0000e05&| |T|e|s|t| |f|i|l|e| |t|o| |t|e|s|t| |'|f|o|r| |d|o| |d|o|n|e|'| |l|o@1|p|s|.| +0#0000000&@34
|#+0#0000e05&| |Y|o|u| |c|a|n| |s|t|a|r|t| |t|h|i|s| |s|c|r|i|p|t| |l|i|k|e|:| |$|0| |{|-|n|e| |-|g|t| |-|l|e| |.@2|}| |(|a|l@1| |n|u|m|e|r|i|c| |o|p|e|r|a|t|o
|r|s| | +0#0000000&@71
@@ -17,4 +17,4 @@
|F+0#00e0e07&|u|n|c|t|i|o|n|1| |(|)| |{| +0#0000000&@60
@75
|e+0#af5f00255&|c|h|o| +0#e000002&|"+0#af5f00255&|F+0#e000002&|u|n|c|t|i|o|n|1|:| |f|o|r| |l|o@1|p| |i|n|s|i|d|e| |a| |f|u|n|c|t|i|o|n|:|\+0#e000e06&|t|\|c|"+0#af5f00255&| +0#0000000&@25
|"|i|n|p|u|t|/|s|h|_|0|7|.|s|h|"| |9|3|L|,| |2|3|0|3|B| @29|1|,|1| @10|T|o|p|
|i|s|_|d|a|s|h|:| |1|,| |i|s|_|p|o|s|i|x|:| |1|,| |i|s|_|s|h|:| |1|,| @22|1|,|1| @10|T|o|p|

View File

@@ -17,4 +17,4 @@
|#+0#0000e05&| |C|a|s|e| |1|b|.| |V|a|r|i|a|b|l|e| |a|n|d| |C|o|n|s|t|a|n|t| +0#0000000&@42
|[+0#af5f00255&| +0#0000000&|-+0#af5f00255&|t| +0#0000000&|0+0#e000002&| +0#0000000&|]+0#af5f00255&| +0#0000000&|&@1| |e+0#af5f00255&|c|h|o| +0#e000002&|"+0#af5f00255&|\+0#e000e06&|n|`|d|a|t|e|`|"+0#af5f00255&| +0#e000002&|&+0#0000000&@1| |u+0#af5f00255&|n|s|e|t| +0#00e0e07&|V|a|r|i|a|b|l|e|A| +0#0000000&@28
|V+0#00e0e07&|a|r|i|a|b|l|e|1|=+0#0000000&|$+0#e000e06&|{|V|a|r|i|a|b|l|e|A|:+0#af5f00255&|-|$+0#e000e06&|H|O|M|E| +0#0000000&|T|h|i|s| |i|s| |a| |T|e|x|t|}+0#e000e06&| +0#0000000&@30
|"|i|n|p|u|t|/|s|h|_|0|8|.|s|h|"| |8|2|L|,| |2|9@1|3|B| @29|1|,|1| @10|T|o|p|
|i|s|_|k|o|r|n|s|h|e|l@1|:| |1|,| @40|1|,|1| @10|T|o|p|

View File

@@ -1,4 +1,4 @@
>#+0#0000e05#ffffff0|!|/|b|i|n|/|s|h| +0#0000000&@65
>#+0#0000e05#ffffff0|!|/|b|i|n|/|d|a|s|h| +0#0000000&@63
|#+0#0000e05&| |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#0000000&@32
|(+0#e000e06&| |c+0#af5f00255&|d| +0#e000e06&|;+0#af5f00255&| +0#e000e06&|$|p|w|d| |)| +0#0000000&||| |w|c| |-+0#e000e06&|c| +0#0000000&@53
|(+0#e000e06&| |c+0#af5f00255&|d| +0#e000e06&|$|1| |;+0#af5f00255&| +0#e000e06&|$|p|w|d| |)| +0#0000000&||| |w|c| |-+0#e000e06&|c| +0#0000000&@50
@@ -17,4 +17,4 @@
|(+0#e000e06&| |c+0#af5f00255&|d| +0#e000e06&|$|{|H|O|M|E|}| |)| +0#0000000&||| |w|c| |-+0#e000e06&|c| +0#0000000&@52
|(|(+0#e000e06&|n+0#00e0e07&|=+0#0000000&|1+0#e000002&|+|2|)+0#e000e06&|)+0#ffffff16#ff404010| +0#0000000#ffffff0@65
|l+0#af5f00255&|e|t| +0#0000000&|n+0#00e0e07&|=+0#0000000&|1+0#e000002&|++0#0000000&|2+0#e000002&| +0#0000000&@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|
|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|

View File

@@ -1,4 +1,4 @@
|#+0#0000e05#ffffff0|!|/|b|i|n|/|s|h| +0#0000000&@65
|#+0#0000e05#ffffff0|!|/|b|i|n|/|d|a|s|h| +0#0000000&@63
|#+0#0000e05&| |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#0000000&@32
|(+0#e000e06&| |c+0#af5f00255&|d| +0#e000e06&|;+0#af5f00255&| +0#e000e06&|$|p|w|d| |)| +0#0000000&||| |w|c| |-+0#e000e06&|c| +0#0000000&@53
|(+0#e000e06&| |c+0#af5f00255&|d| +0#e000e06&|$|1| |;+0#af5f00255&| +0#e000e06&|$|p|w|d| |)| +0#0000000&||| |w|c| |-+0#e000e06&|c| +0#0000000&@50
@@ -17,4 +17,4 @@
|(+0#e000e06&| |c+0#af5f00255&|d| +0#e000e06&|$|{|H|O|M|E|}| |)| +0#0000000&||| |w|c| |-+0#e000e06&|c| +0#0000000&@52
|(|(+0#e000e06&|n+0#00e0e07&|=+0#0000000&|1+0#e000002&|+|2|)+0#e000e06&|)+0#ffffff16#ff404010| +0#0000000#ffffff0@65
>l+0#af5f00255&|e|t| +0#0000000&|n+0#00e0e07&|=+0#0000000&|1+0#e000002&|++0#0000000&|2+0#e000002&| +0#0000000&@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|
|:|r|e|d|r|a|w| @49|1|9|,|1| @9|A|l@1|

View File

@@ -1,4 +1,4 @@
#! /bin/sh
#! /bin/dash
export `echo 'A=B'`
printenv A
echo a `#foo` b

View File

@@ -1,4 +1,4 @@
#!/bin/sh
#!/bin/dash
# sh4
Variable=${VariableB:-{VariableC}}
Variable=${VariableB:-${VariableC:-{Var3:=eng}}}

View File

@@ -1,4 +1,4 @@
#!/bin/sh -x
#!/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}!

View File

@@ -1,4 +1,4 @@
#!/bin/sh
#!/bin/dash
# Test file to test 'for do done' loops.
# You can start this script like: $0 {-ne -gt -le ...} (all numeric operators
# are allowed!

View File

@@ -1,4 +1,4 @@
#!/bin/sh
#!/bin/dash
# Test file for vim the check () subshells
( cd ; $pwd ) | wc -c
( cd $1 ; $pwd ) | wc -c

View File

@@ -85,7 +85,6 @@ func HandleSwapExists()
endif
endfunc
let ok_count = 0
let failed_tests = []
let skipped_count = 0
@@ -115,15 +114,58 @@ for fname in glob('input/*.*', 1, 1)
let lines =<< trim END
syntax on
" extra info for shell variables
func ShellInfo()
let msg = ''
for [key, val] in items(b:)
if key =~ '^is_'
let msg ..= key .. ': ' .. val .. ', '
endif
endfor
if msg != ''
echomsg msg
endif
endfunc
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('<afile>') =~ 'input[/\\].*\..*'
let v:swapchoice = 'e'
endif
endfunc
END
call writefile(lines, 'Xtestscript')
let buf = RunVimInTerminal('-S Xtestscript ' .. fname, {})
" Screendump at the start of the file: failed/filetype_00.dump
" 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', {})
" edit the file only after catching the SwapExists event
call term_sendkeys(buf, ":edit " .. fname .. "\<CR>")
if filetype == 'sh'
call term_sendkeys(buf, ":call ShellInfo()\<CR>")
endif
" Screendump at the start of the file: failed/root_00.dump
let root_00 = root .. '_00'
call ch_log('First screendump for ' .. fname .. ': failed/' .. root_00 .. '.dump')
let fail = VerifyScreenDump(buf, root_00, {})
" clear the shell info if there are not enough lines to cause a scroll
if filetype == 'sh' && linecount <= 19
call term_sendkeys(buf, ":redraw\<CR>")
endif
" Make a Screendump every 18 lines of the file: failed/root_NN.dump
let topline = 1
let nr = 1
@@ -145,9 +187,16 @@ for fname in glob('input/*.*', 1, 1)
call StopVimInTerminal(buf)
call delete('Xtestscript')
" Add any assert errors to s:messages
" 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

View File

@@ -2332,8 +2332,8 @@ installruntime: installrtbase installmacros installpack installtutor installspel
# 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_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,6 +2417,8 @@ installrtbase: $(HELPSOURCE)/vim.1 $(DEST_VIM) $(VIMTARGET) $(DEST_RT) \
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,7 +2658,7 @@ $(DESTDIR)$(exec_prefix) $(DEST_BIN) \
$(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) $(DEST_AUTO)/dist $(DEST_AUTO)/xml $(DEST_AUTO)/zig \
$(DEST_IMPORT) $(DEST_IMPORT)/dist $(DEST_PLUG):
$(MKDIR_P) $@
-chmod $(DIRMOD) $@
@@ -2845,10 +2847,10 @@ uninstall_runtime:
-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_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)
-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.

View File

@@ -2224,7 +2224,7 @@ static funcentry_T global_functions[] =
{"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},
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,

View File

@@ -199,7 +199,7 @@ typedef long off_t;
#endif
#ifndef DFLT_VDIR
# define DFLT_VDIR "$VIM/vimfiles/view" // default for 'viewdir'
# define DFLT_VDIR "home:vimfiles/view" // default for 'viewdir'
#endif
#ifndef DFLT_MAXMEM

View File

@@ -30,6 +30,10 @@ if 1
" 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'

View File

@@ -814,7 +814,7 @@ enddef
def s:GetFilenameCaseChecks(): dict<list<string>>
return {
modula2: ['file.DEF'],
bzl: ['file.BUILD', 'BUILD'],
bzl: ['file.BUILD', 'BUILD', 'BUCK'],
}
enddef

View File

@@ -1262,4 +1262,18 @@ func Test_mkview_manual_fold()
bw!
endfunc
" 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')
call assert_match('^home:vimfiles', &viewdir)
elseif has('mac')
call assert_match('^' .. $VIM .. '/vimfiles', &viewdir)
endif
endfunc
" vim: shiftwidth=2 sts=2 expandtab

View File

@@ -2821,6 +2821,15 @@ def Test_matchfuzzy()
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<any> but got list<unknown>', '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<dict<any>> = matchfuzzy(items, 'abc', {key: 'name'})
assert_equal([{name: 'abc', id: 3}], l)
var k: list<string> = matchfuzzy(['one', 'two', 'who'], 'o')
assert_equal(['one', 'two', 'who'], k)
END
v9.CheckDefAndScriptSuccess(lines)
enddef
def Test_matchfuzzypos()
@@ -2828,6 +2837,15 @@ def Test_matchfuzzypos()
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<any> but got list<unknown>', '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<dict<any>> = matchfuzzypos(items, 'abc', {key: 'name'})[0]
assert_equal([{name: 'abc', id: 3}], l)
var k: list<string> = matchfuzzypos(['one', 'two', 'who'], 'o')[0]
assert_equal(['one', 'two', 'who'], k)
END
v9.CheckDefAndScriptSuccess(lines)
enddef
def Test_matchlist()

View File

@@ -838,6 +838,23 @@ def Test_class_member()
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

View File

@@ -695,6 +695,30 @@ static char *(features[]) =
static int included_patches[] =
{ /* Add new patch number below this line */
/**/
1663,
/**/
1662,
/**/
1661,
/**/
1660,
/**/
1659,
/**/
1658,
/**/
1657,
/**/
1656,
/**/
1655,
/**/
1654,
/**/
1653,
/**/
1652,
/**/
1651,
/**/

View File

@@ -3967,8 +3967,8 @@ exec_instructions(ectx_T *ectx)
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];
copy_tv(cm->cm_class->class_members_tv + cm->cm_idx,
STACK_TV_BOT(0));
++ectx->ec_stack.ga_len;
}
break;