From 38ce71c1c323716cc4b130dbb3e8837a8b9a710b Mon Sep 17 00:00:00 2001 From: Damien <141588647+xrandomname@users.noreply.github.com> Date: Tue, 23 Jul 2024 19:56:54 +0200 Subject: [PATCH 001/186] runtime(zip): correctly extract file from zip browser Problem: Enter 'x' in zip browser fail with E121 Solution: Fix typo in zip#Extract() closes: #15321 Signed-off-by: Damien <141588647+xrandomname@users.noreply.github.com> Signed-off-by: Christian Brabandt --- runtime/autoload/zip.vim | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/runtime/autoload/zip.vim b/runtime/autoload/zip.vim index d0e706e83a..34bcad3368 100644 --- a/runtime/autoload/zip.vim +++ b/runtime/autoload/zip.vim @@ -1,11 +1,12 @@ " zip.vim: Handles browsing zipfiles " AUTOLOAD PORTION -" Date: Mar 12, 2023 +" Date: Jul 23, 2024 " Version: 33 " Maintainer: This runtime file is looking for a new maintainer. " Former Maintainer: Charles E Campbell " Last Change: " 2024 Jun 16 by Vim Project: handle whitespace on Windows properly (#14998) +" 2024 Jul 23 by Vim Project: fix 'x' command " License: Vim License (see vim's :help license) " Copyright: Copyright (C) 2005-2019 Charles E. Campbell {{{1 " Permission is hereby granted to use and distribute this code, @@ -395,8 +396,7 @@ fun! zip#Extract() endif " extract the file mentioned under the cursor -" call Decho("system(".g:zip_extractcmd." ".shellescape(b:zipfile)." ".shellescape(shell).")") - call system(g:zip_extractcmd." ".shellescape(b:zipfile)." ".shellescape(shell)) + call system($"{g:zip_extractcmd} {shellescape(b:zipfile)} {shellescape(fname)}") " call Decho("zipfile<".b:zipfile.">") if v:shell_error != 0 echohl Error | echo "***error*** ".g:zip_extractcmd." ".b:zipfile." ".fname.": failed!" | echohl NONE From 56904f90d15853085552470a2fedcb6cadb62309 Mon Sep 17 00:00:00 2001 From: Oleg Goncharov Date: Tue, 23 Jul 2024 20:34:15 +0200 Subject: [PATCH 002/186] patch 9.1.0611: ambiguous mappings not correctly resolved with modifyOtherKeys Problem: ambiguous mappings not correctly resolved with modifyOtherKeys Solution: Check for termcode when an upper case mapping is received and does not match (Oleg Goncharov) Fix for mapping processing when capital leters are represented with terminal codes. Problem: there are two mappings and 1) the first mapping is substring of the second, 2) the first non-matching letter is capital, 3) capital letters are represented with termcodes "ESC[27;2;~" in given system then first mapping is applied instead of second. Example: :map B b :map BBB blimp! and then BBB -> bbb instead of BBB -> blimp! Solution: force termcodes check if capital letter does not match. closes: #15251 Signed-off-by: Oleg Goncharov Signed-off-by: Christian Brabandt --- src/getchar.c | 11 ++++++++++- src/testdir/test_termcodes.vim | 11 +++++++++++ src/testdir/view_util.vim | 2 +- src/version.c | 2 ++ 4 files changed, 24 insertions(+), 2 deletions(-) diff --git a/src/getchar.c b/src/getchar.c index df89f4cd2f..4af176978c 100644 --- a/src/getchar.c +++ b/src/getchar.c @@ -2935,8 +2935,11 @@ handle_mapping( } } else + { // No match; may have to check for termcode at next - // character. If the first character that didn't match is + // character. + + // If the first character that didn't match is // K_SPECIAL then check for a termcode. This isn't perfect // but should work in most cases. if (max_mlen < mlen) @@ -2946,6 +2949,12 @@ handle_mapping( } else if (max_mlen == mlen && mp->m_keys[mlen] == K_SPECIAL) want_termcode = 1; + + // Check termcode for uppercase character to properly + // process "ESC[27;2;~" control sequences. + if (ASCII_ISUPPER(mp->m_keys[mlen])) + want_termcode = 1; + } } } diff --git a/src/testdir/test_termcodes.vim b/src/testdir/test_termcodes.vim index 7e450d998d..507753c21a 100644 --- a/src/testdir/test_termcodes.vim +++ b/src/testdir/test_termcodes.vim @@ -2256,6 +2256,17 @@ func Test_modifyOtherKeys_mapped() iunmap ' iunmap + + " clean buffer + %d _ + imap B b + imap BBB blimp + let input = repeat(GetEscCodeCSI27('B', 2), 3) + call feedkeys("a" .. input .. "\", 'Lx!') + call assert_equal('blimp', getline(1)) + " cleanup + iunmap BBB + iunmap B set timeoutlen& endfunc diff --git a/src/testdir/view_util.vim b/src/testdir/view_util.vim index 71cb071ab7..161c8b20cd 100644 --- a/src/testdir/view_util.vim +++ b/src/testdir/view_util.vim @@ -71,7 +71,7 @@ endfunc " than the raw code. " Return the modifyOtherKeys level 2 encoding for "key" with "modifier" -" (number value, e.g. CTRL is 5). +" (number value, e.g. CTRL is 5, Shift is 2, Alt is 3). func GetEscCodeCSI27(key, modifier) let key = printf("%d", char2nr(a:key)) let mod = printf("%d", a:modifier) diff --git a/src/version.c b/src/version.c index 91286bb75d..3963996e77 100644 --- a/src/version.c +++ b/src/version.c @@ -704,6 +704,8 @@ static char *(features[]) = static int included_patches[] = { /* Add new patch number below this line */ +/**/ + 611, /**/ 610, /**/ From 581d4a7b356395bcb8606c1717ded65d47d26c68 Mon Sep 17 00:00:00 2001 From: Christian Brabandt Date: Tue, 23 Jul 2024 21:14:06 +0200 Subject: [PATCH 003/186] runtime(netrw): escape filename before trying to delete it fixes: #15330 Signed-off-by: Christian Brabandt --- runtime/autoload/netrw.vim | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/runtime/autoload/netrw.vim b/runtime/autoload/netrw.vim index 5c2a43a17a..9f7afd5b29 100644 --- a/runtime/autoload/netrw.vim +++ b/runtime/autoload/netrw.vim @@ -17,6 +17,7 @@ " 2024 Jun 13 by Vim Project: glob() on Windows fails when a directory name contains [] (#14952) " 2024 Jun 23 by Vim Project: save ad restore registers when liststyle = WIDELIST (#15077, #15114) " 2024 Jul 22 by Vim Project: avoid endless recursion (#15318) +" 2024 Jul 23 by Vim Project: escape filename before trying to delete it (#15330) " Former Maintainer: Charles E Campbell " GetLatestVimScripts: 1075 1 :AutoInstall: netrw.vim " Copyright: Copyright (C) 2016 Charles E. Campbell {{{1 @@ -11452,7 +11453,7 @@ fun! s:NetrwLocalRmFile(path,fname,all) let all= a:all let ok = "" NetrwKeepj norm! 0 - let rmfile= s:NetrwFile(s:ComposePath(a:path,a:fname)) + let rmfile= s:NetrwFile(s:ComposePath(a:path,escape(a:fname, '\\'))) " call Decho("rmfile<".rmfile.">",'~'.expand("")) if rmfile !~ '^"' && (rmfile =~ '@$' || rmfile !~ '[\/]$') @@ -11461,7 +11462,7 @@ fun! s:NetrwLocalRmFile(path,fname,all) if !all echohl Statement call inputsave() - let ok= input("Confirm deletion of file<".rmfile."> ","[{y(es)},n(o),a(ll),q(uit)] ") + let ok= input("Confirm deletion of file <".rmfile."> ","[{y(es)},n(o),a(ll),q(uit)] ") call inputrestore() echohl NONE if ok == "" @@ -11485,7 +11486,7 @@ fun! s:NetrwLocalRmFile(path,fname,all) if !all echohl Statement call inputsave() - let ok= input("Confirm *recursive* deletion of directory<".rmfile."> ","[{y(es)},n(o),a(ll),q(uit)] ") + let ok= input("Confirm *recursive* deletion of directory <".rmfile."> ","[{y(es)},n(o),a(ll),q(uit)] ") call inputrestore() let ok= substitute(ok,'\[{y(es)},n(o),a(ll),q(uit)]\s*','','e') if ok == "" From 2cad941dc0cb57bca577160eb3a349de2e667bcd Mon Sep 17 00:00:00 2001 From: Damien <141588647+xrandomname@users.noreply.github.com> Date: Wed, 24 Jul 2024 20:07:00 +0200 Subject: [PATCH 004/186] runtime(zip): Use delete() for deleting directory This is safer because we don't invoke the shell. closes: #15335 Signed-off-by: Damien <141588647+xrandomname@users.noreply.github.com> Signed-off-by: Christian Brabandt --- runtime/autoload/zip.vim | 29 +++++++++-------------------- 1 file changed, 9 insertions(+), 20 deletions(-) diff --git a/runtime/autoload/zip.vim b/runtime/autoload/zip.vim index 34bcad3368..79f707fbd8 100644 --- a/runtime/autoload/zip.vim +++ b/runtime/autoload/zip.vim @@ -1,12 +1,13 @@ " zip.vim: Handles browsing zipfiles -" AUTOLOAD PORTION -" Date: Jul 23, 2024 +" AUTOLOAD PORTION +" Date: Jul 24, 2024 " Version: 33 " Maintainer: This runtime file is looking for a new maintainer. " Former Maintainer: Charles E Campbell " Last Change: -" 2024 Jun 16 by Vim Project: handle whitespace on Windows properly (#14998) -" 2024 Jul 23 by Vim Project: fix 'x' command +" 2024 Jun 16 by Vim Project: handle whitespace on Windows properly (#14998) +" 2024 Jul 23 by Vim Project: fix 'x' command +" 2024 Jul 24 by Vim Project: use delete() function " License: Vim License (see vim's :help license) " Copyright: Copyright (C) 2005-2019 Charles E. Campbell {{{1 " Permission is hereby granted to use and distribute this code, @@ -299,7 +300,7 @@ fun! zip#Write(fname) " place temporary files under .../_ZIPVIM_/ if isdirectory("_ZIPVIM_") - call s:Rmdir("_ZIPVIM_") + call delete("_ZIPVIM_", "rf") endif call mkdir("_ZIPVIM_") cd _ZIPVIM_ @@ -359,12 +360,12 @@ fun! zip#Write(fname) q! unlet s:zipfile_{winnr()} endif - + " cleanup and restore current directory cd .. - call s:Rmdir("_ZIPVIM_") + call delete("_ZIPVIM_", "rf") call s:ChgDir(curdir,s:WARNING,"(zip#Write) unable to return to ".curdir."!") - call s:Rmdir(tmpdir) + call delete(tmpdir, "rf") setlocal nomod let &report= repkeep @@ -456,18 +457,6 @@ fun! s:ChgDir(newdir,errlvl,errmsg) return 0 endfun -" --------------------------------------------------------------------- -" s:Rmdir: {{{2 -fun! s:Rmdir(fname) -" call Dfunc("Rmdir(fname<".a:fname.">)") - if (has("win32") || has("win95") || has("win64") || has("win16")) && &shell !~? 'sh$' - call system("rmdir /S/Q ".s:Escape(a:fname,0)) - else - call system("/bin/rm -rf ".s:Escape(a:fname,0)) - endif -" call Dret("Rmdir") -endfun - " ------------------------------------------------------------------------ " Modelines And Restoration: {{{1 let &cpo= s:keepcpo From df77c8ad3974e44df2e588de5f465072371cab69 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E3=82=AB=E3=83=AF=E3=83=AA=E3=83=9F=E4=BA=BA=E5=BD=A2?= Date: Wed, 24 Jul 2024 20:10:58 +0200 Subject: [PATCH 005/186] patch 9.1.0612: filetype: deno.lock file not recognized MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Problem: filetype: deno.lock file not recognized Solution: detect 'deno.lock' as json filetype (カワリミ人形) Reference: https://docs.deno.com/runtime/manual/basics/modules/integrity_checking/#caching-and-lock-files closes: #15333 Signed-off-by: カワリミ人形 Signed-off-by: Christian Brabandt --- runtime/filetype.vim | 2 +- src/testdir/test_filetype.vim | 4 +++- src/version.c | 2 ++ 3 files changed, 6 insertions(+), 2 deletions(-) diff --git a/runtime/filetype.vim b/runtime/filetype.vim index 0ab0f0f17c..b589a0b781 100644 --- a/runtime/filetype.vim +++ b/runtime/filetype.vim @@ -1196,7 +1196,7 @@ au BufNewFile,BufRead *.ipynb,*.jupyterlab-settings setf json au BufNewFile,BufRead *.sublime-project,*.sublime-settings,*.sublime-workspace setf json " Other files that look like json -au BufNewFile,BufRead .prettierrc,.firebaserc,.stylelintrc,.lintstagedrc,flake.lock setf json +au BufNewFile,BufRead .prettierrc,.firebaserc,.stylelintrc,.lintstagedrc,flake.lock,deno.lock setf json " JSONC (JSON with comments) au BufNewFile,BufRead *.jsonc,.babelrc,.eslintrc,.jsfmtrc setf jsonc diff --git a/src/testdir/test_filetype.vim b/src/testdir/test_filetype.vim index 11e74afce6..b9291d5978 100644 --- a/src/testdir/test_filetype.vim +++ b/src/testdir/test_filetype.vim @@ -369,7 +369,9 @@ def s:GetFilenameChecks(): dict> jq: ['file.jq'], jovial: ['file.jov', 'file.j73', 'file.jovial'], jproperties: ['file.properties', 'file.properties_xx', 'file.properties_xx_xx', 'some.properties_xx_xx_file', 'org.eclipse.xyz.prefs'], - json: ['file.json', 'file.jsonp', 'file.json-patch', 'file.geojson', 'file.webmanifest', 'Pipfile.lock', 'file.ipynb', 'file.jupyterlab-settings', '.prettierrc', '.firebaserc', '.stylelintrc', '.lintstagedrc', 'file.slnf', 'file.sublime-project', 'file.sublime-settings', 'file.sublime-workspace', 'file.bd', 'file.bda', 'file.xci', 'flake.lock', 'pack.mcmeta'], + json: ['file.json', 'file.jsonp', 'file.json-patch', 'file.geojson', 'file.webmanifest', 'Pipfile.lock', 'file.ipynb', 'file.jupyterlab-settings', + '.prettierrc', '.firebaserc', '.stylelintrc', '.lintstagedrc', 'file.slnf', 'file.sublime-project', 'file.sublime-settings', 'file.sublime-workspace', + 'file.bd', 'file.bda', 'file.xci', 'flake.lock', 'pack.mcmeta', 'deno.lock'], json5: ['file.json5'], jsonc: ['file.jsonc', '.babelrc', '.eslintrc', '.jsfmtrc', '.jshintrc', '.jscsrc', '.vsconfig', '.hintrc', '.swrc', 'jsconfig.json', 'tsconfig.json', 'tsconfig.test.json', 'tsconfig-test.json', '.luaurc'], jsonl: ['file.jsonl'], diff --git a/src/version.c b/src/version.c index 3963996e77..7cef73c8ba 100644 --- a/src/version.c +++ b/src/version.c @@ -704,6 +704,8 @@ static char *(features[]) = static int included_patches[] = { /* Add new patch number below this line */ +/**/ + 612, /**/ 611, /**/ From e73e5b889b52675a9ea58cf154235c7f25d107d5 Mon Sep 17 00:00:00 2001 From: Aliaksei Budavei <0x000c70@gmail.com> Date: Wed, 24 Jul 2024 20:15:15 +0200 Subject: [PATCH 006/186] runtime(java): Optionally highlight the :: token for method references This token will be highlighted, similar to the arrow of lambda expressions, whenever "g:java_highlight_functions" is defined. Also: - Improve the recognition of _switch-case_ labels (D-Cysteine). - Remove insignificant empty statements in syntax test files. closes: #15322 References: https://docs.oracle.com/javase/specs/jls/se21/html/jls-15.html#jls-15.13 https://github.com/fleiner/vim/pull/1 Co-authored-by: D-Cysteine <54219287+D-Cysteine@users.noreply.github.com> Signed-off-by: Aliaksei Budavei <0x000c70@gmail.com> Signed-off-by: Christian Brabandt --- runtime/doc/syntax.txt | 18 +- runtime/syntax/java.vim | 10 +- .../testdir/dumps/java_generics_05.dump | 8 +- .../dumps/java_generics_signature_05.dump | 8 +- .../dumps/java_lambda_expressions_07.dump | 2 +- .../java_lambda_expressions_signature_07.dump | 2 +- .../dumps/java_method_references_00.dump | 20 ++ .../dumps/java_method_references_01.dump | 20 ++ .../dumps/java_method_references_02.dump | 20 ++ .../dumps/java_method_references_03.dump | 20 ++ .../dumps/java_method_references_04.dump | 20 ++ .../dumps/java_method_references_05.dump | 20 ++ .../dumps/java_method_references_06.dump | 20 ++ .../dumps/java_method_references_07.dump | 20 ++ .../dumps/java_method_references_08.dump | 20 ++ .../dumps/java_method_references_09.dump | 20 ++ .../dumps/java_method_references_10.dump | 20 ++ .../java_method_references_signature_00.dump | 20 ++ .../java_method_references_signature_01.dump | 20 ++ .../java_method_references_signature_02.dump | 20 ++ .../java_method_references_signature_03.dump | 20 ++ .../java_method_references_signature_04.dump | 20 ++ .../java_method_references_signature_05.dump | 20 ++ .../java_method_references_signature_06.dump | 20 ++ .../java_method_references_signature_07.dump | 20 ++ .../java_method_references_signature_08.dump | 20 ++ .../java_method_references_signature_09.dump | 20 ++ .../java_method_references_signature_10.dump | 20 ++ .../syntax/testdir/dumps/java_switch_03.dump | 2 +- .../syntax/testdir/dumps/java_switch_04.dump | 2 +- .../syntax/testdir/dumps/java_switch_05.dump | 4 +- .../syntax/testdir/dumps/java_switch_06.dump | 2 +- .../testdir/dumps/java_unfoldment_02.dump | 2 +- .../syntax/testdir/input/java_enfoldment.java | 2 +- .../input/java_lambda_expressions.java | 2 +- .../java_lambda_expressions_signature.java | 2 +- .../testdir/input/java_method_references.java | 186 ++++++++++++++++++ .../java_method_references_signature.java | 186 ++++++++++++++++++ runtime/syntax/testdir/input/java_switch.java | 10 +- .../syntax/testdir/input/java_unfoldment.java | 2 +- src/testdir/test_filetype.vim | 2 +- 41 files changed, 855 insertions(+), 37 deletions(-) create mode 100644 runtime/syntax/testdir/dumps/java_method_references_00.dump create mode 100644 runtime/syntax/testdir/dumps/java_method_references_01.dump create mode 100644 runtime/syntax/testdir/dumps/java_method_references_02.dump create mode 100644 runtime/syntax/testdir/dumps/java_method_references_03.dump create mode 100644 runtime/syntax/testdir/dumps/java_method_references_04.dump create mode 100644 runtime/syntax/testdir/dumps/java_method_references_05.dump create mode 100644 runtime/syntax/testdir/dumps/java_method_references_06.dump create mode 100644 runtime/syntax/testdir/dumps/java_method_references_07.dump create mode 100644 runtime/syntax/testdir/dumps/java_method_references_08.dump create mode 100644 runtime/syntax/testdir/dumps/java_method_references_09.dump create mode 100644 runtime/syntax/testdir/dumps/java_method_references_10.dump create mode 100644 runtime/syntax/testdir/dumps/java_method_references_signature_00.dump create mode 100644 runtime/syntax/testdir/dumps/java_method_references_signature_01.dump create mode 100644 runtime/syntax/testdir/dumps/java_method_references_signature_02.dump create mode 100644 runtime/syntax/testdir/dumps/java_method_references_signature_03.dump create mode 100644 runtime/syntax/testdir/dumps/java_method_references_signature_04.dump create mode 100644 runtime/syntax/testdir/dumps/java_method_references_signature_05.dump create mode 100644 runtime/syntax/testdir/dumps/java_method_references_signature_06.dump create mode 100644 runtime/syntax/testdir/dumps/java_method_references_signature_07.dump create mode 100644 runtime/syntax/testdir/dumps/java_method_references_signature_08.dump create mode 100644 runtime/syntax/testdir/dumps/java_method_references_signature_09.dump create mode 100644 runtime/syntax/testdir/dumps/java_method_references_signature_10.dump create mode 100644 runtime/syntax/testdir/input/java_method_references.java create mode 100644 runtime/syntax/testdir/input/java_method_references_signature.java diff --git a/runtime/doc/syntax.txt b/runtime/doc/syntax.txt index 2dfc5b6282..f843082183 100644 --- a/runtime/doc/syntax.txt +++ b/runtime/doc/syntax.txt @@ -1,4 +1,4 @@ -*syntax.txt* For Vim version 9.1. Last change: 2024 Jul 16 +*syntax.txt* For Vim version 9.1. Last change: 2024 Jul 23 VIM REFERENCE MANUAL by Bram Moolenaar @@ -2046,11 +2046,11 @@ use the following: > :let java_highlight_java_io=1 Check the javaid.vim file for a list of all the packages that are supported. -Function names are not highlighted, as the way to find functions depends on -how you write Java code. The syntax file knows two possible ways to highlight -headers of function declarations: +Headers of indented function declarations can be highlighted (along with parts +of lambda expressions and method reference expressions), but it depends on how +you write Java code. Two formats are recognized: -If you write function declarations that are consistently indented by either +1) If you write function declarations that are consistently indented by either a tab, or a space . . . or eight space character(s), you may want to set > :let java_highlight_functions="indent" :let java_highlight_functions="indent1" @@ -2062,10 +2062,12 @@ a tab, or a space . . . or eight space character(s), you may want to set > :let java_highlight_functions="indent7" :let java_highlight_functions="indent8" Note that in terms of 'shiftwidth', this is the leftmost step of indentation. -However, if you follow the Java guidelines about how functions and classes are -supposed to be named (with respect to upper- and lowercase) and there is any -amount of indentation, you may want to set > + +2) However, if you follow the Java guidelines about how functions and types +are supposed to be named (with respect to upper- and lowercase) and there is +any amount of indentation, you may want to set > :let java_highlight_functions="style" + In addition, you can combine any value of "java_highlight_functions" with > :let java_highlight_signature=1 to have the name of a function with its parameter list parens distinctly diff --git a/runtime/syntax/java.vim b/runtime/syntax/java.vim index 4beeaad224..9c4964db71 100644 --- a/runtime/syntax/java.vim +++ b/runtime/syntax/java.vim @@ -3,7 +3,7 @@ " Maintainer: Aliaksei Budavei <0x000c70 AT gmail DOT com> " Former Maintainer: Claudio Fleiner " Repository: https://github.com/zzzyxwvut/java-vim.git -" Last Change: 2024 Jun 22 +" Last Change: 2024 Jul 23 " Please check :help java.vim for comments on some of the options available. @@ -260,7 +260,7 @@ if exists("java_space_errors") endif endif -exec 'syn match javaUserLabel "^\s*\<\K\k*\>\%(\\)\@' . s:ff.Peek('7', '') . '\%(\\)\@' . s:ff.Peek('7', '') . '" matchgroup=NONE end=":\|->" contains=javaLabelCastType,javaLabelNumber,javaCharacter,javaString,javaConstant,@javaClasses,javaGenerics,javaLabelDefault,javaLabelVarType,javaLabelWhenClause syn region javaLabelRegion transparent matchgroup=javaLabel start="\\%(\s*\%(:\|->\)\)\@=" matchgroup=NONE end=":\|->" oneline " Consider grouped _default_ _case_ labels, i.e. @@ -497,8 +497,12 @@ syn match javaParenError "\]" hi def link javaParenError javaError -" Lambda expressions (JLS-17, §15.27). +" Lambda expressions (JLS-17, §15.27) and method references (JLS-17, +" §15.13). if exists("java_highlight_functions") + syn match javaMethodRef ":::\@!" + hi def link javaMethodRef javaFuncDef + if exists("java_highlight_signature") let s:ff.LambdaDef = s:ff.LeftConstant else diff --git a/runtime/syntax/testdir/dumps/java_generics_05.dump b/runtime/syntax/testdir/dumps/java_generics_05.dump index 7e51e7d644..70b814d7a0 100644 --- a/runtime/syntax/testdir/dumps/java_generics_05.dump +++ b/runtime/syntax/testdir/dumps/java_generics_05.dump @@ -5,10 +5,10 @@ @8|r+0#00e0003&|e|c|o|r|d| +0#0000000&|P|a|i|r|(|L+0#0000001#ffff4012|o|n|g|F|u|n|c|t|i|o|n|<|N+0#ffffff16#ff404010|u|m|<|L+0#0000000#ffffff0|o|n|g|>+0#ffffff16#ff404010|>+0#0000001#ffff4012| +0#0000000#ffffff0|a|,| @28 @20>L+0#0000001#ffff4012|o|n|g|F|u|n|c|t|i|o|n|<|S+0#0000000#ffffff0|t|r|i|n|g|>+0#0000001#ffff4012| +0#0000000#ffffff0|b|)| |{| |}| @27 @8|f+0#4040ff13&|i|n|a|l| +0#0000000&|P|a|i|r| |p| |=| |s+0#af5f00255&|w|i|t|c|h| +0#0000000&|(|r|a|d|i|x|)| |{| @35 -@12|c+0#af5f00255&|a|s|e| +0#0000000&|2+0#e000002&| +0#0000000&|-|>| |n+0#af5f00255&|e|w| +0#0000000&|P|a|i|r|(|B|i|n|:@1|n+0#af5f00255&|e|w|,+0#0000000&| |L|o|n|g|:@1|t|o|B|i|n|a|r|y|S|t|r|i|n|g|)|;| @11 -@12|c+0#af5f00255&|a|s|e| +0#0000000&|8+0#e000002&| +0#0000000&|-|>| |n+0#af5f00255&|e|w| +0#0000000&|P|a|i|r|(|O|c|t|:@1|n+0#af5f00255&|e|w|,+0#0000000&| |L|o|n|g|:@1|t|o|O|c|t|a|l|S|t|r|i|n|g|)|;| @12 -@12|c+0#af5f00255&|a|s|e| +0#0000000&|1+0#e000002&|6| +0#0000000&|-|>| |n+0#af5f00255&|e|w| +0#0000000&|P|a|i|r|(|H|e|x|:@1|n+0#af5f00255&|e|w|,+0#0000000&| |L|o|n|g|:@1|t|o|H|e|x|S|t|r|i|n|g|)|;| @13 -@12|d+0#af5f00255&|e|f|a|u|l|t| +0#0000000&|-|>| |n+0#af5f00255&|e|w| +0#0000000&|P|a|i|r|(|D|e|c|:@1|n+0#af5f00255&|e|w|,+0#0000000&| @33 +@12|c+0#af5f00255&|a|s|e| +0#0000000&|2+0#e000002&| +0#0000000&|-|>| |n+0#af5f00255&|e|w| +0#0000000&|P|a|i|r|(|B|i|n|:+0#00e0e07&@1|n+0#af5f00255&|e|w|,+0#0000000&| |L|o|n|g|:+0#00e0e07&@1|t+0#0000000&|o|B|i|n|a|r|y|S|t|r|i|n|g|)|;| @11 +@12|c+0#af5f00255&|a|s|e| +0#0000000&|8+0#e000002&| +0#0000000&|-|>| |n+0#af5f00255&|e|w| +0#0000000&|P|a|i|r|(|O|c|t|:+0#00e0e07&@1|n+0#af5f00255&|e|w|,+0#0000000&| |L|o|n|g|:+0#00e0e07&@1|t+0#0000000&|o|O|c|t|a|l|S|t|r|i|n|g|)|;| @12 +@12|c+0#af5f00255&|a|s|e| +0#0000000&|1+0#e000002&|6| +0#0000000&|-|>| |n+0#af5f00255&|e|w| +0#0000000&|P|a|i|r|(|H|e|x|:+0#00e0e07&@1|n+0#af5f00255&|e|w|,+0#0000000&| |L|o|n|g|:+0#00e0e07&@1|t+0#0000000&|o|H|e|x|S|t|r|i|n|g|)|;| @13 +@12|d+0#af5f00255&|e|f|a|u|l|t| +0#0000000&|-|>| |n+0#af5f00255&|e|w| +0#0000000&|P|a|i|r|(|D|e|c|:+0#00e0e07&@1|n+0#af5f00255&|e|w|,+0#0000000&| @33 @24|y+0#00e0e07&| |-|>| +0#0000000&|L|o|n|g|.|t|o|S|t|r|i|n|g|(|y|)@1|;| @27 @8|}|;| @64 @8|r+0#af5f00255&|e|t|u|r|n| +0#0000000&|p|.|a|(|)|.|a|p@1|l|y|(|L|o|n|g|.|p|a|r|s|e|L|o|n|g|(|p|.|b|(|)|.|a|p@1|l|y|(|x|)|,| |r|a|d|i|x|)@1|;| @8 diff --git a/runtime/syntax/testdir/dumps/java_generics_signature_05.dump b/runtime/syntax/testdir/dumps/java_generics_signature_05.dump index 5f93da4ff7..8c0fe84801 100644 --- a/runtime/syntax/testdir/dumps/java_generics_signature_05.dump +++ b/runtime/syntax/testdir/dumps/java_generics_signature_05.dump @@ -5,10 +5,10 @@ @8|r+0#00e0003&|e|c|o|r|d| +0#0000000&|P|a|i|r|(|L+0#0000001#ffff4012|o|n|g|F|u|n|c|t|i|o|n|<|N+0#ffffff16#ff404010|u|m|<|L+0#0000000#ffffff0|o|n|g|>+0#ffffff16#ff404010|>+0#0000001#ffff4012| +0#0000000#ffffff0|a|,| @28 @20>L+0#0000001#ffff4012|o|n|g|F|u|n|c|t|i|o|n|<|S+0#0000000#ffffff0|t|r|i|n|g|>+0#0000001#ffff4012| +0#0000000#ffffff0|b|)| |{| |}| @27 @8|f+0#4040ff13&|i|n|a|l| +0#0000000&|P|a|i|r| |p| |=| |s+0#af5f00255&|w|i|t|c|h| +0#0000000&|(|r|a|d|i|x|)| |{| @35 -@12|c+0#af5f00255&|a|s|e| +0#0000000&|2+0#e000002&| +0#0000000&|-|>| |n+0#af5f00255&|e|w| +0#0000000&|P|a|i|r|(|B|i|n|:@1|n+0#af5f00255&|e|w|,+0#0000000&| |L|o|n|g|:@1|t|o|B|i|n|a|r|y|S|t|r|i|n|g|)|;| @11 -@12|c+0#af5f00255&|a|s|e| +0#0000000&|8+0#e000002&| +0#0000000&|-|>| |n+0#af5f00255&|e|w| +0#0000000&|P|a|i|r|(|O|c|t|:@1|n+0#af5f00255&|e|w|,+0#0000000&| |L|o|n|g|:@1|t|o|O|c|t|a|l|S|t|r|i|n|g|)|;| @12 -@12|c+0#af5f00255&|a|s|e| +0#0000000&|1+0#e000002&|6| +0#0000000&|-|>| |n+0#af5f00255&|e|w| +0#0000000&|P|a|i|r|(|H|e|x|:@1|n+0#af5f00255&|e|w|,+0#0000000&| |L|o|n|g|:@1|t|o|H|e|x|S|t|r|i|n|g|)|;| @13 -@12|d+0#af5f00255&|e|f|a|u|l|t| +0#0000000&|-|>| |n+0#af5f00255&|e|w| +0#0000000&|P|a|i|r|(|D|e|c|:@1|n+0#af5f00255&|e|w|,+0#0000000&| @33 +@12|c+0#af5f00255&|a|s|e| +0#0000000&|2+0#e000002&| +0#0000000&|-|>| |n+0#af5f00255&|e|w| +0#0000000&|P|a|i|r|(|B|i|n|:+0#00e0e07&@1|n+0#af5f00255&|e|w|,+0#0000000&| |L|o|n|g|:+0#00e0e07&@1|t+0#0000000&|o|B|i|n|a|r|y|S|t|r|i|n|g|)|;| @11 +@12|c+0#af5f00255&|a|s|e| +0#0000000&|8+0#e000002&| +0#0000000&|-|>| |n+0#af5f00255&|e|w| +0#0000000&|P|a|i|r|(|O|c|t|:+0#00e0e07&@1|n+0#af5f00255&|e|w|,+0#0000000&| |L|o|n|g|:+0#00e0e07&@1|t+0#0000000&|o|O|c|t|a|l|S|t|r|i|n|g|)|;| @12 +@12|c+0#af5f00255&|a|s|e| +0#0000000&|1+0#e000002&|6| +0#0000000&|-|>| |n+0#af5f00255&|e|w| +0#0000000&|P|a|i|r|(|H|e|x|:+0#00e0e07&@1|n+0#af5f00255&|e|w|,+0#0000000&| |L|o|n|g|:+0#00e0e07&@1|t+0#0000000&|o|H|e|x|S|t|r|i|n|g|)|;| @13 +@12|d+0#af5f00255&|e|f|a|u|l|t| +0#0000000&|-|>| |n+0#af5f00255&|e|w| +0#0000000&|P|a|i|r|(|D|e|c|:+0#00e0e07&@1|n+0#af5f00255&|e|w|,+0#0000000&| @33 @24|y| |-+0#00e0e07&|>| +0#0000000&|L|o|n|g|.|t|o|S|t|r|i|n|g|(|y|)@1|;| @27 @8|}|;| @64 @8|r+0#af5f00255&|e|t|u|r|n| +0#0000000&|p|.|a|(|)|.|a|p@1|l|y|(|L|o|n|g|.|p|a|r|s|e|L|o|n|g|(|p|.|b|(|)|.|a|p@1|l|y|(|x|)|,| |r|a|d|i|x|)@1|;| @8 diff --git a/runtime/syntax/testdir/dumps/java_lambda_expressions_07.dump b/runtime/syntax/testdir/dumps/java_lambda_expressions_07.dump index 7749ef2b64..5d11fe37e6 100644 --- a/runtime/syntax/testdir/dumps/java_lambda_expressions_07.dump +++ b/runtime/syntax/testdir/dumps/java_lambda_expressions_07.dump @@ -15,6 +15,6 @@ @12|c+0#af5f00255&|a|s|e| +0#0000000&|S|t|r|i|n|g| |s|t|r|_| @7|-|>| |s|t|r|_|;| @30 @12|}|)|:| @8|{| |e|c|h|o|(|s|t|r|)|;| |b+0#af5f00255&|r|e|a|k|;+0#0000000&| |}| @29 @8|c+0#af5f00255&|a|s|e| +0#0000000&|n+0#e000002&|u|l@1|:+0#0000000&| |d+0#af5f00255&|e|f|a|u|l|t|:+0#0000000&| @4|{| |e|c|h|o|(|"+0#e000002&|O|t|h|e|r|"|)+0#0000000&|;| |}| @24 -@8|}|;| @64 +@8|}| @65 @75 @57|1|2|7|,|3|-|9| @6|8|9|%| diff --git a/runtime/syntax/testdir/dumps/java_lambda_expressions_signature_07.dump b/runtime/syntax/testdir/dumps/java_lambda_expressions_signature_07.dump index 4b035bf0b0..0658867466 100644 --- a/runtime/syntax/testdir/dumps/java_lambda_expressions_signature_07.dump +++ b/runtime/syntax/testdir/dumps/java_lambda_expressions_signature_07.dump @@ -15,6 +15,6 @@ @12|c+0#af5f00255&|a|s|e| +0#0000000&|S|t|r|i|n|g| |s|t|r|_| @7|-|>| |s|t|r|_|;| @30 @12|}|)|:| @8|{| |e|c|h|o|(|s|t|r|)|;| |b+0#af5f00255&|r|e|a|k|;+0#0000000&| |}| @29 @8|c+0#af5f00255&|a|s|e| +0#0000000&|n+0#e000002&|u|l@1|:+0#0000000&| |d+0#af5f00255&|e|f|a|u|l|t|:+0#0000000&| @4|{| |e|c|h|o|(|"+0#e000002&|O|t|h|e|r|"|)+0#0000000&|;| |}| @24 -@8|}|;| @64 +@8|}| @65 @75 @57|1|2|7|,|3|-|9| @6|8|9|%| diff --git a/runtime/syntax/testdir/dumps/java_method_references_00.dump b/runtime/syntax/testdir/dumps/java_method_references_00.dump new file mode 100644 index 0000000000..72ea3ca0c8 --- /dev/null +++ b/runtime/syntax/testdir/dumps/java_method_references_00.dump @@ -0,0 +1,20 @@ +>/+0#0000e05#ffffff0@1| |V|I|M|_|T|E|S|T|_|S|E|T|U|P| |l|e|t| |g|:|j|a|v|a|_|h|i|g|h|l|i|g|h|t|_|f|u|n|c|t|i|o|n|s| |=| |'|s|t|y|l|e|'| +0#0000000&@16 +|/+0#0000e05&@1| |V|I|M|_|T|E|S|T|_|S|E|T|U|P| |l|e|t| |g|:|j|a|v|a|_|h|i|g|h|l|i|g|h|t|_|g|e|n|e|r|i|c|s| |=| |1| +0#0000000&@23 +@75 +@75 +|i+0#e000e06&|m|p|o|r|t| +0#0000000&|j|a|v|a|.|l|a|n|g|.|i|n|v|o|k|e|.|M|e|t|h|o|d|H|a|n|d|l|e|;| @37 +|i+0#e000e06&|m|p|o|r|t| +0#0000000&|j|a|v|a|.|u|t|i|l|.|f|u|n|c|t|i|o|n|.|B|i|P|r|e|d|i|c|a|t|e|;| @36 +|i+0#e000e06&|m|p|o|r|t| +0#0000000&|j|a|v|a|.|u|t|i|l|.|f|u|n|c|t|i|o|n|.|C|o|n|s|u|m|e|r|;| @39 +|i+0#e000e06&|m|p|o|r|t| +0#0000000&|j|a|v|a|.|u|t|i|l|.|f|u|n|c|t|i|o|n|.|F|u|n|c|t|i|o|n|;| @39 +|i+0#e000e06&|m|p|o|r|t| +0#0000000&|j|a|v|a|.|u|t|i|l|.|f|u|n|c|t|i|o|n|.|I|n|t|F|u|n|c|t|i|o|n|;| @36 +|i+0#e000e06&|m|p|o|r|t| +0#0000000&|j|a|v|a|.|u|t|i|l|.|f|u|n|c|t|i|o|n|.|I|n|t|S|u|p@1|l|i|e|r|;| @36 +|i+0#e000e06&|m|p|o|r|t| +0#0000000&|j|a|v|a|.|u|t|i|l|.|f|u|n|c|t|i|o|n|.|P|r|e|d|i|c|a|t|e|;| @38 +|i+0#e000e06&|m|p|o|r|t| +0#0000000&|j|a|v|a|.|u|t|i|l|.|f|u|n|c|t|i|o|n|.|S|u|p@1|l|i|e|r|;| @39 +|i+0#e000e06&|m|p|o|r|t| +0#0000000&|j|a|v|a|.|u|t|i|l|.|f|u|n|c|t|i|o|n|.|T|o|I|n|t|F|u|n|c|t|i|o|n|;| @34 +|i+0#e000e06&|m|p|o|r|t| +0#0000000&|j|a|v|a|.|u|t|i|l|.|f|u|n|c|t|i|o|n|.|U|n|a|r|y|O|p|e|r|a|t|o|r|;| @34 +@75 +|c+0#00e0003&|l|a|s@1| +0#0000000&|M|e|t|h|o|d|R|e|f|e|r|e|n|c|e|s|T|e|s|t|s| @47 +|{| @73 +@4|s+0#00e0003&|t|a|t|i|c| +0#0000000&|{| @62 +@8|/+0#0000e05&@1| |P|r|i|m|a|r|y| |:@1| |[|T|y|p|e|A|r|g|u|m|e|n|t|s|]| |I|d|e|n|t|i|f|i|e|r| +0#0000000&@26 +@57|1|,|1| @10|T|o|p| diff --git a/runtime/syntax/testdir/dumps/java_method_references_01.dump b/runtime/syntax/testdir/dumps/java_method_references_01.dump new file mode 100644 index 0000000000..a1c03956f9 --- /dev/null +++ b/runtime/syntax/testdir/dumps/java_method_references_01.dump @@ -0,0 +1,20 @@ +|i+0#e000e06#ffffff0|m|p|o|r|t| +0#0000000&|j|a|v|a|.|u|t|i|l|.|f|u|n|c|t|i|o|n|.|U|n|a|r|y|O|p|e|r|a|t|o|r|;| @34 +@75 +|c+0#00e0003&|l|a|s@1| +0#0000000&|M|e|t|h|o|d|R|e|f|e|r|e|n|c|e|s|T|e|s|t|s| @47 +|{| @73 +@4|s+0#00e0003&|t|a|t|i|c| +0#0000000&|{| @62 +@8>/+0#0000e05&@1| |P|r|i|m|a|r|y| |:@1| |[|T|y|p|e|A|r|g|u|m|e|n|t|s|]| |I|d|e|n|t|i|f|i|e|r| +0#0000000&@26 +@8|t+0#af5f00255&|r|y| +0#0000000&|{| @61 +@12|R|u|n@1|a|b|l|e| |r|1| |=| |(@1|R|u|n|t|i|m|e|)| |n+0#e000002&|u|l@1|)+0#0000000&|:+0#00e0e07&@1|g+0#0000000&|c|;| @27 +@8|}| |c+0#af5f00255&|a|t|c|h| +0#0000000&|(|N|u|l@1|P|o|i|n|t|e|r|E|x|c|e|p|t|i|o|n| |e|x|p|e|c|t|e|d|)| |{| @25 +@8|}| @65 +@75 +@8|S+0#00e0e07&|u|p@1|l|i|e|r|<|I+0#0000000&|n|t|e|g|e|r|>+0#00e0e07&| +0#0000000&|s|1| |=| |(@1|N|u|m|b|e|r|)| |0+0#e000002&|)+0#0000000&|:+0#00e0e07&@1|h+0#0000000&|a|s|h|C|o|d|e|;| @20 +@8|S+0#00e0e07&|u|p@1|l|i|e|r|<|I+0#0000000&|n|t|e|g|e|r|>+0#00e0e07&| +0#0000000&|s|2| |=| |(@1|C+0#00e0e07&|o|m|p|a|r|a|b|l|e|<|?+0#0000000&|>+0#00e0e07&|)+0#0000000&| |'+0#e000002&|\+0#e000e06&|0|'+0#e000002&|)+0#0000000&|:+0#00e0e07&@1|h+0#0000000&|a|s|h|C|o|d|e|;| @10 +@8|S+0#00e0e07&|u|p@1|l|i|e|r|<|I+0#0000000&|n|t|e|g|e|r|>+0#00e0e07&| +0#0000000&|s|3| |=| |(@1|C+0#00e0e07&|o|m|p|a|r|a|b|l|e|<|?+0#0000000&|>+0#00e0e07&|)+0#0000000&| |f+0#e000002&|a|l|s|e|)+0#0000000&|:+0#00e0e07&@1|h+0#0000000&|a|s|h|C|o|d|e|;| @9 +@8|S+0#00e0e07&|u|p@1|l|i|e|r|<|I+0#0000000&|n|t|e|g|e|r|>+0#00e0e07&| +0#0000000&|s|4| |=| |"+0#e000002&|:@1|"|:+0#00e0e07&@1|h+0#0000000&|a|s|h|C|o|d|e|;| @28 +@8|S+0#00e0e07&|u|p@1|l|i|e|r|<|C+0#00e0003&|l|a|s@1|<|?+0#0000000&|>+0#00e0003&|>+0#00e0e07&| +0#0000000&|s|5| |=| |i+0#00e0003&|n|t|[+0#0000000&|]|.|c+0#00e0003&|l|a|s@1|:+0#00e0e07&@1|a+0#0000000&|r@1|a|y|T|y|p|e|;| @19 +@8|S+0#00e0e07&|u|p@1|l|i|e|r|<|I+0#0000000&|n|t|e|g|e|r|>+0#00e0e07&| +0#0000000&|s|6| |=| |n+0#af5f00255&|e|w| +0#0000000&|M|e|t|h|o|d|R|e|f|e|r|e|n|c|e|s|T|e|s|t|s|(|)| |:+0#00e0e07&@1| +0#0000000&@13 +@12|h|a|s|h|C|o|d|e|;| @53 +@8|S+0#00e0e07&|u|p@1|l|i|e|r|<|I+0#0000000&|n|t|e|g|e|r|>+0#00e0e07&| +0#0000000&|s|7| |=| |(@1|N|u|m|b|e|r|)| @34 +@57|1|9|,|3|-|9| @8|7|%| diff --git a/runtime/syntax/testdir/dumps/java_method_references_02.dump b/runtime/syntax/testdir/dumps/java_method_references_02.dump new file mode 100644 index 0000000000..790c0e2b68 --- /dev/null +++ b/runtime/syntax/testdir/dumps/java_method_references_02.dump @@ -0,0 +1,20 @@ +| +0&#ffffff0@7|S+0#00e0e07&|u|p@1|l|i|e|r|<|I+0#0000000&|n|t|e|g|e|r|>+0#00e0e07&| +0#0000000&|s|7| |=| |(@1|N|u|m|b|e|r|)| @34 +@12|(|n+0#af5f00255&|e|w| +0#0000000&|M|e|t|h|o|d|R|e|f|e|r|e|n|c|e|s|T|e|s|t|s|(|)|.|x|y|)|[|0+0#e000002&|]+0#0000000&|)|:+0#00e0e07&@1|i+0#0000000&|n|t|V|a|l|u|e|;| @15 +@8|S+0#00e0e07&|u|p@1|l|i|e|r|<|i+0#00e0003&|n|t|[+0#0000000&|]|>+0#00e0e07&| +0#0000000&|s|8| |=| |n+0#af5f00255&|e|w| +0#0000000&|M|e|t|h|o|d|R|e|f|e|r|e|n|c|e|s|T|e|s|t|s|(|)|.|x|y|:+0#00e0e07&@1| +0#0000000&@13 +@12|c|l|o|n|e|;| @56 +@8|C+0#00e0e07&|o|n|s|u|m|e|r|<|O+0#0000000&|b|j|e|c|t|>+0#00e0e07&| +0#0000000&|c|1| |=| |S|y|s|t|e|m|.|o|u|t| |:+0#00e0e07&@1| +0#0000000&|p|r|i|n|t|l|n|;| @22 +@8>S+0#00e0e07&|u|p@1|l|i|e|r|<|b+0#00e0003&|y|t|e|[+0#0000000&|]|>+0#00e0e07&| +0#0000000&|s|9| |=| |(@1|S+0#00e0e07&|u|p@1|l|i|e|r|<|S+0#0000000&|t|r|i|n|g|>+0#00e0e07&|)+0#0000000&| |(+0#00e0e07&|)|-|>|"+0#e000002&|(|)|"|)+0#0000000&|.|g|e|t|(|)| @9 +@12|:+0#00e0e07&@1|g+0#0000000&|e|t|B|y|t|e|s|;| @51 +@8|S+0#00e0e07&|u|p@1|l|i|e|r|<|S+0#0000000&|t|r|i|n|g|>+0#00e0e07&| +0#0000000&|s|a| |=| |(@1|S+0#00e0e07&|u|p@1|l|i|e|r|<|S+0#0000000&|t|r|i|n|g|>+0#00e0e07&|)+0#0000000&| @25 +@12|(@1|S+0#00e0e07&|u|p@1|l|i|e|r|<|S+0#0000000&|t|r|i|n|g|>+0#00e0e07&|)+0#0000000&| |(@1|S+0#00e0e07&|u|p@1|l|i|e|r|<|S+0#0000000&|t|r|i|n|g|>+0#00e0e07&|)+0#0000000&| @23 +@12|(@1|S+0#00e0e07&|u|p@1|l|i|e|r|<|S+0#0000000&|t|r|i|n|g|>+0#00e0e07&|)+0#0000000&| |(@1|S+0#00e0e07&|u|p@1|l|i|e|r|<|S+0#0000000&|t|r|i|n|g|>+0#00e0e07&|)+0#0000000&| @23 +@12|(+0#00e0e07&|)| |-|>| +0#0000000&|"+0#e000002&|(|)| |-|>| |(|)|"|)+0#0000000&| @45 +@12|:+0#00e0e07&@1|t+0#0000000&|o|S|t|r|i|n|g|)| @51 +@12|:+0#00e0e07&@1|t+0#0000000&|o|S|t|r|i|n|g|)| @51 +@12|:+0#00e0e07&@1|g+0#0000000&|e|t|)| @56 +@12|:+0#00e0e07&@1|t+0#0000000&|o|S|t|r|i|n|g|)| @51 +@12|:+0#00e0e07&@1|t+0#0000000&|o|S|t|r|i|n|g|;| @51 +@75 +@8|/+0#0000e05&@1| |E|x|p|r|e|s@1|i|o|n|N|a|m|e| |:@1| |[|T|y|p|e|A|r|g|u|m|e|n|t|s|]| |I|d|e|n|t|i|f|i|e|r| +0#0000000&@19 +@8|/+0#0000e05&@1| |R|e|f|e|r|e|n|c|e|T|y|p|e| |:@1| |[|T|y|p|e|A|r|g|u|m|e|n|t|s|]| |I|d|e|n|t|i|f|i|e|r| +0#0000000&@20 +@57|3|7|,|3|-|9| @7|1|8|%| diff --git a/runtime/syntax/testdir/dumps/java_method_references_03.dump b/runtime/syntax/testdir/dumps/java_method_references_03.dump new file mode 100644 index 0000000000..0a3d817fb8 --- /dev/null +++ b/runtime/syntax/testdir/dumps/java_method_references_03.dump @@ -0,0 +1,20 @@ +| +0&#ffffff0@7|/+0#0000e05&@1| |R|e|f|e|r|e|n|c|e|T|y|p|e| |:@1| |[|T|y|p|e|A|r|g|u|m|e|n|t|s|]| |I|d|e|n|t|i|f|i|e|r| +0#0000000&@20 +@8|F+0#00e0e07&|u|n|c|t|i|o|n|<|S+0#0000000&|t|r|i|n|g|,| |I|n|t|S|u|p@1|l|i|e|r|>+0#00e0e07&| +0#0000000&|f|1| |=| |s+0#00e0e07&| |-|>| +0#0000000&@27 +@24|s| |:+0#00e0e07&@1| +0#0000000&|l|e|n|g|t|h|;| @38 +@8|F+0#00e0e07&|u|n|c|t|i|o|n|<|i+0#00e0003&|n|t|[+0#0000000&|]|[|]|,| |S+0#00e0003&|u|p@1|l|i|e|r|<|i|n|t|[+0#0000000&|]|>+0#00e0003&|>+0#00e0e07&| +0#0000000&|f|2| |=| |i+0#00e0e07&@1| |-|>| +0#0000000&@21 +@12|(@1|i+0#00e0003&|n|t|[+0#0000000&|]|)| |(|i@1|.|l|e|n|g|t|h| |>| |0+0#e000002&| +0#0000000&|?| |i@1|[|0+0#e000002&|]+0#0000000&| |:| |i@1|)@1| @24 +@28>:+0#00e0e07&@1| +0#0000000&|c|l|o|n|e|;| @37 +@8|U+0#00e0e07&|n|a|r|y|O|p|e|r|a|t|o|r|<|S+0#0000000&|t|r|i|n|g|>+0#00e0e07&| +0#0000000&|u|o|1| |=| |S|t|r|i|n|g|:+0#00e0e07&@1|v+0#0000000&|a|l|u|e|O|f|;| @22 +@8|T+0#00e0e07&|o|I|n|t|F|u|n|c|t|i|o|n|<|S+0#0000000&|t|r|i|n|g|>+0#00e0e07&| +0#0000000&|t|i|f|1| |=| |s+0#00e0e07&| |-|>| +0#0000000&|s|.|t|r|a|n|s|f|o|r|m|(| @20 +@24|S|t|r|i|n|g| |:+0#00e0e07&@1| +0#0000000&|l|e|n|g|t|h|)|;| @32 +@75 +@8|/+0#0000e05&@1| |C|l|a|s@1|T|y|p|e| |:@1| |[|T|y|p|e|A|r|g|u|m|e|n|t|s|]| |n|e|w| +0#0000000&@31 +@8|/+0#0000e05&@1| |A|r@1|a|y|T|y|p|e| |:@1| |n|e|w| +0#0000000&@47 +@8|F+0#00e0e07&|u|n|c|t|i|o|n|<|O+0#0000000&|b|j|e|c|t|,| |C|2|>+0#00e0e07&| +0#0000000&|f|3| |=| |C|2|:+0#00e0e07&@1|<+0#0000000&|O|b|j|e|c|t|>|n+0#af5f00255&|e|w|;+0#0000000&| @24 +@8|F+0#00e0e07&|u|n|c|t|i|o|n|<|C+0#0000000&|2|,| |C|2|.|C|2|1|>+0#00e0e07&| +0#0000000&|f|4| |=| |p+0#00e0e07&|c|i| |-|>| +0#0000000&|p|c|i|.|n+0#af5f00255&|e|w| +0#0000000&@26 +@20|<|S|t|r|i|n|g|>|C|2|1|(|n+0#e000002&|u|l@1|)+0#0000000&|;| |/+0#0000e05&@1| |C|f|.| |"|d|"|.| +0#0000000&@24 +@8|S+0#00e0e07&|u|p@1|l|i|e|r|<|C+0#00e0003&|1|<|?+0#0000000&|>+0#00e0003&|>+0#00e0e07&| +0#0000000&|s|b| |=| |C|1|:+0#00e0e07&@1|n+0#af5f00255&|e|w|;+0#0000000&| @37 +@8|F+0#00e0e07&|u|n|c|t|i|o|n|<|B+0#0000000&|y|t|e|,| |C+0#00e0003&|1|<|?+0#0000000&|>+0#00e0003&|>+0#00e0e07&| +0#0000000&|f|5| |=| |C+0#00e0e07&|1|<|V+0#0000000&|o|i|d|>+0#00e0e07&| +0#0000000&|:+0#00e0e07&@1| +0#0000000&|<|B|y|t|e|>| |n+0#af5f00255&|e|w|;+0#0000000&| @16 +@8|I+0#00e0e07&|n|t|F|u|n|c|t|i|o|n|<|C+0#00e0003&|1|<|?+0#0000000&|>+0#00e0003&|[|]|>+0#00e0e07&| +0#0000000&|i|f|1| |=| |C+0#00e0e07&|1|<|?+0#0000000&|>+0#00e0e07&|[|]| +0#0000000&|:+0#00e0e07&@1| +0#0000000&|n+0#af5f00255&|e|w|;+0#0000000&| @24 +@8|I+0#00e0e07&|n|t|F|u|n|c|t|i|o|n|<|b+0#00e0003&|y|t|e|[+0#0000000&|]|>+0#00e0e07&| +0#0000000&|i|f|2| |=| |b+0#00e0003&|y|t|e|[+0#0000000&|]| |:+0#00e0e07&@1| +0#0000000&|n+0#af5f00255&|e|w|;+0#0000000&| @26 +@57|5@1|,|8|-|2|9| @6|2|9|%| diff --git a/runtime/syntax/testdir/dumps/java_method_references_04.dump b/runtime/syntax/testdir/dumps/java_method_references_04.dump new file mode 100644 index 0000000000..25211f07c2 --- /dev/null +++ b/runtime/syntax/testdir/dumps/java_method_references_04.dump @@ -0,0 +1,20 @@ +| +0&#ffffff0@7|I+0#00e0e07&|n|t|F|u|n|c|t|i|o|n|<|b+0#00e0003&|y|t|e|[+0#0000000&|]|>+0#00e0e07&| +0#0000000&|i|f|2| |=| |b+0#00e0003&|y|t|e|[+0#0000000&|]| |:+0#00e0e07&@1| +0#0000000&|n+0#af5f00255&|e|w|;+0#0000000&| @26 +@4|}| @69 +@75 +@4|f+0#4040ff13&|i|n|a|l| +0#0000000&|i+0#00e0003&|n|t|[+0#0000000&|]| |x|y| |=| |{| |0+0#e000002&|,+0#0000000&| |1+0#e000002&| +0#0000000&|}|;| @44 +@75 +@4>/+0#0000e05&@1| |s|u|p|e|r| |:@1| |[|T|y|p|e|A|r|g|u|m|e|n|t|s|]| |I|d|e|n|t|i|f|i|e|r| +0#0000000&@32 +@4|/+0#0000e05&@1| |T|y|p|e|N|a|m|e| |.| |s|u|p|e|r| |:@1| |[|T|y|p|e|A|r|g|u|m|e|n|t|s|]| |I|d|e|n|t|i|f|i|e|r| +0#0000000&@21 +@4|<|T|>| |M|e|t|h|o|d|R|e|f|e|r|e|n|c|e|s|T|e|s|t|s|(|)| @43 +@4|{| @69 +@8|P+0#00e0e07&|r|e|d|i|c|a|t|e|<|T+0#0000000&|>+0#00e0e07&| +0#0000000&|p|1| |=| |M|e|t|h|o|d|R|e|f|e|r|e|n|c|e|s|T|e|s|t|s|.|s+0#00e0003&|u|p|e|r|:+0#00e0e07&@1|e+0#0000000&|q|u|a|l|s|;| @12 +@8|P+0#00e0e07&|r|e|d|i|c|a|t|e|<|T+0#0000000&|>+0#00e0e07&| +0#0000000&|p|2| |=| |M|e|t|h|o|d|R|e|f|e|r|e|n|c|e|s|T|e|s|t|s|.|t+0#00e0003&|h|i|s|:+0#00e0e07&@1|e+0#0000000&|q|u|a|l|s|;| @13 +@4|}| @69 +@75 +@4|i+0#00e0003&|n|t|e|r|f|a|c|e| +0#0000000&|I+0#00e0e07&|4|<|T+0#0000000&|>+0#00e0e07&| +0#0000000&|e+0#00e0003&|x|t|e|n|d|s| +0#0000000&|I+0#00e0e07&|3|<|T+0#0000000&|>+0#00e0e07&| +0#0000000&@41 +@4|{| @69 +| +0#00e0e07&@7|d+0#4040ff13&|e|f|a|u|l|t| +0#00e0e07&|P|r|e|d|i|c|a|t|e|<|T+0#0000000&|>+0#00e0e07&| |s|u|p|e|r|E|q|u|a|l|i|s|t|(|)| +0#0000000&@30 +@8|{| @65 +@12|r+0#af5f00255&|e|t|u|r|n| +0#0000000&|I|3| @53 +@16|.|s+0#00e0003&|u|p|e|r|:+0#00e0e07&@1|e+0#0000000&|q|u|a|l|s|;| |/+0#0000e05&|*| |"|a|"| |*|/| +0#0000000&@33 +@57|7|3|,|2|-|5| @7|4|0|%| diff --git a/runtime/syntax/testdir/dumps/java_method_references_05.dump b/runtime/syntax/testdir/dumps/java_method_references_05.dump new file mode 100644 index 0000000000..3ebf3fbef7 --- /dev/null +++ b/runtime/syntax/testdir/dumps/java_method_references_05.dump @@ -0,0 +1,20 @@ +| +0&#ffffff0@15|.|s+0#00e0003&|u|p|e|r|:+0#00e0e07&@1|e+0#0000000&|q|u|a|l|s|;| |/+0#0000e05&|*| |"|a|"| |*|/| +0#0000000&@33 +@8|}| @65 +@4|}| @69 +@75 +@4|i+0#00e0003&|n|t|e|r|f|a|c|e| +0#0000000&|I+0#00e0e07&|3|<|T+0#0000000&|>+0#00e0e07&| +0#0000000&|e+0#00e0003&|x|t|e|n|d|s| +0#0000000&|I+0#00e0e07&|2|<|T+0#0000000&|>+0#00e0e07&| +0#0000000&@41 +@4>{| @69 +| +0#00e0e07&@7|d+0#4040ff13&|e|f|a|u|l|t| +0#00e0e07&|P|r|e|d|i|c|a|t|e|<|T+0#0000000&|>+0#00e0e07&| |s|u|p|e|r|E|q|u|a|l|i|s|t|(|)| +0#0000000&@30 +@8|{| @65 +@12|r+0#af5f00255&|e|t|u|r|n| +0#0000000&|I|2|.| @52 +@16|s+0#00e0003&|u|p|e|r|:+0#00e0e07&@1|e+0#0000000&|q|u|a|l|s|;| @1|/+0#0000e05&|*| |"|b|"| |*|/| +0#0000000&@33 +@8|}| @65 +@4|}| @69 +@75 +@4|i+0#00e0003&|n|t|e|r|f|a|c|e| +0#0000000&|I+0#00e0e07&|2|<|T+0#0000000&|>+0#00e0e07&| +0#0000000&|e+0#00e0003&|x|t|e|n|d|s| +0#0000000&|I+0#00e0e07&|1|<|T+0#0000000&|>+0#00e0e07&| +0#0000000&@41 +@4|{| @69 +| +0#00e0e07&@7|d+0#4040ff13&|e|f|a|u|l|t| +0#00e0e07&|P|r|e|d|i|c|a|t|e|<|T+0#0000000&|>+0#00e0e07&| |s|u|p|e|r|E|q|u|a|l|i|s|t|(|)| +0#0000000&@30 +@8|{| @2|/+0#0000e05&|*| |N|o|n|-|c|a|p|t|u|r|i|n|g| |g|y|m|n|a|s|t|i|c|s| |f|o|r| |s|u|p|e|r|:@1|e|q|u|a|l|s|.| |*|/| +0#0000000&@13 +@12|r+0#af5f00255&|e|t|u|r|n| +0#0000000&|F|u|n|c|t|i|o|n|.|<|F+0#00e0e07&|u|n|c|t|i|o|n|<|M+0#0000000&|e|t|h|o|d|H|a|n|d|l|e|,| @23 +@28|P+0#00e0003&|r|e|d|i|c|a|t|e|<|T+0#0000000&|>+0#00e0003&|>+0#00e0e07&|>+0#0000000&| @32 +@57|9|1|,|2|-|5| @7|5|0|%| diff --git a/runtime/syntax/testdir/dumps/java_method_references_06.dump b/runtime/syntax/testdir/dumps/java_method_references_06.dump new file mode 100644 index 0000000000..f1bd812cbf --- /dev/null +++ b/runtime/syntax/testdir/dumps/java_method_references_06.dump @@ -0,0 +1,20 @@ +| +0&#ffffff0@27|P+0#00e0003&|r|e|d|i|c|a|t|e|<|T+0#0000000&|>+0#00e0003&|>+0#00e0e07&|>+0#0000000&| @32 +@32|i|d|e|n|t|i|t|y|(|)| @32 +@16|.|a|p@1|l|y|(|m+0#00e0e07&|h| |-|>| +0#0000000&|o+0#00e0e07&| |-|>| +0#0000000&|M|e|t|h|o|d|R|e|f|e|r|e|n|c|e|s|T|e|s|t|s| @19 +@24|.|i|n|v|o|k|e|P|r|e|d|i|c|a|t|e|(|m|h|,| |o|)@1| @26 +@16|.|a|p@1|l|y|(|E|Q|U|A|L|S|.|b|i|n|d|T|o|(|t+0#00e0003&|h|i|s|)+0#0000000&@1|;| @30 +@8>}| @65 +@4|}| @69 +@75 +@4|i+0#00e0003&|n|t|e|r|f|a|c|e| +0#0000000&|I+0#00e0e07&|1|<|T+0#0000000&|>+0#00e0e07&| +0#0000000&@55 +@4|{| @69 +| +0#00e0e07&@7|d+0#4040ff13&|e|f|a|u|l|t| +0#00e0e07&|P|r|e|d|i|c|a|t|e|<|T+0#0000000&|>+0#00e0e07&| |e|q|u|a|l|i|s|t|(|)| +0#0000000&@35 +@8|{| @2|/+0#0000e05&|*| |N|o|n|-|c|a|p|t|u|r|i|n|g| |g|y|m|n|a|s|t|i|c|s| |f|o|r| |t|h|i|s|:@1|e|q|u|a|l|s|.| |*|/| +0#0000000&@14 +@12|r+0#af5f00255&|e|t|u|r|n| +0#0000000&|F|u|n|c|t|i|o|n|.|<|F+0#00e0e07&|u|n|c|t|i|o|n|<|I+0#00e0003&|1|<|T+0#0000000&|>+0#00e0003&|,+0#0000000&| |P+0#00e0003&|r|e|d|i|c|a|t|e|<|T+0#0000000&|>+0#00e0003&|>+0#00e0e07&|>+0#0000000&| @15 +@32|i|d|e|n|t|i|t|y|(|)| @32 +@16|.|a|p@1|l|y|(|t+0#00e0e07&|h|a|t| |-|>| +0#0000000&|o+0#00e0e07&| |-|>| +0#0000000&|F|u|n|c|t|i|o|n| @30 +@24|.|<|B+0#00e0e07&|i|P|r|e|d|i|c|a|t|e|<|I+0#00e0003&|1|<|T+0#0000000&|>+0#00e0003&|,+0#0000000&| |T|>+0#00e0e07&|>+0#0000000&| @26 +@32|i|d|e|n|t|i|t|y|(|)| @32 +@20|.|a|p@1|l|y|(|I+0#00e0e07&|1|<|T+0#0000000&|>+0#00e0e07&|:@1| +0#0000000&@1|/+0#0000e05&|*| |"|c|"| |*|/| +0#0000000&@29 +@24|e|q|u|a|l|s|)| @43 +@57|1|0|9|,|3|-|9| @6|6|1|%| diff --git a/runtime/syntax/testdir/dumps/java_method_references_07.dump b/runtime/syntax/testdir/dumps/java_method_references_07.dump new file mode 100644 index 0000000000..6f5549e96c --- /dev/null +++ b/runtime/syntax/testdir/dumps/java_method_references_07.dump @@ -0,0 +1,20 @@ +| +0&#ffffff0@23|e|q|u|a|l|s|)| @43 +@20|.|t|e|s|t|(|t|h|a|t|,| |o|)@1| @39 +@16|.|a|p@1|l|y|(|I|1|.|t+0#00e0003&|h|i|s|)+0#0000000&|;| @42 +@8|}| @65 +@4|}| @69 +> @74 +| +0#00e0e07&@3|s+0#00e0003&|t|a|t|i|c| +0#00e0e07&|<|T|>| |b+0#00e0003&|o@1|l|e|a|n| +0#00e0e07&|i|n|v|o|k|e|P|r|e|d|i|c|a|t|e|(|M|e|t|h|o|d|H|a|n|d|l|e| |m|h|,| |T| |o|)| +0#0000000&@14 +@4|{| @69 +@8|t+0#af5f00255&|r|y| +0#0000000&|{| @61 +@12|r+0#af5f00255&|e|t|u|r|n| +0#0000000&|(|b+0#00e0003&|o@1|l|e|a|n|)+0#0000000&| |m|h|.|i|n|v|o|k|e|E|x|a|c|t|(|o|)|;| @27 +@8|}| |c+0#af5f00255&|a|t|c|h| +0#0000000&|(|T|h|r|o|w|a|b|l|e| |t|h|)| |{| @42 +@12|t+0#af5f00255&|h|r|o|w| +0#0000000&|n+0#af5f00255&|e|w| +0#0000000&|R|u|n|t|i|m|e|E|x|c|e|p|t|i|o|n|(|t|h|)|;| @31 +@8|}| @65 +@4|}| @69 +@75 +@4|p+0#00e0003&|r|i|v|a|t|e| +0#0000000&|s+0#00e0003&|t|a|t|i|c| +0#0000000&|f+0#4040ff13&|i|n|a|l| +0#0000000&|M|e|t|h|o|d|H|a|n|d|l|e| |E|Q|U|A|L|S|;| @29 +@75 +@4|s+0#00e0003&|t|a|t|i|c| +0#0000000&|{| @62 +@8|t+0#af5f00255&|r|y| +0#0000000&|{| @61 +@57|1|2|7|,|0|-|1| @6|7|2|%| diff --git a/runtime/syntax/testdir/dumps/java_method_references_08.dump b/runtime/syntax/testdir/dumps/java_method_references_08.dump new file mode 100644 index 0000000000..537c5d5c63 --- /dev/null +++ b/runtime/syntax/testdir/dumps/java_method_references_08.dump @@ -0,0 +1,20 @@ +| +0&#ffffff0@7|t+0#af5f00255&|r|y| +0#0000000&|{| @61 +@12|E|Q|U|A|L|S| |=| |j|a|v|a|.|l|a|n|g|.|i|n|v|o|k|e|.|M|e|t|h|o|d|H|a|n|d|l|e|s|.|l|o@1|k|u|p|(|)| @14 +@28|.|f|i|n|d|S|p|e|c|i|a|l|(| @33 +@16|I|1|.|c+0#00e0003&|l|a|s@1|,+0#0000000&| @49 +@16|"+0#e000002&|e|q|u|a|l|s|"|,+0#0000000&| @49 +@16>j|a|v|a|.|l|a|n|g|.|i|n|v|o|k|e|.|M|e|t|h|o|d|T|y|p|e|.|m|e|t|h|o|d|T|y|p|e|(| @19 +@28|b+0#00e0003&|o@1|l|e|a|n|.+0#0000000&|c+0#00e0003&|l|a|s@1|,+0#0000000&| @32 +@28|O|b|j|e|c|t|.|c+0#00e0003&|l|a|s@1|)+0#0000000&|,| @32 +@16|I|2|.|c+0#00e0003&|l|a|s@1|)+0#0000000&|;| @48 +@8|}| |c+0#af5f00255&|a|t|c|h| +0#0000000&|(|R|e|f|l|e|c|t|i|v|e|O|p|e|r|a|t|i|o|n|E|x|c|e|p|t|i|o|n| |e|)| |{| @24 +@12|t+0#af5f00255&|h|r|o|w| +0#0000000&|n+0#af5f00255&|e|w| +0#0000000&|E|r@1|o|r|(|e|)|;| @43 +@8|}| @65 +@4|}| @69 +@75 +@4|s+0#00e0003&|t|a|t|i|c| +0#0000000&|c+0#00e0003&|l|a|s@1| +0#0000000&|C+0#00e0e07&|1|<|T+0#0000000&|>+0#00e0e07&| +0#0000000&@52 +@4|{| @69 +@8|C|1|(|)| |{| |}| @58 +@8|<|A|>| |C|1|(|A| |d|u|m@1|y|)| |{| |}| @47 +@4|}| @69 +@57|1|4|5|,|5|-|1|7| @5|8|3|%| diff --git a/runtime/syntax/testdir/dumps/java_method_references_09.dump b/runtime/syntax/testdir/dumps/java_method_references_09.dump new file mode 100644 index 0000000000..d5110b62cb --- /dev/null +++ b/runtime/syntax/testdir/dumps/java_method_references_09.dump @@ -0,0 +1,20 @@ +| +0&#ffffff0@3|}| @69 +@75 +@4|s+0#00e0003&|t|a|t|i|c| +0#0000000&|c+0#00e0003&|l|a|s@1| +0#0000000&|C|2| @55 +@4|{| @69 +@8|C|2|(|)| |{| |<|S|t|r|i|n|g|>| |t+0#00e0003&|h|i|s|(+0#0000000&|"+0#e000002&@1|)+0#0000000&|;| |}| @39 +> @74 +@8|<|A|>| |C|2|(|A| |d|u|m@1|y|)| @51 +@8|{| @65 +@12|C|2|.|s|t|r|i|n|g|e|r|(|)|.|a|p@1|l|y|(@2|F+0#00e0e07&|u|n|c|t|i|o|n|<|C+0#0000000&|2|,| |C|2|.|C|2|1|>+0#00e0e07&|)+0#0000000&| @19 +@24|C|2|.|C|2|1|:+0#00e0e07&@1|n+0#af5f00255&|e|w|)+0#0000000&| @3|/+0#0000e05&|*| |"|d|"| |*|/| +0#0000000&@25 +@20|.|a|p@1|l|y|(|C|2|.|t+0#00e0003&|h|i|s|)+0#0000000&@1|;| @37 +@8|}| @65 +@75 +@4| +0#00e0003&@3|c|l|a|s@1| +0#0000000&|C|2|1| @57 +@8|{| @65 +@12|C|2|1|(|)| |{| |<|S|t|r|i|n|g|>| |t+0#00e0003&|h|i|s|(+0#0000000&|"+0#e000002&@1|)+0#0000000&|;| |}| @34 +@75 +@12|<|B|>| |C|2|1|(|B| |d|u|m@1|y|)| @46 +@12|{| @61 +@57|1|6|3|,|0|-|1| @6|9|4|%| diff --git a/runtime/syntax/testdir/dumps/java_method_references_10.dump b/runtime/syntax/testdir/dumps/java_method_references_10.dump new file mode 100644 index 0000000000..19280b0218 --- /dev/null +++ b/runtime/syntax/testdir/dumps/java_method_references_10.dump @@ -0,0 +1,20 @@ +| +0&#ffffff0@11|{| @61 +@16|C|2|.|s|t|r|i|n|g|e|r|(|)|.|a|p@1|l|y|(|C|2|.|t+0#00e0003&|h|i|s|)+0#0000000&|;| @29 +@12|}| @61 +@8|}| @65 +@75 +| +0#00e0e07&@7>s+0#00e0003&|t|a|t|i|c| +0#00e0e07&|<|T| |e|x|t|e|n|d|s| |O|b|j|e|c|t|>| |F|u|n|c|t|i|o|n|<|T+0#0000000&|,+0#00e0e07&| |S+0#0000000&|t|r|i|n|g|>+0#00e0e07&| |s|t|r|i|n|g|e|r|(|)| +0#0000000&@10 +@8|{| @65 +@12|r+0#af5f00255&|e|t|u|r|n| +0#0000000&|T|:+0#00e0e07&@1|t+0#0000000&|o|S|t|r|i|n|g|;| |/+0#0000e05&|*| |"|e|"| |*|/| +0#0000000&@33 +@8|}| @65 +@4|}| @69 +|}| @73 +|~+0#4040ff13&| @73 +|~| @73 +|~| @73 +|~| @73 +|~| @73 +|~| @73 +|~| @73 +|~| @73 +| +0#0000000&@56|1|8|1|,|3|-|9| @6|B|o|t| diff --git a/runtime/syntax/testdir/dumps/java_method_references_signature_00.dump b/runtime/syntax/testdir/dumps/java_method_references_signature_00.dump new file mode 100644 index 0000000000..029e661258 --- /dev/null +++ b/runtime/syntax/testdir/dumps/java_method_references_signature_00.dump @@ -0,0 +1,20 @@ +>/+0#0000e05#ffffff0@1| |V|I|M|_|T|E|S|T|_|S|E|T|U|P| |l|e|t| |g|:|j|a|v|a|_|h|i|g|h|l|i|g|h|t|_|f|u|n|c|t|i|o|n|s| |=| |'|s|t|y|l|e|'| +0#0000000&@16 +|/+0#0000e05&@1| |V|I|M|_|T|E|S|T|_|S|E|T|U|P| |l|e|t| |g|:|j|a|v|a|_|h|i|g|h|l|i|g|h|t|_|s|i|g|n|a|t|u|r|e| |=| |1| +0#0000000&@22 +|/+0#0000e05&@1| |V|I|M|_|T|E|S|T|_|S|E|T|U|P| |l|e|t| |g|:|j|a|v|a|_|h|i|g|h|l|i|g|h|t|_|g|e|n|e|r|i|c|s| |=| |1| +0#0000000&@23 +@75 +|i+0#e000e06&|m|p|o|r|t| +0#0000000&|j|a|v|a|.|l|a|n|g|.|i|n|v|o|k|e|.|M|e|t|h|o|d|H|a|n|d|l|e|;| @37 +|i+0#e000e06&|m|p|o|r|t| +0#0000000&|j|a|v|a|.|u|t|i|l|.|f|u|n|c|t|i|o|n|.|B|i|P|r|e|d|i|c|a|t|e|;| @36 +|i+0#e000e06&|m|p|o|r|t| +0#0000000&|j|a|v|a|.|u|t|i|l|.|f|u|n|c|t|i|o|n|.|C|o|n|s|u|m|e|r|;| @39 +|i+0#e000e06&|m|p|o|r|t| +0#0000000&|j|a|v|a|.|u|t|i|l|.|f|u|n|c|t|i|o|n|.|F|u|n|c|t|i|o|n|;| @39 +|i+0#e000e06&|m|p|o|r|t| +0#0000000&|j|a|v|a|.|u|t|i|l|.|f|u|n|c|t|i|o|n|.|I|n|t|F|u|n|c|t|i|o|n|;| @36 +|i+0#e000e06&|m|p|o|r|t| +0#0000000&|j|a|v|a|.|u|t|i|l|.|f|u|n|c|t|i|o|n|.|I|n|t|S|u|p@1|l|i|e|r|;| @36 +|i+0#e000e06&|m|p|o|r|t| +0#0000000&|j|a|v|a|.|u|t|i|l|.|f|u|n|c|t|i|o|n|.|P|r|e|d|i|c|a|t|e|;| @38 +|i+0#e000e06&|m|p|o|r|t| +0#0000000&|j|a|v|a|.|u|t|i|l|.|f|u|n|c|t|i|o|n|.|S|u|p@1|l|i|e|r|;| @39 +|i+0#e000e06&|m|p|o|r|t| +0#0000000&|j|a|v|a|.|u|t|i|l|.|f|u|n|c|t|i|o|n|.|T|o|I|n|t|F|u|n|c|t|i|o|n|;| @34 +|i+0#e000e06&|m|p|o|r|t| +0#0000000&|j|a|v|a|.|u|t|i|l|.|f|u|n|c|t|i|o|n|.|U|n|a|r|y|O|p|e|r|a|t|o|r|;| @34 +@75 +|c+0#00e0003&|l|a|s@1| +0#0000000&|M|e|t|h|o|d|R|e|f|e|r|e|n|c|e|s|$|T|e|s|t|s| @46 +|{| @73 +@4|s+0#00e0003&|t|a|t|i|c| +0#0000000&|{| @62 +@8|/+0#0000e05&@1| |P|r|i|m|a|r|y| |:@1| |[|T|y|p|e|A|r|g|u|m|e|n|t|s|]| |I|d|e|n|t|i|f|i|e|r| +0#0000000&@26 +@57|1|,|1| @10|T|o|p| diff --git a/runtime/syntax/testdir/dumps/java_method_references_signature_01.dump b/runtime/syntax/testdir/dumps/java_method_references_signature_01.dump new file mode 100644 index 0000000000..13d64f5337 --- /dev/null +++ b/runtime/syntax/testdir/dumps/java_method_references_signature_01.dump @@ -0,0 +1,20 @@ +|i+0#e000e06#ffffff0|m|p|o|r|t| +0#0000000&|j|a|v|a|.|u|t|i|l|.|f|u|n|c|t|i|o|n|.|U|n|a|r|y|O|p|e|r|a|t|o|r|;| @34 +@75 +|c+0#00e0003&|l|a|s@1| +0#0000000&|M|e|t|h|o|d|R|e|f|e|r|e|n|c|e|s|$|T|e|s|t|s| @46 +|{| @73 +@4|s+0#00e0003&|t|a|t|i|c| +0#0000000&|{| @62 +@8>/+0#0000e05&@1| |P|r|i|m|a|r|y| |:@1| |[|T|y|p|e|A|r|g|u|m|e|n|t|s|]| |I|d|e|n|t|i|f|i|e|r| +0#0000000&@26 +@8|t+0#af5f00255&|r|y| +0#0000000&|{| @61 +@12|R|u|n@1|a|b|l|e| |r|1| |=| |(@1|R|u|n|t|i|m|e|)| |n+0#e000002&|u|l@1|)+0#0000000&|:+0#00e0e07&@1|g+0#0000000&|c|;| @27 +@8|}| |c+0#af5f00255&|a|t|c|h| +0#0000000&|(|N|u|l@1|P|o|i|n|t|e|r|E|x|c|e|p|t|i|o|n| |e|x|p|e|c|t|e|d|)| |{| @25 +@8|}| @65 +@75 +@8|S+0#00e0e07&|u|p@1|l|i|e|r|<|I+0#0000000&|n|t|e|g|e|r|>+0#00e0e07&| +0#0000000&|s|1| |=| |(@1|N|u|m|b|e|r|)| |0+0#e000002&|)+0#0000000&|:+0#00e0e07&@1|h+0#0000000&|a|s|h|C|o|d|e|;| @20 +@8|S+0#00e0e07&|u|p@1|l|i|e|r|<|I+0#0000000&|n|t|e|g|e|r|>+0#00e0e07&| +0#0000000&|s|2| |=| |(@1|C+0#00e0e07&|o|m|p|a|r|a|b|l|e|<|?+0#0000000&|>+0#00e0e07&|)+0#0000000&| |'+0#e000002&|\+0#e000e06&|0|'+0#e000002&|)+0#0000000&|:+0#00e0e07&@1|h+0#0000000&|a|s|h|C|o|d|e|;| @10 +@8|S+0#00e0e07&|u|p@1|l|i|e|r|<|I+0#0000000&|n|t|e|g|e|r|>+0#00e0e07&| +0#0000000&|s|3| |=| |(@1|C+0#00e0e07&|o|m|p|a|r|a|b|l|e|<|?+0#0000000&|>+0#00e0e07&|)+0#0000000&| |f+0#e000002&|a|l|s|e|)+0#0000000&|:+0#00e0e07&@1|h+0#0000000&|a|s|h|C|o|d|e|;| @9 +@8|S+0#00e0e07&|u|p@1|l|i|e|r|<|I+0#0000000&|n|t|e|g|e|r|>+0#00e0e07&| +0#0000000&|s|4| |=| |"+0#e000002&|:@1|"|:+0#00e0e07&@1|h+0#0000000&|a|s|h|C|o|d|e|;| @28 +@8|S+0#00e0e07&|u|p@1|l|i|e|r|<|C+0#00e0003&|l|a|s@1|<|?+0#0000000&|>+0#00e0003&|>+0#00e0e07&| +0#0000000&|s|5| |=| |i+0#00e0003&|n|t|[+0#0000000&|]|.|c+0#00e0003&|l|a|s@1|:+0#00e0e07&@1|a+0#0000000&|r@1|a|y|T|y|p|e|;| @19 +@8|S+0#00e0e07&|u|p@1|l|i|e|r|<|I+0#0000000&|n|t|e|g|e|r|>+0#00e0e07&| +0#0000000&|s|6| |=| |n+0#af5f00255&|e|w| +0#0000000&|M|e|t|h|o|d|R|e|f|e|r|e|n|c|e|s|$|T|e|s|t|s|(|)| |:+0#00e0e07&@1| +0#0000000&@12 +@12|h|a|s|h|C|o|d|e|;| @53 +@8|S+0#00e0e07&|u|p@1|l|i|e|r|<|I+0#0000000&|n|t|e|g|e|r|>+0#00e0e07&| +0#0000000&|s|7| |=| |(@1|N|u|m|b|e|r|)| @34 +@57|1|9|,|3|-|9| @8|7|%| diff --git a/runtime/syntax/testdir/dumps/java_method_references_signature_02.dump b/runtime/syntax/testdir/dumps/java_method_references_signature_02.dump new file mode 100644 index 0000000000..a223c38b75 --- /dev/null +++ b/runtime/syntax/testdir/dumps/java_method_references_signature_02.dump @@ -0,0 +1,20 @@ +| +0&#ffffff0@7|S+0#00e0e07&|u|p@1|l|i|e|r|<|I+0#0000000&|n|t|e|g|e|r|>+0#00e0e07&| +0#0000000&|s|7| |=| |(@1|N|u|m|b|e|r|)| @34 +@12|(|n+0#af5f00255&|e|w| +0#0000000&|M|e|t|h|o|d|R|e|f|e|r|e|n|c|e|s|$|T|e|s|t|s|(|)|.|x|y|)|[|0+0#e000002&|]+0#0000000&|)|:+0#00e0e07&@1|i+0#0000000&|n|t|V|a|l|u|e|;| @14 +@8|S+0#00e0e07&|u|p@1|l|i|e|r|<|i+0#00e0003&|n|t|[+0#0000000&|]|>+0#00e0e07&| +0#0000000&|s|8| |=| |n+0#af5f00255&|e|w| +0#0000000&|M|e|t|h|o|d|R|e|f|e|r|e|n|c|e|s|$|T|e|s|t|s|(|)|.|x|y|:+0#00e0e07&@1| +0#0000000&@12 +@12|c|l|o|n|e|;| @56 +@8|C+0#00e0e07&|o|n|s|u|m|e|r|<|O+0#0000000&|b|j|e|c|t|>+0#00e0e07&| +0#0000000&|c|1| |=| |S|y|s|t|e|m|.|o|u|t| |:+0#00e0e07&@1| +0#0000000&|p|r|i|n|t|l|n|;| @22 +@8>S+0#00e0e07&|u|p@1|l|i|e|r|<|b+0#00e0003&|y|t|e|[+0#0000000&|]|>+0#00e0e07&| +0#0000000&|s|9| |=| |(@1|S+0#00e0e07&|u|p@1|l|i|e|r|<|S+0#0000000&|t|r|i|n|g|>+0#00e0e07&|)+0#0000000&| |(+0#00e0e07&|)|-|>|"+0#e000002&|(|)|"|)+0#0000000&|.|g|e|t|(|)| @9 +@12|:+0#00e0e07&@1|g+0#0000000&|e|t|B|y|t|e|s|;| @51 +@8|S+0#00e0e07&|u|p@1|l|i|e|r|<|S+0#0000000&|t|r|i|n|g|>+0#00e0e07&| +0#0000000&|s|a| |=| |(@1|S+0#00e0e07&|u|p@1|l|i|e|r|<|S+0#0000000&|t|r|i|n|g|>+0#00e0e07&|)+0#0000000&| @25 +@12|(@1|S+0#00e0e07&|u|p@1|l|i|e|r|<|S+0#0000000&|t|r|i|n|g|>+0#00e0e07&|)+0#0000000&| |(@1|S+0#00e0e07&|u|p@1|l|i|e|r|<|S+0#0000000&|t|r|i|n|g|>+0#00e0e07&|)+0#0000000&| @23 +@12|(@1|S+0#00e0e07&|u|p@1|l|i|e|r|<|S+0#0000000&|t|r|i|n|g|>+0#00e0e07&|)+0#0000000&| |(@1|S+0#00e0e07&|u|p@1|l|i|e|r|<|S+0#0000000&|t|r|i|n|g|>+0#00e0e07&|)+0#0000000&| @23 +@12|(+0#00e0e07&|)| |-|>| +0#0000000&|"+0#e000002&|(|)| |-|>| |(|)|"|)+0#0000000&| @45 +@12|:+0#00e0e07&@1|t+0#0000000&|o|S|t|r|i|n|g|)| @51 +@12|:+0#00e0e07&@1|t+0#0000000&|o|S|t|r|i|n|g|)| @51 +@12|:+0#00e0e07&@1|g+0#0000000&|e|t|)| @56 +@12|:+0#00e0e07&@1|t+0#0000000&|o|S|t|r|i|n|g|)| @51 +@12|:+0#00e0e07&@1|t+0#0000000&|o|S|t|r|i|n|g|;| @51 +@75 +@8|/+0#0000e05&@1| |E|x|p|r|e|s@1|i|o|n|N|a|m|e| |:@1| |[|T|y|p|e|A|r|g|u|m|e|n|t|s|]| |I|d|e|n|t|i|f|i|e|r| +0#0000000&@19 +@8|/+0#0000e05&@1| |R|e|f|e|r|e|n|c|e|T|y|p|e| |:@1| |[|T|y|p|e|A|r|g|u|m|e|n|t|s|]| |I|d|e|n|t|i|f|i|e|r| +0#0000000&@20 +@57|3|7|,|3|-|9| @7|1|8|%| diff --git a/runtime/syntax/testdir/dumps/java_method_references_signature_03.dump b/runtime/syntax/testdir/dumps/java_method_references_signature_03.dump new file mode 100644 index 0000000000..85ea29bc47 --- /dev/null +++ b/runtime/syntax/testdir/dumps/java_method_references_signature_03.dump @@ -0,0 +1,20 @@ +| +0&#ffffff0@7|/+0#0000e05&@1| |R|e|f|e|r|e|n|c|e|T|y|p|e| |:@1| |[|T|y|p|e|A|r|g|u|m|e|n|t|s|]| |I|d|e|n|t|i|f|i|e|r| +0#0000000&@20 +@8|F+0#00e0e07&|u|n|c|t|i|o|n|<|S+0#0000000&|t|r|i|n|g|,| |I|n|t|S|u|p@1|l|i|e|r|>+0#00e0e07&| +0#0000000&|f|1| |=| |s| |-+0#00e0e07&|>| +0#0000000&@27 +@24|s| |:+0#00e0e07&@1| +0#0000000&|l|e|n|g|t|h|;| @38 +@8|F+0#00e0e07&|u|n|c|t|i|o|n|<|i+0#00e0003&|n|t|[+0#0000000&|]|[|]|,| |S+0#00e0003&|u|p@1|l|i|e|r|<|i|n|t|[+0#0000000&|]|>+0#00e0003&|>+0#00e0e07&| +0#0000000&|f|2| |=| |i@1| |-+0#00e0e07&|>| +0#0000000&@21 +@12|(@1|i+0#00e0003&|n|t|[+0#0000000&|]|)| |(|i@1|.|l|e|n|g|t|h| |>| |0+0#e000002&| +0#0000000&|?| |i@1|[|0+0#e000002&|]+0#0000000&| |:| |i@1|)@1| @24 +@28>:+0#00e0e07&@1| +0#0000000&|c|l|o|n|e|;| @37 +@8|U+0#00e0e07&|n|a|r|y|O|p|e|r|a|t|o|r|<|S+0#0000000&|t|r|i|n|g|>+0#00e0e07&| +0#0000000&|u|o|1| |=| |S|t|r|i|n|g|:+0#00e0e07&@1|v+0#0000000&|a|l|u|e|O|f|;| @22 +@8|T+0#00e0e07&|o|I|n|t|F|u|n|c|t|i|o|n|<|S+0#0000000&|t|r|i|n|g|>+0#00e0e07&| +0#0000000&|t|i|f|1| |=| |s| |-+0#00e0e07&|>| +0#0000000&|s|.|t|r|a|n|s|f|o|r|m|(| @20 +@24|S|t|r|i|n|g| |:+0#00e0e07&@1| +0#0000000&|l|e|n|g|t|h|)|;| @32 +@75 +@8|/+0#0000e05&@1| |C|l|a|s@1|T|y|p|e| |:@1| |[|T|y|p|e|A|r|g|u|m|e|n|t|s|]| |n|e|w| +0#0000000&@31 +@8|/+0#0000e05&@1| |A|r@1|a|y|T|y|p|e| |:@1| |n|e|w| +0#0000000&@47 +@8|F+0#00e0e07&|u|n|c|t|i|o|n|<|O+0#0000000&|b|j|e|c|t|,| |C|2|>+0#00e0e07&| +0#0000000&|f|3| |=| |C|2|:+0#00e0e07&@1|<+0#0000000&|O|b|j|e|c|t|>|n+0#af5f00255&|e|w|;+0#0000000&| @24 +@8|F+0#00e0e07&|u|n|c|t|i|o|n|<|C+0#0000000&|2|,| |C|2|.|C|2|1|>+0#00e0e07&| +0#0000000&|f|4| |=| |p|c|i| |-+0#00e0e07&|>| +0#0000000&|p|c|i|.|n+0#af5f00255&|e|w| +0#0000000&@26 +@20|<|S|t|r|i|n|g|>|C|2|1|(|n+0#e000002&|u|l@1|)+0#0000000&|;| |/+0#0000e05&@1| |C|f|.| |"|d|"|.| +0#0000000&@24 +@8|S+0#00e0e07&|u|p@1|l|i|e|r|<|C+0#00e0003&|1|<|?+0#0000000&|>+0#00e0003&|>+0#00e0e07&| +0#0000000&|s|b| |=| |C|1|:+0#00e0e07&@1|n+0#af5f00255&|e|w|;+0#0000000&| @37 +@8|F+0#00e0e07&|u|n|c|t|i|o|n|<|B+0#0000000&|y|t|e|,| |C+0#00e0003&|1|<|?+0#0000000&|>+0#00e0003&|>+0#00e0e07&| +0#0000000&|f|5| |=| |C+0#00e0e07&|1|<|V+0#0000000&|o|i|d|>+0#00e0e07&| +0#0000000&|:+0#00e0e07&@1| +0#0000000&|<|B|y|t|e|>| |n+0#af5f00255&|e|w|;+0#0000000&| @16 +@8|I+0#00e0e07&|n|t|F|u|n|c|t|i|o|n|<|C+0#00e0003&|1|<|?+0#0000000&|>+0#00e0003&|[|]|>+0#00e0e07&| +0#0000000&|i|f|1| |=| |C+0#00e0e07&|1|<|?+0#0000000&|>+0#00e0e07&|[|]| +0#0000000&|:+0#00e0e07&@1| +0#0000000&|n+0#af5f00255&|e|w|;+0#0000000&| @24 +@8|I+0#00e0e07&|n|t|F|u|n|c|t|i|o|n|<|b+0#00e0003&|y|t|e|[+0#0000000&|]|>+0#00e0e07&| +0#0000000&|i|f|2| |=| |b+0#00e0003&|y|t|e|[+0#0000000&|]| |:+0#00e0e07&@1| +0#0000000&|n+0#af5f00255&|e|w|;+0#0000000&| @26 +@57|5@1|,|8|-|2|9| @6|2|9|%| diff --git a/runtime/syntax/testdir/dumps/java_method_references_signature_04.dump b/runtime/syntax/testdir/dumps/java_method_references_signature_04.dump new file mode 100644 index 0000000000..5215cb27ab --- /dev/null +++ b/runtime/syntax/testdir/dumps/java_method_references_signature_04.dump @@ -0,0 +1,20 @@ +| +0&#ffffff0@7|I+0#00e0e07&|n|t|F|u|n|c|t|i|o|n|<|b+0#00e0003&|y|t|e|[+0#0000000&|]|>+0#00e0e07&| +0#0000000&|i|f|2| |=| |b+0#00e0003&|y|t|e|[+0#0000000&|]| |:+0#00e0e07&@1| +0#0000000&|n+0#af5f00255&|e|w|;+0#0000000&| @26 +@4|}| @69 +@75 +@4|f+0#4040ff13&|i|n|a|l| +0#0000000&|i+0#00e0003&|n|t|[+0#0000000&|]| |x|y| |=| |{| |0+0#e000002&|,+0#0000000&| |1+0#e000002&| +0#0000000&|}|;| @44 +@75 +@4>/+0#0000e05&@1| |s|u|p|e|r| |:@1| |[|T|y|p|e|A|r|g|u|m|e|n|t|s|]| |I|d|e|n|t|i|f|i|e|r| +0#0000000&@32 +@4|/+0#0000e05&@1| |T|y|p|e|N|a|m|e| |.| |s|u|p|e|r| |:@1| |[|T|y|p|e|A|r|g|u|m|e|n|t|s|]| |I|d|e|n|t|i|f|i|e|r| +0#0000000&@21 +@4|<|T|>| |M|e|t|h|o|d|R|e|f|e|r|e|n|c|e|s|$|T|e|s|t|s|(|)| @42 +@4|{| @69 +@8|P+0#00e0e07&|r|e|d|i|c|a|t|e|<|T+0#0000000&|>+0#00e0e07&| +0#0000000&|p|1| |=| |M|e|t|h|o|d|R|e|f|e|r|e|n|c|e|s|$|T|e|s|t|s|.|s+0#00e0003&|u|p|e|r|:+0#00e0e07&@1|e+0#0000000&|q|u|a|l|s|;| @11 +@8|P+0#00e0e07&|r|e|d|i|c|a|t|e|<|T+0#0000000&|>+0#00e0e07&| +0#0000000&|p|2| |=| |M|e|t|h|o|d|R|e|f|e|r|e|n|c|e|s|$|T|e|s|t|s|.|t+0#00e0003&|h|i|s|:+0#00e0e07&@1|e+0#0000000&|q|u|a|l|s|;| @12 +@4|}| @69 +@75 +@4|i+0#00e0003&|n|t|e|r|f|a|c|e| +0#0000000&|I+0#00e0e07&|4|<|T+0#0000000&|>+0#00e0e07&| +0#0000000&|e+0#00e0003&|x|t|e|n|d|s| +0#0000000&|I+0#00e0e07&|3|<|T+0#0000000&|>+0#00e0e07&| +0#0000000&@41 +@4|{| @69 +@8|d+0#4040ff13&|e|f|a|u|l|t| +0#0000000&|P+0#00e0e07&|r|e|d|i|c|a|t|e|<|T+0#0000000&|>+0#00e0e07&| +0#0000000&|s+0#00e0e07&|u|p|e|r|E|q|u|a|l|i|s|t|(|)| +0#0000000&@30 +@8|{| @65 +@12|r+0#af5f00255&|e|t|u|r|n| +0#0000000&|I|3| @53 +@16|.|s+0#00e0003&|u|p|e|r|:+0#00e0e07&@1|e+0#0000000&|q|u|a|l|s|;| |/+0#0000e05&|*| |"|a|"| |*|/| +0#0000000&@33 +@57|7|3|,|2|-|5| @7|4|0|%| diff --git a/runtime/syntax/testdir/dumps/java_method_references_signature_05.dump b/runtime/syntax/testdir/dumps/java_method_references_signature_05.dump new file mode 100644 index 0000000000..e508788733 --- /dev/null +++ b/runtime/syntax/testdir/dumps/java_method_references_signature_05.dump @@ -0,0 +1,20 @@ +| +0&#ffffff0@15|.|s+0#00e0003&|u|p|e|r|:+0#00e0e07&@1|e+0#0000000&|q|u|a|l|s|;| |/+0#0000e05&|*| |"|a|"| |*|/| +0#0000000&@33 +@8|}| @65 +@4|}| @69 +@75 +@4|i+0#00e0003&|n|t|e|r|f|a|c|e| +0#0000000&|I+0#00e0e07&|3|<|T+0#0000000&|>+0#00e0e07&| +0#0000000&|e+0#00e0003&|x|t|e|n|d|s| +0#0000000&|I+0#00e0e07&|2|<|T+0#0000000&|>+0#00e0e07&| +0#0000000&@41 +@4>{| @69 +@8|d+0#4040ff13&|e|f|a|u|l|t| +0#0000000&|P+0#00e0e07&|r|e|d|i|c|a|t|e|<|T+0#0000000&|>+0#00e0e07&| +0#0000000&|s+0#00e0e07&|u|p|e|r|E|q|u|a|l|i|s|t|(|)| +0#0000000&@30 +@8|{| @65 +@12|r+0#af5f00255&|e|t|u|r|n| +0#0000000&|I|2|.| @52 +@16|s+0#00e0003&|u|p|e|r|:+0#00e0e07&@1|e+0#0000000&|q|u|a|l|s|;| @1|/+0#0000e05&|*| |"|b|"| |*|/| +0#0000000&@33 +@8|}| @65 +@4|}| @69 +@75 +@4|i+0#00e0003&|n|t|e|r|f|a|c|e| +0#0000000&|I+0#00e0e07&|2|<|T+0#0000000&|>+0#00e0e07&| +0#0000000&|e+0#00e0003&|x|t|e|n|d|s| +0#0000000&|I+0#00e0e07&|1|<|T+0#0000000&|>+0#00e0e07&| +0#0000000&@41 +@4|{| @69 +@8|d+0#4040ff13&|e|f|a|u|l|t| +0#0000000&|P+0#00e0e07&|r|e|d|i|c|a|t|e|<|T+0#0000000&|>+0#00e0e07&| +0#0000000&|s+0#00e0e07&|u|p|e|r|E|q|u|a|l|i|s|t|(|)| +0#0000000&@30 +@8|{| @2|/+0#0000e05&|*| |N|o|n|-|c|a|p|t|u|r|i|n|g| |g|y|m|n|a|s|t|i|c|s| |f|o|r| |s|u|p|e|r|:@1|e|q|u|a|l|s|.| |*|/| +0#0000000&@13 +@12|r+0#af5f00255&|e|t|u|r|n| +0#0000000&|F|u|n|c|t|i|o|n|.|<|F+0#00e0e07&|u|n|c|t|i|o|n|<|M+0#0000000&|e|t|h|o|d|H|a|n|d|l|e|,| @23 +@28|P+0#00e0003&|r|e|d|i|c|a|t|e|<|T+0#0000000&|>+0#00e0003&|>+0#00e0e07&|>+0#0000000&| @32 +@57|9|1|,|2|-|5| @7|5|0|%| diff --git a/runtime/syntax/testdir/dumps/java_method_references_signature_06.dump b/runtime/syntax/testdir/dumps/java_method_references_signature_06.dump new file mode 100644 index 0000000000..a5234eca3e --- /dev/null +++ b/runtime/syntax/testdir/dumps/java_method_references_signature_06.dump @@ -0,0 +1,20 @@ +| +0&#ffffff0@27|P+0#00e0003&|r|e|d|i|c|a|t|e|<|T+0#0000000&|>+0#00e0003&|>+0#00e0e07&|>+0#0000000&| @32 +@32|i|d|e|n|t|i|t|y|(|)| @32 +@16|.|a|p@1|l|y|(|m|h| |-+0#00e0e07&|>| +0#0000000&|o| |-+0#00e0e07&|>| +0#0000000&|M|e|t|h|o|d|R|e|f|e|r|e|n|c|e|s|$|T|e|s|t|s| @18 +@24|.|i|n|v|o|k|e|P|r|e|d|i|c|a|t|e|(|m|h|,| |o|)@1| @26 +@16|.|a|p@1|l|y|(|E|Q|U|A|L|S|.|b|i|n|d|T|o|(|t+0#00e0003&|h|i|s|)+0#0000000&@1|;| @30 +@8>}| @65 +@4|}| @69 +@75 +@4|i+0#00e0003&|n|t|e|r|f|a|c|e| +0#0000000&|I+0#00e0e07&|1|<|T+0#0000000&|>+0#00e0e07&| +0#0000000&@55 +@4|{| @69 +@8|d+0#4040ff13&|e|f|a|u|l|t| +0#0000000&|P+0#00e0e07&|r|e|d|i|c|a|t|e|<|T+0#0000000&|>+0#00e0e07&| +0#0000000&|e+0#00e0e07&|q|u|a|l|i|s|t|(|)| +0#0000000&@35 +@8|{| @2|/+0#0000e05&|*| |N|o|n|-|c|a|p|t|u|r|i|n|g| |g|y|m|n|a|s|t|i|c|s| |f|o|r| |t|h|i|s|:@1|e|q|u|a|l|s|.| |*|/| +0#0000000&@14 +@12|r+0#af5f00255&|e|t|u|r|n| +0#0000000&|F|u|n|c|t|i|o|n|.|<|F+0#00e0e07&|u|n|c|t|i|o|n|<|I+0#00e0003&|1|<|T+0#0000000&|>+0#00e0003&|,+0#0000000&| |P+0#00e0003&|r|e|d|i|c|a|t|e|<|T+0#0000000&|>+0#00e0003&|>+0#00e0e07&|>+0#0000000&| @15 +@32|i|d|e|n|t|i|t|y|(|)| @32 +@16|.|a|p@1|l|y|(|t|h|a|t| |-+0#00e0e07&|>| +0#0000000&|o| |-+0#00e0e07&|>| +0#0000000&|F|u|n|c|t|i|o|n| @30 +@24|.|<|B+0#00e0e07&|i|P|r|e|d|i|c|a|t|e|<|I+0#00e0003&|1|<|T+0#0000000&|>+0#00e0003&|,+0#0000000&| |T|>+0#00e0e07&|>+0#0000000&| @26 +@32|i|d|e|n|t|i|t|y|(|)| @32 +@20|.|a|p@1|l|y|(|I+0#00e0e07&|1|<|T+0#0000000&|>+0#00e0e07&|:@1| +0#0000000&@1|/+0#0000e05&|*| |"|c|"| |*|/| +0#0000000&@29 +@24|e|q|u|a|l|s|)| @43 +@57|1|0|9|,|3|-|9| @6|6|1|%| diff --git a/runtime/syntax/testdir/dumps/java_method_references_signature_07.dump b/runtime/syntax/testdir/dumps/java_method_references_signature_07.dump new file mode 100644 index 0000000000..535f972a38 --- /dev/null +++ b/runtime/syntax/testdir/dumps/java_method_references_signature_07.dump @@ -0,0 +1,20 @@ +| +0&#ffffff0@23|e|q|u|a|l|s|)| @43 +@20|.|t|e|s|t|(|t|h|a|t|,| |o|)@1| @39 +@16|.|a|p@1|l|y|(|I|1|.|t+0#00e0003&|h|i|s|)+0#0000000&|;| @42 +@8|}| @65 +@4|}| @69 +> @74 +@4|s+0#00e0003&|t|a|t|i|c| +0#0000000&|<|T|>| |b+0#00e0003&|o@1|l|e|a|n| +0#0000000&|i+0#00e0e07&|n|v|o|k|e|P|r|e|d|i|c|a|t|e|(|M+0#0000000&|e|t|h|o|d|H|a|n|d|l|e| |m|h|,| |T| |o|)+0#00e0e07&| +0#0000000&@14 +@4|{| @69 +@8|t+0#af5f00255&|r|y| +0#0000000&|{| @61 +@12|r+0#af5f00255&|e|t|u|r|n| +0#0000000&|(|b+0#00e0003&|o@1|l|e|a|n|)+0#0000000&| |m|h|.|i|n|v|o|k|e|E|x|a|c|t|(|o|)|;| @27 +@8|}| |c+0#af5f00255&|a|t|c|h| +0#0000000&|(|T|h|r|o|w|a|b|l|e| |t|h|)| |{| @42 +@12|t+0#af5f00255&|h|r|o|w| +0#0000000&|n+0#af5f00255&|e|w| +0#0000000&|R|u|n|t|i|m|e|E|x|c|e|p|t|i|o|n|(|t|h|)|;| @31 +@8|}| @65 +@4|}| @69 +@75 +@4|p+0#00e0003&|r|i|v|a|t|e| +0#0000000&|s+0#00e0003&|t|a|t|i|c| +0#0000000&|f+0#4040ff13&|i|n|a|l| +0#0000000&|M|e|t|h|o|d|H|a|n|d|l|e| |E|Q|U|A|L|S|;| @29 +@75 +@4|s+0#00e0003&|t|a|t|i|c| +0#0000000&|{| @62 +@8|t+0#af5f00255&|r|y| +0#0000000&|{| @61 +@57|1|2|7|,|0|-|1| @6|7|2|%| diff --git a/runtime/syntax/testdir/dumps/java_method_references_signature_08.dump b/runtime/syntax/testdir/dumps/java_method_references_signature_08.dump new file mode 100644 index 0000000000..537c5d5c63 --- /dev/null +++ b/runtime/syntax/testdir/dumps/java_method_references_signature_08.dump @@ -0,0 +1,20 @@ +| +0&#ffffff0@7|t+0#af5f00255&|r|y| +0#0000000&|{| @61 +@12|E|Q|U|A|L|S| |=| |j|a|v|a|.|l|a|n|g|.|i|n|v|o|k|e|.|M|e|t|h|o|d|H|a|n|d|l|e|s|.|l|o@1|k|u|p|(|)| @14 +@28|.|f|i|n|d|S|p|e|c|i|a|l|(| @33 +@16|I|1|.|c+0#00e0003&|l|a|s@1|,+0#0000000&| @49 +@16|"+0#e000002&|e|q|u|a|l|s|"|,+0#0000000&| @49 +@16>j|a|v|a|.|l|a|n|g|.|i|n|v|o|k|e|.|M|e|t|h|o|d|T|y|p|e|.|m|e|t|h|o|d|T|y|p|e|(| @19 +@28|b+0#00e0003&|o@1|l|e|a|n|.+0#0000000&|c+0#00e0003&|l|a|s@1|,+0#0000000&| @32 +@28|O|b|j|e|c|t|.|c+0#00e0003&|l|a|s@1|)+0#0000000&|,| @32 +@16|I|2|.|c+0#00e0003&|l|a|s@1|)+0#0000000&|;| @48 +@8|}| |c+0#af5f00255&|a|t|c|h| +0#0000000&|(|R|e|f|l|e|c|t|i|v|e|O|p|e|r|a|t|i|o|n|E|x|c|e|p|t|i|o|n| |e|)| |{| @24 +@12|t+0#af5f00255&|h|r|o|w| +0#0000000&|n+0#af5f00255&|e|w| +0#0000000&|E|r@1|o|r|(|e|)|;| @43 +@8|}| @65 +@4|}| @69 +@75 +@4|s+0#00e0003&|t|a|t|i|c| +0#0000000&|c+0#00e0003&|l|a|s@1| +0#0000000&|C+0#00e0e07&|1|<|T+0#0000000&|>+0#00e0e07&| +0#0000000&@52 +@4|{| @69 +@8|C|1|(|)| |{| |}| @58 +@8|<|A|>| |C|1|(|A| |d|u|m@1|y|)| |{| |}| @47 +@4|}| @69 +@57|1|4|5|,|5|-|1|7| @5|8|3|%| diff --git a/runtime/syntax/testdir/dumps/java_method_references_signature_09.dump b/runtime/syntax/testdir/dumps/java_method_references_signature_09.dump new file mode 100644 index 0000000000..d5110b62cb --- /dev/null +++ b/runtime/syntax/testdir/dumps/java_method_references_signature_09.dump @@ -0,0 +1,20 @@ +| +0&#ffffff0@3|}| @69 +@75 +@4|s+0#00e0003&|t|a|t|i|c| +0#0000000&|c+0#00e0003&|l|a|s@1| +0#0000000&|C|2| @55 +@4|{| @69 +@8|C|2|(|)| |{| |<|S|t|r|i|n|g|>| |t+0#00e0003&|h|i|s|(+0#0000000&|"+0#e000002&@1|)+0#0000000&|;| |}| @39 +> @74 +@8|<|A|>| |C|2|(|A| |d|u|m@1|y|)| @51 +@8|{| @65 +@12|C|2|.|s|t|r|i|n|g|e|r|(|)|.|a|p@1|l|y|(@2|F+0#00e0e07&|u|n|c|t|i|o|n|<|C+0#0000000&|2|,| |C|2|.|C|2|1|>+0#00e0e07&|)+0#0000000&| @19 +@24|C|2|.|C|2|1|:+0#00e0e07&@1|n+0#af5f00255&|e|w|)+0#0000000&| @3|/+0#0000e05&|*| |"|d|"| |*|/| +0#0000000&@25 +@20|.|a|p@1|l|y|(|C|2|.|t+0#00e0003&|h|i|s|)+0#0000000&@1|;| @37 +@8|}| @65 +@75 +@4| +0#00e0003&@3|c|l|a|s@1| +0#0000000&|C|2|1| @57 +@8|{| @65 +@12|C|2|1|(|)| |{| |<|S|t|r|i|n|g|>| |t+0#00e0003&|h|i|s|(+0#0000000&|"+0#e000002&@1|)+0#0000000&|;| |}| @34 +@75 +@12|<|B|>| |C|2|1|(|B| |d|u|m@1|y|)| @46 +@12|{| @61 +@57|1|6|3|,|0|-|1| @6|9|4|%| diff --git a/runtime/syntax/testdir/dumps/java_method_references_signature_10.dump b/runtime/syntax/testdir/dumps/java_method_references_signature_10.dump new file mode 100644 index 0000000000..7bc18d819d --- /dev/null +++ b/runtime/syntax/testdir/dumps/java_method_references_signature_10.dump @@ -0,0 +1,20 @@ +| +0&#ffffff0@11|{| @61 +@16|C|2|.|s|t|r|i|n|g|e|r|(|)|.|a|p@1|l|y|(|C|2|.|t+0#00e0003&|h|i|s|)+0#0000000&|;| @29 +@12|}| @61 +@8|}| @65 +@75 +@8>s+0#00e0003&|t|a|t|i|c| +0#0000000&|<|T| |e+0#00e0003&|x|t|e|n|d|s| +0#0000000&|O|b|j|e|c|t|>| |F+0#00e0e07&|u|n|c|t|i|o|n|<|T+0#0000000&|,| |S|t|r|i|n|g|>+0#00e0e07&| +0#0000000&|s+0#00e0e07&|t|r|i|n|g|e|r|(|)| +0#0000000&@10 +@8|{| @65 +@12|r+0#af5f00255&|e|t|u|r|n| +0#0000000&|T|:+0#00e0e07&@1|t+0#0000000&|o|S|t|r|i|n|g|;| |/+0#0000e05&|*| |"|e|"| |*|/| +0#0000000&@33 +@8|}| @65 +@4|}| @69 +|}| @73 +|~+0#4040ff13&| @73 +|~| @73 +|~| @73 +|~| @73 +|~| @73 +|~| @73 +|~| @73 +|~| @73 +| +0#0000000&@56|1|8|1|,|3|-|9| @6|B|o|t| diff --git a/runtime/syntax/testdir/dumps/java_switch_03.dump b/runtime/syntax/testdir/dumps/java_switch_03.dump index afe2a1ad14..123a254f24 100644 --- a/runtime/syntax/testdir/dumps/java_switch_03.dump +++ b/runtime/syntax/testdir/dumps/java_switch_03.dump @@ -7,7 +7,7 @@ @8|c+0#af5f00255&|a|s|e| +0#0000000&|n+0#e000002&|u|l@1|:+0#0000000&| @5|{| |e|c|h|o|(|"+0#e000002&|n|u|l@1|"|)+0#0000000&|;| |b+0#af5f00255&|r|e|a|k|;+0#0000000&| |}| @26 @8|c+0#af5f00255&|a|s|e| +0#0000000&|L|e|t@1|e|r|s|[|]| |l@1|:| @1|{| |e|c|h|o|(|"+0#e000002&|S|w|i|t|c|h|T|e|s|t|s|$|1|L|e|t@1|e|r|s|[|]|"|)+0#0000000&|;| |b+0#af5f00255&|r|e|a|k|;+0#0000000&| |}| @4 @8|d+0#af5f00255&|e|f|a|u|l|t|:+0#0000000&| @7|{| |e|c|h|o|(|"+0#e000002&|j|a|v|a|.|l|a|n|g|.|O|b|j|e|c|t|"|)+0#0000000&|;| |b+0#af5f00255&|r|e|a|k|;+0#0000000&| |}| @14 -@8|}|;| @64 +@8|}| @65 @75 @8|e|c|h|o|(|s+0#af5f00255&|w|i|t|c|h| +0#0000000&|(|o|)| |{| @49 @12|c+0#af5f00255&|a|s|e| +0#0000000&|n+0#e000002&|u|l@1| +0#0000000&@6|-|>| |"+0#e000002&|n|u|l@1|"|;+0#0000000&| @36 diff --git a/runtime/syntax/testdir/dumps/java_switch_04.dump b/runtime/syntax/testdir/dumps/java_switch_04.dump index 0fc8cb0527..a2f1c866e3 100644 --- a/runtime/syntax/testdir/dumps/java_switch_04.dump +++ b/runtime/syntax/testdir/dumps/java_switch_04.dump @@ -3,7 +3,7 @@ @8|c+0#af5f00255&|a|s|e| +0#0000000&|'+0#e000002&|a|'|:+0#0000000&| @6|{| |e|c|h|o|(|'+0#e000002&|a|'|)+0#0000000&|;| |b+0#af5f00255&|r|e|a|k|;+0#0000000&| |}| @29 @8|c+0#af5f00255&|a|s|e| +0#0000000&|'+0#e000002&|b|'|:+0#0000000&| @6|{| |e|c|h|o|(|'+0#e000002&|b|'|)+0#0000000&|;| |b+0#af5f00255&|r|e|a|k|;+0#0000000&| |}| @29 @8|d+0#af5f00255&|e|f|a|u|l|t|:+0#0000000&| @7|{| |e|c|h|o|(|'+0#e000002&|\+0#e000e06&|u|0@3|'+0#e000002&|)+0#0000000&|;| |b+0#af5f00255&|r|e|a|k|;+0#0000000&| |}| @24 -@8>}|;| @64 +@8>}| @65 @75 @8|e|c|h|o|(|s+0#af5f00255&|w|i|t|c|h| +0#0000000&|(|c|h|)| |{| @48 @12|c+0#af5f00255&|a|s|e| +0#0000000&|'+0#e000002&|a|'| +0#0000000&@3|-|>| |'+0#e000002&|a|'|;+0#0000000&| @43 diff --git a/runtime/syntax/testdir/dumps/java_switch_05.dump b/runtime/syntax/testdir/dumps/java_switch_05.dump index d806ef669f..15939bee2d 100644 --- a/runtime/syntax/testdir/dumps/java_switch_05.dump +++ b/runtime/syntax/testdir/dumps/java_switch_05.dump @@ -1,5 +1,5 @@ | +0&#ffffff0@7|d+0#af5f00255&|e|f|a|u|l|t|:+0#0000000&| @7|{| |e|c|h|o|(@1|b+0#00e0003&|y|t|e|)+0#0000000&| |-|1+0#e000002&|)+0#0000000&|;| |b+0#af5f00255&|r|e|a|k|;+0#0000000&| |}| @23 -@8|}|;| @64 +@8|}| @65 @75 @8|e|c|h|o|(|s+0#af5f00255&|w|i|t|c|h| +0#0000000&|(|b|)| |{| @49 @12|c+0#af5f00255&|a|s|e| +0#0000000&|(@1|b+0#00e0003&|y|t|e|)+0#0000000&| |0+0#e000002&|)+0#0000000&| |-|>| |(|b+0#00e0003&|y|t|e|)+0#0000000&| |0+0#e000002&|;+0#0000000&| @34 @@ -13,7 +13,7 @@ @8|c+0#af5f00255&|a|s|e| +0#0000000&|(@1|s+0#00e0003&|h|o|r|t|)+0#0000000&| |0+0#e000002&|)+0#0000000&|:| @2|{| |e|c|h|o|(@1|s+0#00e0003&|h|o|r|t|)+0#0000000&| |0+0#e000002&|)+0#0000000&|;| |b+0#af5f00255&|r|e|a|k|;+0#0000000&| |}| @19 @8|c+0#af5f00255&|a|s|e| +0#0000000&|(@1|s+0#00e0003&|h|o|r|t|)+0#0000000&| |1+0#e000002&|)+0#0000000&|:| @2|{| |e|c|h|o|(@1|s+0#00e0003&|h|o|r|t|)+0#0000000&| |1+0#e000002&|)+0#0000000&|;| |b+0#af5f00255&|r|e|a|k|;+0#0000000&| |}| @19 @8|d+0#af5f00255&|e|f|a|u|l|t|:+0#0000000&| @7|{| |e|c|h|o|(@1|s+0#00e0003&|h|o|r|t|)+0#0000000&| |-|1+0#e000002&|)+0#0000000&|;| |b+0#af5f00255&|r|e|a|k|;+0#0000000&| |}| @22 -@8|}|;| @64 +@8|}| @65 @75 @8|e|c|h|o|(|s+0#af5f00255&|w|i|t|c|h| +0#0000000&|(|s|h|)| |{| @48 @12|c+0#af5f00255&|a|s|e| +0#0000000&|(@1|s+0#00e0003&|h|o|r|t|)+0#0000000&| |0+0#e000002&|)+0#0000000&| @3|-|>| |(|s+0#00e0003&|h|o|r|t|)+0#0000000&| |0+0#e000002&|;+0#0000000&| @29 diff --git a/runtime/syntax/testdir/dumps/java_switch_06.dump b/runtime/syntax/testdir/dumps/java_switch_06.dump index e710675247..3e3483cf1d 100644 --- a/runtime/syntax/testdir/dumps/java_switch_06.dump +++ b/runtime/syntax/testdir/dumps/java_switch_06.dump @@ -9,7 +9,7 @@ @8|c+0#af5f00255&|a|s|e| +0#0000000&|0+0#e000002&|b|0|_@1|0@1|_@2|0@2|:+0#0000000&| |{| |e|c|h|o|(|0+0#e000002&|)+0#0000000&|;| |b+0#af5f00255&|r|e|a|k|;+0#0000000&| |}| @27 @8|c+0#af5f00255&|a|s|e| +0#0000000&|0+0#e000002&|x|0@2|_@2|0@1|_@1|1|:+0#0000000&| |{| |e|c|h|o|(|1+0#e000002&|)+0#0000000&|;| |b+0#af5f00255&|r|e|a|k|;+0#0000000&| |}| @27 @8|d+0#af5f00255&|e|f|a|u|l|t|:+0#0000000&| @7|{| |e|c|h|o|(|-|1+0#e000002&|)+0#0000000&|;| |b+0#af5f00255&|r|e|a|k|;+0#0000000&| |}| @30 -@8|}|;| @64 +@8|}| @65 @75 @8|e|c|h|o|(|s+0#af5f00255&|w|i|t|c|h| +0#0000000&|(|i|)| |{| @49 @12|c+0#af5f00255&|a|s|e| +0#0000000&|0+0#e000002&|_|0|_|0|_|0|_|0| +0#0000000&@1|-|>| |0+0#e000002&|;+0#0000000&| @41 diff --git a/runtime/syntax/testdir/dumps/java_unfoldment_02.dump b/runtime/syntax/testdir/dumps/java_unfoldment_02.dump index c216624ccd..c99fa3393e 100644 --- a/runtime/syntax/testdir/dumps/java_unfoldment_02.dump +++ b/runtime/syntax/testdir/dumps/java_unfoldment_02.dump @@ -8,7 +8,7 @@ @16|b+0#af5f00255&|r|e|a|k|;+0#0000000&| @52 @12|}| @61 @12|d+0#af5f00255&|e|f|a|u|l|t|:+0#0000000&| |;| @52 -@8|}|;| @64 +@8|}| @65 @4|}| @69 @75 @4|{| |O|b|j|e|c|t| |b@1| |=| |(@1|O|b|j|e|c|t|)| |n+0#af5f00255&|e|w| +0#0000000&|b+0#00e0003&|y|t|e|[+0#0000000&|]|{+0#ffffff16#ff404010|}|)+0#0000000#ffffff0|;| |}| @30 diff --git a/runtime/syntax/testdir/input/java_enfoldment.java b/runtime/syntax/testdir/input/java_enfoldment.java index 628e230895..3003257117 100644 --- a/runtime/syntax/testdir/input/java_enfoldment.java +++ b/runtime/syntax/testdir/input/java_enfoldment.java @@ -39,7 +39,7 @@ interface Foldenable break; } default: ; - }; + } } { Object bb = ((Object) new byte[]{}); } diff --git a/runtime/syntax/testdir/input/java_lambda_expressions.java b/runtime/syntax/testdir/input/java_lambda_expressions.java index 75f5af4cc8..95531f918f 100644 --- a/runtime/syntax/testdir/input/java_lambda_expressions.java +++ b/runtime/syntax/testdir/input/java_lambda_expressions.java @@ -136,7 +136,7 @@ enum Letters { OTHER, ALPHA, BETA } case String str_ -> str_; }): { echo(str); break; } case null: default: { echo("Other"); } - }; + } echo(switch (null) { case String str when !"".equals( diff --git a/runtime/syntax/testdir/input/java_lambda_expressions_signature.java b/runtime/syntax/testdir/input/java_lambda_expressions_signature.java index 16cf9905dd..0d89e9c8e9 100644 --- a/runtime/syntax/testdir/input/java_lambda_expressions_signature.java +++ b/runtime/syntax/testdir/input/java_lambda_expressions_signature.java @@ -136,7 +136,7 @@ enum Letters { OTHER, ALPHA, BETA } case String str_ -> str_; }): { echo(str); break; } case null: default: { echo("Other"); } - }; + } echo(switch (null) { case String str when !"".equals( diff --git a/runtime/syntax/testdir/input/java_method_references.java b/runtime/syntax/testdir/input/java_method_references.java new file mode 100644 index 0000000000..d9cdf42248 --- /dev/null +++ b/runtime/syntax/testdir/input/java_method_references.java @@ -0,0 +1,186 @@ +// VIM_TEST_SETUP let g:java_highlight_functions = 'style' +// VIM_TEST_SETUP let g:java_highlight_generics = 1 + + +import java.lang.invoke.MethodHandle; +import java.util.function.BiPredicate; +import java.util.function.Consumer; +import java.util.function.Function; +import java.util.function.IntFunction; +import java.util.function.IntSupplier; +import java.util.function.Predicate; +import java.util.function.Supplier; +import java.util.function.ToIntFunction; +import java.util.function.UnaryOperator; + +class MethodReferencesTests +{ + static { + // Primary :: [TypeArguments] Identifier + try { + Runnable r1 = ((Runtime) null)::gc; + } catch (NullPointerException expected) { + } + + Supplier s1 = ((Number) 0)::hashCode; + Supplier s2 = ((Comparable) '\0')::hashCode; + Supplier s3 = ((Comparable) false)::hashCode; + Supplier s4 = "::"::hashCode; + Supplier> s5 = int[].class::arrayType; + Supplier s6 = new MethodReferencesTests() :: + hashCode; + Supplier s7 = ((Number) + (new MethodReferencesTests().xy)[0])::intValue; + Supplier s8 = new MethodReferencesTests().xy:: + clone; + Consumer c1 = System.out :: println; + Supplier s9 = ((Supplier) ()->"()").get() + ::getBytes; + Supplier sa = ((Supplier) + ((Supplier) ((Supplier) + ((Supplier) ((Supplier) + () -> "() -> ()") + ::toString) + ::toString) + ::get) + ::toString) + ::toString; + + // ExpressionName :: [TypeArguments] Identifier + // ReferenceType :: [TypeArguments] Identifier + Function f1 = s -> + s :: length; + Function> f2 = ii -> + ((int[]) (ii.length > 0 ? ii[0] : ii)) + :: clone; + UnaryOperator uo1 = String::valueOf; + ToIntFunction tif1 = s -> s.transform( + String :: length); + + // ClassType :: [TypeArguments] new + // ArrayType :: new + Function f3 = C2::new; + Function f4 = pci -> pci.new + C21(null); // Cf. "d". + Supplier> sb = C1::new; + Function> f5 = C1 :: new; + IntFunction[]> if1 = C1[] :: new; + IntFunction if2 = byte[] :: new; + } + + final int[] xy = { 0, 1 }; + + // super :: [TypeArguments] Identifier + // TypeName . super :: [TypeArguments] Identifier + MethodReferencesTests() + { + Predicate p1 = MethodReferencesTests.super::equals; + Predicate p2 = MethodReferencesTests.this::equals; + } + + interface I4 extends I3 + { + default Predicate superEqualist() + { + return I3 + .super::equals; /* "a" */ + } + } + + interface I3 extends I2 + { + default Predicate superEqualist() + { + return I2. + super::equals; /* "b" */ + } + } + + interface I2 extends I1 + { + default Predicate superEqualist() + { /* Non-capturing gymnastics for super::equals. */ + return Function.>> + identity() + .apply(mh -> o -> MethodReferencesTests + .invokePredicate(mh, o)) + .apply(EQUALS.bindTo(this)); + } + } + + interface I1 + { + default Predicate equalist() + { /* Non-capturing gymnastics for this::equals. */ + return Function., Predicate>> + identity() + .apply(that -> o -> Function + ., T>> + identity() + .apply(I1:: /* "c" */ + equals) + .test(that, o)) + .apply(I1.this); + } + } + + static boolean invokePredicate(MethodHandle mh, T o) + { + try { + return (boolean) mh.invokeExact(o); + } catch (Throwable th) { + throw new RuntimeException(th); + } + } + + private static final MethodHandle EQUALS; + + static { + try { + EQUALS = java.lang.invoke.MethodHandles.lookup() + .findSpecial( + I1.class, + "equals", + java.lang.invoke.MethodType.methodType( + boolean.class, + Object.class), + I2.class); + } catch (ReflectiveOperationException e) { + throw new Error(e); + } + } + + static class C1 + { + C1() { } + C1(A dummy) { } + } + + static class C2 + { + C2() { this(""); } + + C2(A dummy) + { + C2.stringer().apply(((Function) + C2.C21::new) /* "d" */ + .apply(C2.this)); + } + + class C21 + { + C21() { this(""); } + + C21(B dummy) + { + C2.stringer().apply(C2.this); + } + } + + static Function stringer() + { + return T::toString; /* "e" */ + } + } +} diff --git a/runtime/syntax/testdir/input/java_method_references_signature.java b/runtime/syntax/testdir/input/java_method_references_signature.java new file mode 100644 index 0000000000..a154b12c9a --- /dev/null +++ b/runtime/syntax/testdir/input/java_method_references_signature.java @@ -0,0 +1,186 @@ +// VIM_TEST_SETUP let g:java_highlight_functions = 'style' +// VIM_TEST_SETUP let g:java_highlight_signature = 1 +// VIM_TEST_SETUP let g:java_highlight_generics = 1 + +import java.lang.invoke.MethodHandle; +import java.util.function.BiPredicate; +import java.util.function.Consumer; +import java.util.function.Function; +import java.util.function.IntFunction; +import java.util.function.IntSupplier; +import java.util.function.Predicate; +import java.util.function.Supplier; +import java.util.function.ToIntFunction; +import java.util.function.UnaryOperator; + +class MethodReferences$Tests +{ + static { + // Primary :: [TypeArguments] Identifier + try { + Runnable r1 = ((Runtime) null)::gc; + } catch (NullPointerException expected) { + } + + Supplier s1 = ((Number) 0)::hashCode; + Supplier s2 = ((Comparable) '\0')::hashCode; + Supplier s3 = ((Comparable) false)::hashCode; + Supplier s4 = "::"::hashCode; + Supplier> s5 = int[].class::arrayType; + Supplier s6 = new MethodReferences$Tests() :: + hashCode; + Supplier s7 = ((Number) + (new MethodReferences$Tests().xy)[0])::intValue; + Supplier s8 = new MethodReferences$Tests().xy:: + clone; + Consumer c1 = System.out :: println; + Supplier s9 = ((Supplier) ()->"()").get() + ::getBytes; + Supplier sa = ((Supplier) + ((Supplier) ((Supplier) + ((Supplier) ((Supplier) + () -> "() -> ()") + ::toString) + ::toString) + ::get) + ::toString) + ::toString; + + // ExpressionName :: [TypeArguments] Identifier + // ReferenceType :: [TypeArguments] Identifier + Function f1 = s -> + s :: length; + Function> f2 = ii -> + ((int[]) (ii.length > 0 ? ii[0] : ii)) + :: clone; + UnaryOperator uo1 = String::valueOf; + ToIntFunction tif1 = s -> s.transform( + String :: length); + + // ClassType :: [TypeArguments] new + // ArrayType :: new + Function f3 = C2::new; + Function f4 = pci -> pci.new + C21(null); // Cf. "d". + Supplier> sb = C1::new; + Function> f5 = C1 :: new; + IntFunction[]> if1 = C1[] :: new; + IntFunction if2 = byte[] :: new; + } + + final int[] xy = { 0, 1 }; + + // super :: [TypeArguments] Identifier + // TypeName . super :: [TypeArguments] Identifier + MethodReferences$Tests() + { + Predicate p1 = MethodReferences$Tests.super::equals; + Predicate p2 = MethodReferences$Tests.this::equals; + } + + interface I4 extends I3 + { + default Predicate superEqualist() + { + return I3 + .super::equals; /* "a" */ + } + } + + interface I3 extends I2 + { + default Predicate superEqualist() + { + return I2. + super::equals; /* "b" */ + } + } + + interface I2 extends I1 + { + default Predicate superEqualist() + { /* Non-capturing gymnastics for super::equals. */ + return Function.>> + identity() + .apply(mh -> o -> MethodReferences$Tests + .invokePredicate(mh, o)) + .apply(EQUALS.bindTo(this)); + } + } + + interface I1 + { + default Predicate equalist() + { /* Non-capturing gymnastics for this::equals. */ + return Function., Predicate>> + identity() + .apply(that -> o -> Function + ., T>> + identity() + .apply(I1:: /* "c" */ + equals) + .test(that, o)) + .apply(I1.this); + } + } + + static boolean invokePredicate(MethodHandle mh, T o) + { + try { + return (boolean) mh.invokeExact(o); + } catch (Throwable th) { + throw new RuntimeException(th); + } + } + + private static final MethodHandle EQUALS; + + static { + try { + EQUALS = java.lang.invoke.MethodHandles.lookup() + .findSpecial( + I1.class, + "equals", + java.lang.invoke.MethodType.methodType( + boolean.class, + Object.class), + I2.class); + } catch (ReflectiveOperationException e) { + throw new Error(e); + } + } + + static class C1 + { + C1() { } + C1(A dummy) { } + } + + static class C2 + { + C2() { this(""); } + + C2(A dummy) + { + C2.stringer().apply(((Function) + C2.C21::new) /* "d" */ + .apply(C2.this)); + } + + class C21 + { + C21() { this(""); } + + C21(B dummy) + { + C2.stringer().apply(C2.this); + } + } + + static Function stringer() + { + return T::toString; /* "e" */ + } + } +} diff --git a/runtime/syntax/testdir/input/java_switch.java b/runtime/syntax/testdir/input/java_switch.java index 14b2e1149d..d82fcb1832 100644 --- a/runtime/syntax/testdir/input/java_switch.java +++ b/runtime/syntax/testdir/input/java_switch.java @@ -55,7 +55,7 @@ enum Letters { OTHER, ALPHA, BETA } case null: { echo("null"); break; } case Letters[] ll: { echo("SwitchTests$1Letters[]"); break; } default: { echo("java.lang.Object"); break; } - }; + } echo(switch (o) { case null -> "null"; @@ -69,7 +69,7 @@ enum Letters { OTHER, ALPHA, BETA } case 'a': { echo('a'); break; } case 'b': { echo('b'); break; } default: { echo('\u0000'); break; } - }; + } echo(switch (ch) { case 'a' -> 'a'; @@ -83,7 +83,7 @@ enum Letters { OTHER, ALPHA, BETA } case ((byte) 0): { echo((byte) 0); break; } case ((byte) 1): { echo((byte) 1); break; } default: { echo((byte) -1); break; } - }; + } echo(switch (b) { case ((byte) 0) -> (byte) 0; @@ -97,7 +97,7 @@ enum Letters { OTHER, ALPHA, BETA } case ((short) 0): { echo((short) 0); break; } case ((short) 1): { echo((short) 1); break; } default: { echo((short) -1); break; } - }; + } echo(switch (sh) { case ((short) 0) -> (short) 0; @@ -111,7 +111,7 @@ enum Letters { OTHER, ALPHA, BETA } case 0b0__00___000: { echo(0); break; } case 0x000___00__1: { echo(1); break; } default: { echo(-1); break; } - }; + } echo(switch (i) { case 0_0_0_0_0 -> 0; diff --git a/runtime/syntax/testdir/input/java_unfoldment.java b/runtime/syntax/testdir/input/java_unfoldment.java index 258ed05c0c..ffea216906 100644 --- a/runtime/syntax/testdir/input/java_unfoldment.java +++ b/runtime/syntax/testdir/input/java_unfoldment.java @@ -39,7 +39,7 @@ interface Unfoldenable break; } default: ; - }; + } } { Object bb = ((Object) new byte[]{}); } diff --git a/src/testdir/test_filetype.vim b/src/testdir/test_filetype.vim index b9291d5978..cee7c21f3a 100644 --- a/src/testdir/test_filetype.vim +++ b/src/testdir/test_filetype.vim @@ -369,7 +369,7 @@ def s:GetFilenameChecks(): dict> jq: ['file.jq'], jovial: ['file.jov', 'file.j73', 'file.jovial'], jproperties: ['file.properties', 'file.properties_xx', 'file.properties_xx_xx', 'some.properties_xx_xx_file', 'org.eclipse.xyz.prefs'], - json: ['file.json', 'file.jsonp', 'file.json-patch', 'file.geojson', 'file.webmanifest', 'Pipfile.lock', 'file.ipynb', 'file.jupyterlab-settings', + json: ['file.json', 'file.jsonp', 'file.json-patch', 'file.geojson', 'file.webmanifest', 'Pipfile.lock', 'file.ipynb', 'file.jupyterlab-settings', '.prettierrc', '.firebaserc', '.stylelintrc', '.lintstagedrc', 'file.slnf', 'file.sublime-project', 'file.sublime-settings', 'file.sublime-workspace', 'file.bd', 'file.bda', 'file.xci', 'flake.lock', 'pack.mcmeta', 'deno.lock'], json5: ['file.json5'], From ddbb6fe2d0344e93436c5602b7a06169f49a9b52 Mon Sep 17 00:00:00 2001 From: Doug Kearns Date: Wed, 24 Jul 2024 20:21:22 +0200 Subject: [PATCH 007/186] runtime(vim): Update base-syntax, improve :set highlighting - Match bang, "all" and "termcap" options, and trailing command separator "|". - Highlight set assignment operators. - Match multiline :set and multiline option values. - Mention the newer "0o" octal prefix at :help :set=. closes: #15329 Signed-off-by: Doug Kearns Signed-off-by: Christian Brabandt --- runtime/doc/options.txt | 5 +- runtime/syntax/generator/vim.vim.base | 22 +++-- .../syntax/testdir/dumps/vim9_comment_03.dump | 2 +- .../syntax/testdir/dumps/vim_comment_03.dump | 2 +- .../syntax/testdir/dumps/vim_ex_set_00.dump | 20 ++++ .../syntax/testdir/dumps/vim_ex_set_01.dump | 20 ++++ .../syntax/testdir/dumps/vim_ex_set_02.dump | 20 ++++ .../syntax/testdir/dumps/vim_ex_set_03.dump | 20 ++++ .../syntax/testdir/dumps/vim_ex_set_04.dump | 20 ++++ .../syntax/testdir/dumps/vim_ex_set_05.dump | 20 ++++ runtime/syntax/testdir/input/vim_ex_set.vim | 93 +++++++++++++++++++ runtime/syntax/vim.vim | 42 +++++---- 12 files changed, 258 insertions(+), 28 deletions(-) create mode 100644 runtime/syntax/testdir/dumps/vim_ex_set_00.dump create mode 100644 runtime/syntax/testdir/dumps/vim_ex_set_01.dump create mode 100644 runtime/syntax/testdir/dumps/vim_ex_set_02.dump create mode 100644 runtime/syntax/testdir/dumps/vim_ex_set_03.dump create mode 100644 runtime/syntax/testdir/dumps/vim_ex_set_04.dump create mode 100644 runtime/syntax/testdir/dumps/vim_ex_set_05.dump create mode 100644 runtime/syntax/testdir/input/vim_ex_set.vim diff --git a/runtime/doc/options.txt b/runtime/doc/options.txt index 30214014d7..52714da2db 100644 --- a/runtime/doc/options.txt +++ b/runtime/doc/options.txt @@ -1,4 +1,4 @@ -*options.txt* For Vim version 9.1. Last change: 2024 Jul 16 +*options.txt* For Vim version 9.1. Last change: 2024 Jul 24 VIM REFERENCE MANUAL by Bram Moolenaar @@ -76,7 +76,8 @@ achieve special effects. These options come in three forms: :se[t] {option}:{value} Set string or number option to {value}. For numeric options the value can be given in decimal, - hex (preceded with 0x) or octal (preceded with '0'). + hex (preceded with 0x) or octal (preceded with '0' or + '0o'). The old value can be inserted by typing 'wildchar' (by default this is a or CTRL-E if 'compatible' is set). Many string options with fixed syntax and names diff --git a/runtime/syntax/generator/vim.vim.base b/runtime/syntax/generator/vim.vim.base index 75e451d43d..4666d71587 100644 --- a/runtime/syntax/generator/vim.vim.base +++ b/runtime/syntax/generator/vim.vim.base @@ -35,7 +35,7 @@ syn match vimCommand contained "\" syn keyword vimStdPlugin contained Arguments Asm Break Cfilter Clear Continue DiffOrig Evaluate Finish Gdb Lfilter Man Over Program Run S Source Step Stop Termdebug TermdebugCommand TOhtml Until Winbar XMLent XMLns " vimOptions are caught only when contained in a vimSet {{{2 -" GEN_SYN_VIM: vimOption normal, START_STR='syn keyword vimOption contained', END_STR='' +" GEN_SYN_VIM: vimOption normal, START_STR='syn keyword vimOption contained', END_STR='skipwhite nextgroup=vimSetEqual,vimSetMod' " vimOptions: These are the turn-off setting variants {{{2 " GEN_SYN_VIM: vimOption turn-off, START_STR='syn keyword vimOption contained', END_STR='' @@ -44,7 +44,7 @@ syn keyword vimStdPlugin contained Arguments Asm Break Cfilter Clear Continue Di " GEN_SYN_VIM: vimOption invertible, START_STR='syn keyword vimOption contained', END_STR='' " termcap codes (which can also be set) {{{2 -" GEN_SYN_VIM: vimOption term output code, START_STR='syn keyword vimOption contained', END_STR='' +" GEN_SYN_VIM: vimOption term output code, START_STR='syn keyword vimOption contained', END_STR='skipwhite nextgroup=vimSetEqual,vimSetMod' " term key codes syn keyword vimOption contained t_F1 t_F2 t_F3 t_F4 t_F5 t_F6 t_F7 t_F8 t_F9 t_k1 t_K1 t_k2 t_k3 t_K3 t_k4 t_K4 t_k5 t_K5 t_k6 t_K6 t_k7 t_K7 t_k8 t_K8 t_k9 t_K9 t_KA t_kb t_kB t_KB t_KC t_kd t_kD t_KD t_KE t_KF t_KG t_kh t_KH t_kI t_KI t_KJ t_KK t_kl t_KL t_kN t_kP t_kr t_ku syn match vimOption contained "t_%1" @@ -505,11 +505,15 @@ syn match vimCmplxRepeat '[^a-zA-Z_/\\()]q[0-9a-zA-Z"]\>'lc=1 syn match vimCmplxRepeat '@[0-9a-z".=@:]\ze\($\|[^a-zA-Z]\>\)' " Set command and associated set-options (vimOptions) with comment {{{2 -syn region vimSet matchgroup=vimCommand start="\<\%(setl\%[ocal]\|setg\%[lobal]\|se\%[t]\)\>" skip="\%(\\\\\)*\\.\n\@!" end="$" end="|" matchgroup=vimNotation end="<[cC][rR]>" keepend contains=vimSetEqual,vimOption,vimErrSetting,@vimComment,vimSetString,vimSetMod -syn region vimSetEqual contained start="[=:]\|[-+^]=" skip="\\\\\|\\\s" end="[| \t]"me=e-1 end="$" contains=vimCtrlChar,vimSetSep,vimNotation,vimEnvvar -syn region vimSetString contained start=+="+hs=s+1 skip=+\\\\\|\\"+ end=+"+ contains=vimCtrlChar +syn match vimSet "\<\%(setl\%[ocal]\|setg\%[lobal]\|se\%[t]\)\>" skipwhite nextgroup=vimSetBang,vimSetRegion +syn region vimSetRegion contained start="\S" skip=+\\\\\|\\|\|\n\s*\\\|\n\s*["#]\\ + matchgroup=vimCmdSep end="|" end="$" matchgroup=vimNotation end="<[cC][rR]>" keepend contains=@vimComment,@vimContinue,vimErrSetting,vimOption,vimSetAll,vimSetTermcap +syn region vimSetEqual contained matchgroup=vimOper start="[=:]\|[-+^]=" skip=+\\\\\|\\|\|\\\s\|\n\s*\\\|\n\s*["#]\\ \|^\s*\\\|^\s*["#]\\ + matchgroup=vimCmdSep end="|" end="\ze\s" end="$" contains=@vimContinue,vimCtrlChar,vimEnvvar,vimNotation,vimSetSep +syn match vimSetBang contained "\a\@1<=!" skipwhite nextgroup=vimSetAll,vimSetTermcap +syn keyword vimSetAll contained all nextgroup=vimSetMod +syn keyword vimSetTermcap contained termcap +syn region vimSetString contained start=+="+hs=s+1 skip=+\\\\\|\\"+ end=+"+ contains=vimCtrlChar syn match vimSetSep contained "[,:]" -syn match vimSetMod contained "&vim\=\|[!&?<]\|all&" +syn match vimSetMod contained "\a\@1<=\%(&vim\=\|[!&?<]\)" " Variable Declarations: {{{2 " ===================== @@ -1228,9 +1232,13 @@ if !exists("skip_vim_syntax_inits") hi def link vimSearchDelim Statement hi def link vimSearch vimString hi def link vimSep Delimiter + hi def link vimSet vimCommand + hi def link vimSetAll vimOption + hi def link vimSetBang vimBang hi def link vimSetMod vimOption - hi def link vimSetSep Statement + hi def link vimSetSep vimSep hi def link vimSetString vimString + hi def link vimSetTermcap vimOption hi def link vimShebang PreProc hi def link vimSleep vimCommand hi def link vimSleepArg Constant diff --git a/runtime/syntax/testdir/dumps/vim9_comment_03.dump b/runtime/syntax/testdir/dumps/vim9_comment_03.dump index 0e424aba38..8a0fda883f 100644 --- a/runtime/syntax/testdir/dumps/vim9_comment_03.dump +++ b/runtime/syntax/testdir/dumps/vim9_comment_03.dump @@ -5,7 +5,7 @@ |#+0#0000e05&| +0#0000000&|I+0#e000e06&|s@1|u|e|:| +0#0000e05&|#|1|3|0|4|7| +0#0000000&@59 > @74 |i+0#af5f00255&|f| +0#0000000&|!+0#af5f00255&|e+0#00e0e07&|x|i|s|t|s|(+0#e000e06&|"+0#e000002&|:|D|i|f@1|O|r|i|g|"|)+0#e000e06&| +0#0000000&@51 -@2|c+0#af5f00255&|o|m@1|a|n|d| +0#0000000&|D|i|f@1|O|r|i|g| |v+0#af5f00255&|e|r|t| +0#0000000&|n+0#af5f00255&|e|w| +0#0000000&||| |s+0#af5f00255&|e|t| +0#0000000&|b+0#e000e06&|t|=+0#0000000&|n|o|f|i|l|e| ||+0#af5f00255&| +0#0000000&|r+0#af5f00255&| +0#0000000&|++0#af5f00255&@1|e|d|i|t| +0#0000000&|%+0#af5f00255&@1| +0#0000000&||| |0+0#e000002&|d+0#0000000&|_| ||| |d+0#af5f00255&|i|f@1|t|h|i|s| +0#0000000& +@2|c+0#af5f00255&|o|m@1|a|n|d| +0#0000000&|D|i|f@1|O|r|i|g| |v+0#af5f00255&|e|r|t| +0#0000000&|n+0#af5f00255&|e|w| +0#0000000&||| |s+0#af5f00255&|e|t| +0#0000000&|b+0#e000e06&|t|=+0#af5f00255&|n+0#0000000&|o|f|i|l|e| ||| |r+0#af5f00255&| +0#0000000&|++0#af5f00255&@1|e|d|i|t| +0#0000000&|%+0#af5f00255&@1| +0#0000000&||| |0+0#e000002&|d+0#0000000&|_| ||| |d+0#af5f00255&|i|f@1|t|h|i|s| +0#0000000& @18|\+0#e000e06&| +0#0000000&||| |w+0#af5f00255&|i|n|c|m|d| +0#0000000&|p+0#af5f00255&| +0#0000000&||| |d+0#af5f00255&|i|f@1|t|h|i|s| +0#0000000&@33 |e+0#af5f00255&|n|d|i|f| +0#0000000&@69 @75 diff --git a/runtime/syntax/testdir/dumps/vim_comment_03.dump b/runtime/syntax/testdir/dumps/vim_comment_03.dump index 2d40f6cc99..70c9519793 100644 --- a/runtime/syntax/testdir/dumps/vim_comment_03.dump +++ b/runtime/syntax/testdir/dumps/vim_comment_03.dump @@ -2,7 +2,7 @@ |"+0#0000e05&| +0#0000000&|I+0#e000e06&|s@1|u|e|:| +0#0000e05&|#|1|3|0|4|7| +0#0000000&@59 @75 |i+0#af5f00255&|f| +0#0000000&|!+0#af5f00255&|e+0#00e0e07&|x|i|s|t|s|(+0#e000e06&|"+0#e000002&|:|D|i|f@1|O|r|i|g|"|)+0#e000e06&| +0#0000000&@51 -@2|c+0#af5f00255&|o|m@1|a|n|d| +0#0000000&|D|i|f@1|O|r|i|g| |v+0#af5f00255&|e|r|t| +0#0000000&|n+0#af5f00255&|e|w| +0#0000000&||| |s+0#af5f00255&|e|t| +0#0000000&|b+0#e000e06&|t|=+0#0000000&|n|o|f|i|l|e| ||+0#af5f00255&| +0#0000000&|r+0#af5f00255&| +0#0000000&|++0#af5f00255&@1|e|d|i|t| +0#0000000&|#| ||| |0+0#e000002&|d+0#0000000&|_| ||| |d+0#af5f00255&|i|f@1|t|h|i|s| +0#0000000&@1 +@2|c+0#af5f00255&|o|m@1|a|n|d| +0#0000000&|D|i|f@1|O|r|i|g| |v+0#af5f00255&|e|r|t| +0#0000000&|n+0#af5f00255&|e|w| +0#0000000&||| |s+0#af5f00255&|e|t| +0#0000000&|b+0#e000e06&|t|=+0#af5f00255&|n+0#0000000&|o|f|i|l|e| ||| |r+0#af5f00255&| +0#0000000&|++0#af5f00255&@1|e|d|i|t| +0#0000000&|#| ||| |0+0#e000002&|d+0#0000000&|_| ||| |d+0#af5f00255&|i|f@1|t|h|i|s| +0#0000000&@1 @18>\+0#e000e06&| +0#0000000&||| |w+0#af5f00255&|i|n|c|m|d| +0#0000000&|p+0#af5f00255&| +0#0000000&||| |d+0#af5f00255&|i|f@1|t|h|i|s| +0#0000000&@33 |e+0#af5f00255&|n|d|i|f| +0#0000000&@69 @75 diff --git a/runtime/syntax/testdir/dumps/vim_ex_set_00.dump b/runtime/syntax/testdir/dumps/vim_ex_set_00.dump new file mode 100644 index 0000000000..3f0471b629 --- /dev/null +++ b/runtime/syntax/testdir/dumps/vim_ex_set_00.dump @@ -0,0 +1,20 @@ +>"+0#0000e05#ffffff0| |V|i|m| |:|s|e|t| |c|o|m@1|a|n|d| +0#0000000&@56 +@75 +|s+0#af5f00255&|e|t| +0#0000000&@71 +|s+0#af5f00255&|e|t|!| +0#0000000&@70 +|s+0#af5f00255&|e|t| +0#0000000&|a+0#e000e06&|l@1| +0#0000000&@67 +|s+0#af5f00255&|e|t|!| +0#0000000&|a+0#e000e06&|l@1| +0#0000000&@66 +|s+0#af5f00255&|e|t| +0#0000000&|t+0#e000e06&|e|r|m|c|a|p| +0#0000000&@63 +|s+0#af5f00255&|e|t|!| +0#0000000&|t+0#e000e06&|e|r|m|c|a|p| +0#0000000&@62 +@75 +|s+0#af5f00255&|e|t| +0#0000000&|a+0#e000e06&|l|e|p|h|?| +0#0000000&@64 +|s+0#af5f00255&|e|t| +0#0000000&|a+0#e000e06&|l|e|p|h| +0#0000000&@65 +@75 +|s+0#af5f00255&|e|t| +0#0000000&|n+0#e000e06&|o|a|l@1|o|w|r|e|v|i|n|s| +0#0000000&@57 +@75 +|s+0#af5f00255&|e|t| +0#0000000&|a+0#e000e06&|l@1|o|w|r|e|v|i|n|s|!| +0#0000000&@58 +|s+0#af5f00255&|e|t| +0#0000000&|i+0#e000e06&|n|v|a|l@1|o|w|r|e|v|i|n|s| +0#0000000&@56 +@75 +|s+0#af5f00255&|e|t| +0#0000000&|a+0#e000e06&|l|e|p|h|&| +0#0000000&@64 +|s+0#af5f00255&|e|t| +0#0000000&|a+0#e000e06&|l|e|p|h|&|v|i| +0#0000000&@62 +@57|1|,|1| @10|T|o|p| diff --git a/runtime/syntax/testdir/dumps/vim_ex_set_01.dump b/runtime/syntax/testdir/dumps/vim_ex_set_01.dump new file mode 100644 index 0000000000..012170ecce --- /dev/null +++ b/runtime/syntax/testdir/dumps/vim_ex_set_01.dump @@ -0,0 +1,20 @@ +| +0&#ffffff0@74 +|s+0#af5f00255&|e|t| +0#0000000&|a+0#e000e06&|l@1|o|w|r|e|v|i|n|s|!| +0#0000000&@58 +|s+0#af5f00255&|e|t| +0#0000000&|i+0#e000e06&|n|v|a|l@1|o|w|r|e|v|i|n|s| +0#0000000&@56 +@75 +|s+0#af5f00255&|e|t| +0#0000000&|a+0#e000e06&|l|e|p|h|&| +0#0000000&@64 +>s+0#af5f00255&|e|t| +0#0000000&|a+0#e000e06&|l|e|p|h|&|v|i| +0#0000000&@62 +|s+0#af5f00255&|e|t| +0#0000000&|a+0#e000e06&|l|e|p|h|&|v|i|m| +0#0000000&@61 +@75 +|s+0#af5f00255&|e|t| +0#0000000&|a+0#e000e06&|l@1|&| +0#0000000&@66 +@75 +|s+0#af5f00255&|e|t| +0#0000000&|a+0#e000e06&|l|e|p|h|=+0#af5f00255&|1+0#0000000&|2|8| @61 +|s+0#af5f00255&|e|t| +0#0000000&|a+0#e000e06&|l|e|p|h|:+0#af5f00255&|1+0#0000000&|2|8| @61 +@75 +|s+0#af5f00255&|e|t| +0#0000000&|a+0#e000e06&|l|e|p|h| +0#0000000&|=+0#af5f00255&|1+0#0000000&|2|8| @60 +|s+0#af5f00255&|e|t| +0#0000000&|a+0#e000e06&|l|e|p|h| +0#0000000&|:+0#af5f00255&|1+0#0000000&|2|8| @60 +@75 +|s+0#af5f00255&|e|t| +0#0000000&|a+0#e000e06&|l|e|p|h|++0#af5f00255&|=|9+0#0000000&|6| @61 +|s+0#af5f00255&|e|t| +0#0000000&|a+0#e000e06&|l|e|p|h|^+0#af5f00255&|=|2+0#0000000&| @62 +|s+0#af5f00255&|e|t| +0#0000000&|a+0#e000e06&|l|e|p|h|-+0#af5f00255&|=|9+0#0000000&|6| @61 +@57|1|9|,|1| @9|1|7|%| diff --git a/runtime/syntax/testdir/dumps/vim_ex_set_02.dump b/runtime/syntax/testdir/dumps/vim_ex_set_02.dump new file mode 100644 index 0000000000..d6328d2dba --- /dev/null +++ b/runtime/syntax/testdir/dumps/vim_ex_set_02.dump @@ -0,0 +1,20 @@ +|s+0#af5f00255#ffffff0|e|t| +0#0000000&|a+0#e000e06&|l|e|p|h|-+0#af5f00255&|=|9+0#0000000&|6| @61 +@75 +|s+0#af5f00255&|e|t| +0#0000000&|b+0#e000e06&|a|c|k|s|p|a|c|e|++0#af5f00255&|=|n+0#0000000&|o|s|t|o|p| @53 +|s+0#af5f00255&|e|t| +0#0000000&|b+0#e000e06&|a|c|k|s|p|a|c|e|^+0#af5f00255&|=|n+0#0000000&|o|s|t|o|p| @53 +|s+0#af5f00255&|e|t| +0#0000000&|b+0#e000e06&|a|c|k|s|p|a|c|e|-+0#af5f00255&|=|n+0#0000000&|o|s|t|o|p| @53 +> @74 +|s+0#af5f00255&|e|t| +0#0000000&|a+0#e000e06&|i| +0#0000000&|n+0#e000e06&|o|s|i| +0#0000000&|s+0#e000e06&|w|=+0#af5f00255&|3+0#0000000&| |t+0#e000e06&|w|=+0#af5f00255&|3+0#0000000&| @53 +@75 +|s+0#af5f00255&|e|t| +0#0000000&|<|t+0#e000e06&|_|#|4|>+0#0000000&|=|^|[|O|t| |"+0#0000e05&| |F+0#0000001#ffff4012|I|X|M|E| +0#0000000#ffffff0@51 +|s+0#af5f00255&|e|t| +0#0000000&|<|M|-|b|>|=|^|[|b| @2|"+0#0000e05&| |F+0#0000001#ffff4012|I|X|M|E| +0#0000000#ffffff0@51 +@75 +|s+0#af5f00255&|e|t|l|o|c|a|l| +0#0000000&|a+0#e000e06&|u|t|o|r|e|a|d| +0#0000000&@57 +|s+0#af5f00255&|e|t|g|l|o|b|a|l| +0#0000000&|n+0#e000e06&|o|a|u|t|o|r|e|a|d| +0#0000000&@54 +|s+0#af5f00255&|e|t| +0#0000000&|a+0#e000e06&|u|t|o|r|e|a|d|<| +0#0000000&@61 +@75 +@75 +|"+0#0000e05&| |:|h|e|l|p| |o|p|t|i|o|n|-|b|a|c|k|s|l|a|s|h| +0#0000000&@50 +@75 +|"+0#0000e05&| |W|h|e|n| |s|e|t@1|i|n|g| |o|p|t|i|o|n|s| |u|s|i|n|g| |||:|l|e|t||| |a|n|d| |||l|i|t|e|r|a|l|-|s|t|r|i|n|g|||,| |y|o|u| |n|e@1|d| |t|o| |u|s|@+0#4040ff13&@2 +| +0#0000000&@56|3|7|,|0|-|1| @7|4|1|%| diff --git a/runtime/syntax/testdir/dumps/vim_ex_set_03.dump b/runtime/syntax/testdir/dumps/vim_ex_set_03.dump new file mode 100644 index 0000000000..fb013bc992 --- /dev/null +++ b/runtime/syntax/testdir/dumps/vim_ex_set_03.dump @@ -0,0 +1,20 @@ +|"+0#0000e05#ffffff0| |W|h|e|n| |s|e|t@1|i|n|g| |o|p|t|i|o|n|s| |u|s|i|n|g| |||:|l|e|t||| |a|n|d| |||l|i|t|e|r|a|l|-|s|t|r|i|n|g|||,| |y|o|u| |n|e@1|d| |t|o| |u|s|e| |o +|n|e| +0#0000000&@72 +|"+0#0000e05&| |f|e|w|e|r| |l|a|y|e|r| |o|f| |b|a|c|k|s|l|a|s|h|.| |A| |f|e|w| |e|x|a|m|p|l|e|s|:| +0#0000000&@31 +|s+0#af5f00255&|e|t| +0#0000000&|m+0#e000e06&|a|k|e|p|r|g|=+0#af5f00255&|m+0#0000000&|a|k|e|\| |f|i|l|e| @5|"+0#0000e05&| |r|e|s|u|l|t|s| |i|n| |"+0#e000002&|m|a|k|e| |f|i|l|e|"| +0#0000000&@22 +|l+0#af5f00255&|e|t| +0#0000000&|&+0#00e0e07&|m|a|k|e|p|r|g|=+0#af5f00255&|'+0#e000002&|m|a|k|e| |f|i|l|e|'| +0#0000000&@3|"+0#0000e05&| |(|s|a|m|e| |a|s| |a|b|o|v|e|)| +0#0000000&@29 +>s+0#af5f00255&|e|t| +0#0000000&|m+0#e000e06&|a|k|e|p|r|g|=+0#af5f00255&|m+0#0000000&|a|k|e|\@2| |f|i|l|e| @3|"+0#0000e05&| |r|e|s|u|l|t|s| |i|n| |"+0#e000002&|m|a|k|e|\| |f|i|l|e|"| +0#0000000&@21 +|s+0#af5f00255&|e|t| +0#0000000&|t+0#e000e06&|a|g|s|=+0#af5f00255&|t+0#0000000&|a|g|s|\| |/|u|s|r|/|t|a|g|s| @3|"+0#0000e05&| |r|e|s|u|l|t|s| |i|n| |"+0#e000002&|t|a|g|s|"| +0#0000e05&|a|n|d| |"+0#e000002&|/|u|s|r|/|t|a|g|s|"| +0#0000000&@11 +|s+0#af5f00255&|e|t| +0#0000000&|t+0#e000e06&|a|g|s|=+0#af5f00255&|t+0#0000000&|a|g|s|\@2| |f|i|l|e| @6|"+0#0000e05&| |r|e|s|u|l|t|s| |i|n| |"+0#e000002&|t|a|g|s| |f|i|l|e|"| +0#0000000&@22 +|l+0#af5f00255&|e|t| +0#0000000&|&+0#00e0e07&|t|a|g|s|=+0#af5f00255&|'+0#e000002&|t|a|g|s|\| |f|i|l|e|'| +0#0000000&@5|"+0#0000e05&| |(|s|a|m|e| |a|s| |a|b|o|v|e|)| +0#0000000&@29 +@75 +|s+0#af5f00255&|e|t| +0#0000000&|m+0#e000e06&|a|k|e|p|r|g|=+0#af5f00255&|m+0#0000000&|a|k|e|,+0#e000e06&|f+0#0000000&|i|l|e| @6|"+0#0000e05&| |r|e|s|u|l|t|s| |i|n| |"+0#e000002&|m|a|k|e|,|f|i|l|e|"| +0#0000000&@22 +|s+0#af5f00255&|e|t| +0#0000000&|m+0#e000e06&|a|k|e|p|r|g|=+0#af5f00255&|m+0#0000000&|a|k|e|\@1|,+0#e000e06&|f+0#0000000&|i|l|e| @4|"+0#0000e05&| |r|e|s|u|l|t|s| |i|n| |"+0#e000002&|m|a|k|e|\|,|f|i|l|e|"| +0#0000000&@21 +|s+0#af5f00255&|e|t| +0#0000000&|t+0#e000e06&|a|g|s|=+0#af5f00255&|t+0#0000000&|a|g|s|,+0#e000e06&|f+0#0000000&|i|l|e| @9|"+0#0000e05&| |r|e|s|u|l|t|s| |i|n| |"+0#e000002&|t|a|g|s|"| +0#0000e05&|a|n|d| |"+0#e000002&|f|i|l|e|"| +0#0000000&@16 +|s+0#af5f00255&|e|t| +0#0000000&|t+0#e000e06&|a|g|s|=+0#af5f00255&|t+0#0000000&|a|g|s|\@1|,+0#e000e06&|f+0#0000000&|i|l|e| @7|"+0#0000e05&| |r|e|s|u|l|t|s| |i|n| |"+0#e000002&|t|a|g|s|,|f|i|l|e|"| +0#0000000&@22 +|l+0#af5f00255&|e|t| +0#0000000&|&+0#00e0e07&|t|a|g|s|=+0#af5f00255&|'+0#e000002&|t|a|g|s|\|,|f|i|l|e|'| +0#0000000&@5|"+0#0000e05&| |(|s|a|m|e| |a|s| |a|b|o|v|e|)| +0#0000000&@29 +@75 +|"+0#0000e05&| |T|h|i|s| |e|x|a|m|p|l|e| |s|e|t|s| |t|h|e| |'|t|i|t|l|e|s|t|r|i|n|g|'| |o|p|t|i|o|n| |t|o| |"+0#e000002&|h|i|||t|h|e|r|e|"|:+0#0000e05&| +0#0000000&@15 +|s+0#af5f00255&|e|t| +0#0000000&|t+0#e000e06&|i|t|l|e|s|t|r|i|n|g|=+0#af5f00255&|h+0#0000000&|i|\|||t|h|e|r|e| @49 +|"+0#0000e05&| |T|h|i|s| |s|e|t|s| |t|h|e| |'|t|i|t|l|e|s|t|r|i|n|g|'| |o|p|t|i|o|n| |t|o| |"+0#e000002&|h|i|"| +0#0000e05&|a|n|d| |'|i|c|o|n|s|t|r|i|n|g|'| |t|o| |"+0#e000002&|t|h|e|r|e|"|:+0#0000e05&| +0#0000000&@1 +@57|5|4|,|1| @9|6|5|%| diff --git a/runtime/syntax/testdir/dumps/vim_ex_set_04.dump b/runtime/syntax/testdir/dumps/vim_ex_set_04.dump new file mode 100644 index 0000000000..6280f6af4e --- /dev/null +++ b/runtime/syntax/testdir/dumps/vim_ex_set_04.dump @@ -0,0 +1,20 @@ +|"+0#0000e05#ffffff0| |T|h|i|s| |s|e|t|s| |t|h|e| |'|t|i|t|l|e|s|t|r|i|n|g|'| |o|p|t|i|o|n| |t|o| |"+0#e000002&|h|i|"| +0#0000e05&|a|n|d| |'|i|c|o|n|s|t|r|i|n|g|'| |t|o| |"+0#e000002&|t|h|e|r|e|"|:+0#0000e05&| +0#0000000&@1 +|s+0#af5f00255&|e|t| +0#0000000&|t+0#e000e06&|i|t|l|e|s|t|r|i|n|g|=+0#af5f00255&|h+0#0000000&|i|||s+0#af5f00255&|e|t| +0#0000000&|i+0#e000e06&|c|o|n|s|t|r|i|n|g|=+0#af5f00255&|t+0#0000000&|h|e|r|e| @35 +@75 +|s+0#af5f00255&|e|t| +0#0000000&|d+0#e000e06&|i|r|=+0#af5f00255&|\+0#0000000&@1|m|a|c|h|i|n|e|\|p|a|t|h| @5|"+0#0000e05&| |r|e|s|u|l|t|s| |i|n| |"+0#e000002&|\@1|m|a|c|h|i|n|e|\|p|a|t|h|"| +0#0000000&@17 +|s+0#af5f00255&|e|t| +0#0000000&|d+0#e000e06&|i|r|=+0#af5f00255&|\+0#0000000&@3|m|a|c|h|i|n|e|\@1|p|a|t|h| @2|"+0#0000e05&| |r|e|s|u|l|t|s| |i|n| |"+0#e000002&|\@1|m|a|c|h|i|n|e|\|p|a|t|h|"| +0#0000000&@17 +>s+0#af5f00255&|e|t| +0#0000000&|d+0#e000e06&|i|r|=+0#af5f00255&|\+0#0000000&@1|p|a|t|h|\@1|f|i|l|e| @7|"+0#0000e05&| |r|e|s|u|l|t|s| |i|n| |"+0#e000002&|\@1|p|a|t|h|\|f|i|l|e|"| +0#0000e05&|(|w|r|o|n|g|!|)| +0#0000000&@11 +@75 +@75 +|"+0#0000e05&| |:|h|e|l|p| |:|s|e|t|_|e|n|v| +0#0000000&@58 +@75 +|s+0#af5f00255&|e|t| +0#0000000&|t+0#e000e06&|e|r|m|=+0#af5f00255&|$+0#e000e06&|T|E|R|M|.+0#0000000&|n|e|w| @56 +|s+0#af5f00255&|e|t| +0#0000000&|p+0#e000e06&|a|t|h|=+0#af5f00255&|/+0#0000000&|u|s|r|/|$+0#e000e06&|I|N|C|L|U|D|E|,|$|H|O|M|E|/+0#0000000&|i|n|c|l|u|d|e|,+0#e000e06&|.+0#0000000&| @36 +@75 +@75 +|"+0#0000e05&| |M|u|l|t|i|l|i|n|e| |:|s|e|t| |a|n|d| |o|p|t|i|o|n| |v|a|l|u|e|s| +0#0000000&@40 +@75 +|s+0#af5f00255&|e|t| +0#0000000&|p+0#e000e06&|a|t|h|=+0#af5f00255&|a+0#0000000&|b|c|,+0#e000e06&|d+0#0000000&|e|f|,+0#e000e06&|g+0#0000000&|h|i| @54 +@6|"+0#0000e05&|\| |d|e|f| |i|s| |t|h|e| |'|d|e|f|i|n|e|'| |o|p|t|i|o|n| +0#0000000&@39 +@6|\+0#e000e06&| +0#0000000&|d+0#e000e06&|e|f|=+0#af5f00255&|a+0#0000000&|b|c|,+0#e000e06&|d+0#0000000&|e|f|,+0#e000e06&|g+0#0000000&|h|i| @51 +@57|7|2|,|1| @9|8|9|%| diff --git a/runtime/syntax/testdir/dumps/vim_ex_set_05.dump b/runtime/syntax/testdir/dumps/vim_ex_set_05.dump new file mode 100644 index 0000000000..3f675294e6 --- /dev/null +++ b/runtime/syntax/testdir/dumps/vim_ex_set_05.dump @@ -0,0 +1,20 @@ +| +0&#ffffff0@5|\+0#e000e06&| +0#0000000&|d+0#e000e06&|e|f|=+0#af5f00255&|a+0#0000000&|b|c|,+0#e000e06&|d+0#0000000&|e|f|,+0#e000e06&|g+0#0000000&|h|i| @51 +@75 +|s+0#af5f00255&|e|t| +0#0000000&|p+0#e000e06&|a|t|h|=+0#af5f00255&|a+0#0000000&|b|c|,+0#e000e06&| +0#0000000&@61 +@6|"+0#0000e05&|\| |d|e|f| |i|s| |a| |'|p|a|t|h|'| |d|i|r|e|c|t|o|r|y| |v|a|l|u|e| +0#0000000&@34 +@6|\+0#e000e06&|d+0#0000000&|e|f|,+0#e000e06&|g+0#0000000&|h|i| @60 +> @74 +|s+0#af5f00255&|e|t| +0#0000000&|p+0#e000e06&|a|t|h|=+0#af5f00255&| +0#0000000&@65 +@6|"+0#0000e05&|\| |d|e|f| |i|s| |a| |'|p|a|t|h|'| |d|i|r|e|c|t|o|r|y| |v|a|l|u|e| +0#0000000&@34 +@6|\+0#e000e06&|a+0#0000000&|b|c|,+0#e000e06&|d+0#0000000&|e|f| @60 +|~+0#4040ff13&| @73 +|~| @73 +|~| @73 +|~| @73 +|~| @73 +|~| @73 +|~| @73 +|~| @73 +|~| @73 +|~| @73 +| +0#0000000&@56|9|0|,|0|-|1| @7|B|o|t| diff --git a/runtime/syntax/testdir/input/vim_ex_set.vim b/runtime/syntax/testdir/input/vim_ex_set.vim new file mode 100644 index 0000000000..00e53a0d36 --- /dev/null +++ b/runtime/syntax/testdir/input/vim_ex_set.vim @@ -0,0 +1,93 @@ +" Vim :set command + +set +set! +set all +set! all +set termcap +set! termcap + +set aleph? +set aleph + +set noallowrevins + +set allowrevins! +set invallowrevins + +set aleph& +set aleph&vi +set aleph&vim + +set all& + +set aleph=128 +set aleph:128 + +set aleph =128 +set aleph :128 + +set aleph+=96 +set aleph^=2 +set aleph-=96 + +set backspace+=nostop +set backspace^=nostop +set backspace-=nostop + +set ai nosi sw=3 tw=3 + +set =^[Ot " FIXME +set =^[b " FIXME + +setlocal autoread +setglobal noautoread +set autoread< + + +" :help option-backslash + +" When setting options using |:let| and |literal-string|, you need to use one +" fewer layer of backslash. A few examples: +set makeprg=make\ file " results in "make file" +let &makeprg='make file' " (same as above) +set makeprg=make\\\ file " results in "make\ file" +set tags=tags\ /usr/tags " results in "tags" and "/usr/tags" +set tags=tags\\\ file " results in "tags file" +let &tags='tags\ file' " (same as above) + +set makeprg=make,file " results in "make,file" +set makeprg=make\\,file " results in "make\,file" +set tags=tags,file " results in "tags" and "file" +set tags=tags\\,file " results in "tags,file" +let &tags='tags\,file' " (same as above) + +" This example sets the 'titlestring' option to "hi|there": +set titlestring=hi\|there +" This sets the 'titlestring' option to "hi" and 'iconstring' to "there": +set titlestring=hi|set iconstring=there + +set dir=\\machine\path " results in "\\machine\path" +set dir=\\\\machine\\path " results in "\\machine\path" +set dir=\\path\\file " results in "\\path\file" (wrong!) + + +" :help :set_env + +set term=$TERM.new +set path=/usr/$INCLUDE,$HOME/include,. + + +" Multiline :set and option values + +set path=abc,def,ghi + "\ def is the 'define' option + \ def=abc,def,ghi + +set path=abc, + "\ def is a 'path' directory value + \def,ghi + +set path= + "\ def is a 'path' directory value + \abc,def diff --git a/runtime/syntax/vim.vim b/runtime/syntax/vim.vim index 1be5498950..8492463f5b 100644 --- a/runtime/syntax/vim.vim +++ b/runtime/syntax/vim.vim @@ -3,7 +3,7 @@ " Maintainer: Hirohito Higashi " Doug Kearns " URL: https://github.com/vim-jp/syntax-vim-ex -" Last Change: 2024 Jul 18 +" Last Change: 2024 Jul 23 " Former Maintainer: Charles E. Campbell " DO NOT CHANGE DIRECTLY. @@ -41,15 +41,15 @@ syn match vimCommand contained "\" syn keyword vimStdPlugin contained Arguments Asm Break Cfilter Clear Continue DiffOrig Evaluate Finish Gdb Lfilter Man Over Program Run S Source Step Stop Termdebug TermdebugCommand TOhtml Until Winbar XMLent XMLns " vimOptions are caught only when contained in a vimSet {{{2 -" GEN_SYN_VIM: vimOption normal, START_STR='syn keyword vimOption contained', END_STR='' -syn keyword vimOption contained al aleph ari allowrevins ambw ambiwidth arab arabic arshape arabicshape acd autochdir ai autoindent ar autoread asd autoshelldir aw autowrite awa autowriteall bg background bs backspace bk backup bkc backupcopy bdir backupdir bex backupext bsk backupskip bdlay balloondelay beval ballooneval bevalterm balloonevalterm bexpr balloonexpr bo belloff bin binary bomb brk breakat bri breakindent briopt breakindentopt bsdir browsedir bh bufhidden bl buflisted bt buftype cmp casemap cdh cdhome cd cdpath cedit ccv charconvert cin cindent cink cinkeys cino cinoptions cinsd cinscopedecls cinw cinwords cb clipboard ch cmdheight cwh cmdwinheight cc colorcolumn co columns com comments cms commentstring cp compatible cpt complete cfu completefunc -syn keyword vimOption contained cot completeopt cpp completepopup csl completeslash cocu concealcursor cole conceallevel cf confirm ci copyindent cpo cpoptions cm cryptmethod cspc cscopepathcomp csprg cscopeprg csqf cscopequickfix csre cscoperelative cst cscopetag csto cscopetagorder csverb cscopeverbose crb cursorbind cuc cursorcolumn cul cursorline culopt cursorlineopt debug def define deco delcombine dict dictionary diff dex diffexpr dip diffopt dg digraph dir directory dy display ead eadirection ed edcompatible emo emoji enc encoding eof endoffile eol endofline ea equalalways ep equalprg eb errorbells ef errorfile efm errorformat ek esckeys ei eventignore et expandtab ex exrc fenc fileencoding fencs fileencodings ff fileformat ffs fileformats fic fileignorecase -syn keyword vimOption contained ft filetype fcs fillchars fixeol fixendofline fcl foldclose fdc foldcolumn fen foldenable fde foldexpr fdi foldignore fdl foldlevel fdls foldlevelstart fmr foldmarker fdm foldmethod fml foldminlines fdn foldnestmax fdo foldopen fdt foldtext fex formatexpr flp formatlistpat fo formatoptions fp formatprg fs fsync gd gdefault gfm grepformat gp grepprg gcr guicursor gfn guifont gfs guifontset gfw guifontwide ghr guiheadroom gli guiligatures go guioptions guipty gtl guitablabel gtt guitabtooltip hf helpfile hh helpheight hlg helplang hid hidden hl highlight hi history hk hkmap hkp hkmapp hls hlsearch icon iconstring ic ignorecase imaf imactivatefunc imak imactivatekey imc imcmdline imd imdisable imi iminsert ims imsearch imsf imstatusfunc -syn keyword vimOption contained imst imstyle inc include inex includeexpr is incsearch inde indentexpr indk indentkeys inf infercase im insertmode isf isfname isi isident isk iskeyword isp isprint js joinspaces jop jumpoptions key kmp keymap km keymodel kpc keyprotocol kp keywordprg lmap langmap lm langmenu lnr langnoremap lrm langremap ls laststatus lz lazyredraw lbr linebreak lines lsp linespace lisp lop lispoptions lw lispwords list lcs listchars lpl loadplugins luadll magic mef makeef menc makeencoding mp makeprg mps matchpairs mat matchtime mco maxcombine mfd maxfuncdepth mmd maxmapdepth mm maxmem mmp maxmempattern mmt maxmemtot mis menuitems msm mkspellmem ml modeline mle modelineexpr mls modelines ma modifiable mod modified more mouse mousef mousefocus -syn keyword vimOption contained mh mousehide mousem mousemodel mousemev mousemoveevent mouses mouseshape mouset mousetime mzq mzquantum mzschemedll mzschemegcdll nf nrformats nu number nuw numberwidth ofu omnifunc odev opendevice opfunc operatorfunc pp packpath para paragraphs paste pt pastetoggle pex patchexpr pm patchmode pa path perldll pi preserveindent pvh previewheight pvp previewpopup pvw previewwindow pdev printdevice penc printencoding pexpr printexpr pfn printfont pheader printheader pmbcs printmbcharset pmbfn printmbfont popt printoptions prompt ph pumheight pw pumwidth pythondll pythonhome pythonthreedll pythonthreehome pyx pyxversion qftf quickfixtextfunc qe quoteescape ro readonly rdt redrawtime re regexpengine rnu relativenumber remap rop renderoptions -syn keyword vimOption contained report rs restorescreen ri revins rl rightleft rlc rightleftcmd rubydll ru ruler ruf rulerformat rtp runtimepath scr scroll scb scrollbind scf scrollfocus sj scrolljump so scrolloff sbo scrollopt sect sections secure sel selection slm selectmode ssop sessionoptions sh shell shcf shellcmdflag sp shellpipe shq shellquote srr shellredir ssl shellslash stmp shelltemp st shelltype sxe shellxescape sxq shellxquote sr shiftround sw shiftwidth shm shortmess sn shortname sbr showbreak sc showcmd sloc showcmdloc sft showfulltag sm showmatch smd showmode stal showtabline ss sidescroll siso sidescrolloff scl signcolumn scs smartcase si smartindent sta smarttab sms smoothscroll sts softtabstop spell spc spellcapcheck spf spellfile spl spelllang -syn keyword vimOption contained spo spelloptions sps spellsuggest sb splitbelow spk splitkeep spr splitright sol startofline stl statusline su suffixes sua suffixesadd swf swapfile sws swapsync swb switchbuf smc synmaxcol syn syntax tcl tabclose tal tabline tpm tabpagemax ts tabstop tbs tagbsearch tc tagcase tfu tagfunc tl taglength tr tagrelative tag tags tgst tagstack tcldll term tbidi termbidi tenc termencoding tgc termguicolors twk termwinkey twsl termwinscroll tws termwinsize twt termwintype terse ta textauto tx textmode tw textwidth tsr thesaurus tsrfu thesaurusfunc top tildeop to timeout tm timeoutlen title titlelen titleold titlestring tb toolbar tbis toolbariconsize ttimeout ttm ttimeoutlen tbi ttybuiltin tf ttyfast ttym ttymouse tsl ttyscroll tty ttytype -syn keyword vimOption contained udir undodir udf undofile ul undolevels ur undoreload uc updatecount ut updatetime vsts varsofttabstop vts vartabstop vbs verbose vfile verbosefile vdir viewdir vop viewoptions vi viminfo vif viminfofile ve virtualedit vb visualbell warn wiv weirdinvert ww whichwrap wc wildchar wcm wildcharm wig wildignore wic wildignorecase wmnu wildmenu wim wildmode wop wildoptions wak winaltkeys wcr wincolor wi window wfb winfixbuf wfh winfixheight wfw winfixwidth wh winheight wmh winminheight wmw winminwidth winptydll wiw winwidth wrap wm wrapmargin ws wrapscan write wa writeany wb writebackup wd writedelay xtermcodes +" GEN_SYN_VIM: vimOption normal, START_STR='syn keyword vimOption contained', END_STR='skipwhite nextgroup=vimSetEqual,vimSetMod' +syn keyword vimOption contained al aleph ari allowrevins ambw ambiwidth arab arabic arshape arabicshape acd autochdir ai autoindent ar autoread asd autoshelldir aw autowrite awa autowriteall bg background bs backspace bk backup bkc backupcopy bdir backupdir bex backupext bsk backupskip bdlay balloondelay beval ballooneval bevalterm balloonevalterm bexpr balloonexpr bo belloff bin binary bomb brk breakat bri breakindent briopt breakindentopt bsdir browsedir bh bufhidden bl buflisted bt buftype cmp casemap cdh cdhome cd cdpath cedit ccv charconvert cin cindent cink cinkeys cino cinoptions cinsd cinscopedecls cinw cinwords cb clipboard ch cmdheight cwh cmdwinheight cc colorcolumn co columns com comments cms commentstring cp compatible cpt complete cfu completefunc skipwhite nextgroup=vimSetEqual,vimSetMod +syn keyword vimOption contained cot completeopt cpp completepopup csl completeslash cocu concealcursor cole conceallevel cf confirm ci copyindent cpo cpoptions cm cryptmethod cspc cscopepathcomp csprg cscopeprg csqf cscopequickfix csre cscoperelative cst cscopetag csto cscopetagorder csverb cscopeverbose crb cursorbind cuc cursorcolumn cul cursorline culopt cursorlineopt debug def define deco delcombine dict dictionary diff dex diffexpr dip diffopt dg digraph dir directory dy display ead eadirection ed edcompatible emo emoji enc encoding eof endoffile eol endofline ea equalalways ep equalprg eb errorbells ef errorfile efm errorformat ek esckeys ei eventignore et expandtab ex exrc fenc fileencoding fencs fileencodings ff fileformat ffs fileformats fic fileignorecase skipwhite nextgroup=vimSetEqual,vimSetMod +syn keyword vimOption contained ft filetype fcs fillchars fixeol fixendofline fcl foldclose fdc foldcolumn fen foldenable fde foldexpr fdi foldignore fdl foldlevel fdls foldlevelstart fmr foldmarker fdm foldmethod fml foldminlines fdn foldnestmax fdo foldopen fdt foldtext fex formatexpr flp formatlistpat fo formatoptions fp formatprg fs fsync gd gdefault gfm grepformat gp grepprg gcr guicursor gfn guifont gfs guifontset gfw guifontwide ghr guiheadroom gli guiligatures go guioptions guipty gtl guitablabel gtt guitabtooltip hf helpfile hh helpheight hlg helplang hid hidden hl highlight hi history hk hkmap hkp hkmapp hls hlsearch icon iconstring ic ignorecase imaf imactivatefunc imak imactivatekey imc imcmdline imd imdisable imi iminsert ims imsearch imsf imstatusfunc skipwhite nextgroup=vimSetEqual,vimSetMod +syn keyword vimOption contained imst imstyle inc include inex includeexpr is incsearch inde indentexpr indk indentkeys inf infercase im insertmode isf isfname isi isident isk iskeyword isp isprint js joinspaces jop jumpoptions key kmp keymap km keymodel kpc keyprotocol kp keywordprg lmap langmap lm langmenu lnr langnoremap lrm langremap ls laststatus lz lazyredraw lbr linebreak lines lsp linespace lisp lop lispoptions lw lispwords list lcs listchars lpl loadplugins luadll magic mef makeef menc makeencoding mp makeprg mps matchpairs mat matchtime mco maxcombine mfd maxfuncdepth mmd maxmapdepth mm maxmem mmp maxmempattern mmt maxmemtot mis menuitems msm mkspellmem ml modeline mle modelineexpr mls modelines ma modifiable mod modified more mouse mousef mousefocus skipwhite nextgroup=vimSetEqual,vimSetMod +syn keyword vimOption contained mh mousehide mousem mousemodel mousemev mousemoveevent mouses mouseshape mouset mousetime mzq mzquantum mzschemedll mzschemegcdll nf nrformats nu number nuw numberwidth ofu omnifunc odev opendevice opfunc operatorfunc pp packpath para paragraphs paste pt pastetoggle pex patchexpr pm patchmode pa path perldll pi preserveindent pvh previewheight pvp previewpopup pvw previewwindow pdev printdevice penc printencoding pexpr printexpr pfn printfont pheader printheader pmbcs printmbcharset pmbfn printmbfont popt printoptions prompt ph pumheight pw pumwidth pythondll pythonhome pythonthreedll pythonthreehome pyx pyxversion qftf quickfixtextfunc qe quoteescape ro readonly rdt redrawtime re regexpengine rnu relativenumber remap rop renderoptions skipwhite nextgroup=vimSetEqual,vimSetMod +syn keyword vimOption contained report rs restorescreen ri revins rl rightleft rlc rightleftcmd rubydll ru ruler ruf rulerformat rtp runtimepath scr scroll scb scrollbind scf scrollfocus sj scrolljump so scrolloff sbo scrollopt sect sections secure sel selection slm selectmode ssop sessionoptions sh shell shcf shellcmdflag sp shellpipe shq shellquote srr shellredir ssl shellslash stmp shelltemp st shelltype sxe shellxescape sxq shellxquote sr shiftround sw shiftwidth shm shortmess sn shortname sbr showbreak sc showcmd sloc showcmdloc sft showfulltag sm showmatch smd showmode stal showtabline ss sidescroll siso sidescrolloff scl signcolumn scs smartcase si smartindent sta smarttab sms smoothscroll sts softtabstop spell spc spellcapcheck spf spellfile spl spelllang skipwhite nextgroup=vimSetEqual,vimSetMod +syn keyword vimOption contained spo spelloptions sps spellsuggest sb splitbelow spk splitkeep spr splitright sol startofline stl statusline su suffixes sua suffixesadd swf swapfile sws swapsync swb switchbuf smc synmaxcol syn syntax tcl tabclose tal tabline tpm tabpagemax ts tabstop tbs tagbsearch tc tagcase tfu tagfunc tl taglength tr tagrelative tag tags tgst tagstack tcldll term tbidi termbidi tenc termencoding tgc termguicolors twk termwinkey twsl termwinscroll tws termwinsize twt termwintype terse ta textauto tx textmode tw textwidth tsr thesaurus tsrfu thesaurusfunc top tildeop to timeout tm timeoutlen title titlelen titleold titlestring tb toolbar tbis toolbariconsize ttimeout ttm ttimeoutlen tbi ttybuiltin tf ttyfast ttym ttymouse tsl ttyscroll tty ttytype skipwhite nextgroup=vimSetEqual,vimSetMod +syn keyword vimOption contained udir undodir udf undofile ul undolevels ur undoreload uc updatecount ut updatetime vsts varsofttabstop vts vartabstop vbs verbose vfile verbosefile vdir viewdir vop viewoptions vi viminfo vif viminfofile ve virtualedit vb visualbell warn wiv weirdinvert ww whichwrap wc wildchar wcm wildcharm wig wildignore wic wildignorecase wmnu wildmenu wim wildmode wop wildoptions wak winaltkeys wcr wincolor wi window wfb winfixbuf wfh winfixheight wfw winfixwidth wh winheight wmh winminheight wmw winminwidth winptydll wiw winwidth wrap wm wrapmargin ws wrapscan write wa writeany wb writebackup wd writedelay xtermcodes skipwhite nextgroup=vimSetEqual,vimSetMod " vimOptions: These are the turn-off setting variants {{{2 " GEN_SYN_VIM: vimOption turn-off, START_STR='syn keyword vimOption contained', END_STR='' @@ -66,8 +66,8 @@ syn keyword vimOption contained invprompt invro invreadonly invrnu invrelativenu syn keyword vimOption contained invtf invttyfast invudf invundofile invvb invvisualbell invwarn invwiv invweirdinvert invwic invwildignorecase invwmnu invwildmenu invwfb invwinfixbuf invwfh invwinfixheight invwfw invwinfixwidth invwrap invws invwrapscan invwrite invwa invwriteany invwb invwritebackup invxtermcodes " termcap codes (which can also be set) {{{2 -" GEN_SYN_VIM: vimOption term output code, START_STR='syn keyword vimOption contained', END_STR='' -syn keyword vimOption contained t_AB t_AF t_AU t_AL t_al t_bc t_BE t_BD t_cd t_ce t_Ce t_CF t_cl t_cm t_Co t_CS t_Cs t_cs t_CV t_da t_db t_DL t_dl t_ds t_Ds t_EC t_EI t_fs t_fd t_fe t_GP t_IE t_IS t_ke t_ks t_le t_mb t_md t_me t_mr t_ms t_nd t_op t_RF t_RB t_RC t_RI t_Ri t_RK t_RS t_RT t_RV t_Sb t_SC t_se t_Sf t_SH t_SI t_Si t_so t_SR t_sr t_ST t_Te t_te t_TE t_ti t_TI t_Ts t_ts t_u7 t_ue t_us t_Us t_ut t_vb t_ve t_vi t_VS t_vs t_WP t_WS t_XM t_xn t_xs t_ZH t_ZR t_8f t_8b t_8u t_xo +" GEN_SYN_VIM: vimOption term output code, START_STR='syn keyword vimOption contained', END_STR='skipwhite nextgroup=vimSetEqual,vimSetMod' +syn keyword vimOption contained t_AB t_AF t_AU t_AL t_al t_bc t_BE t_BD t_cd t_ce t_Ce t_CF t_cl t_cm t_Co t_CS t_Cs t_cs t_CV t_da t_db t_DL t_dl t_ds t_Ds t_EC t_EI t_fs t_fd t_fe t_GP t_IE t_IS t_ke t_ks t_le t_mb t_md t_me t_mr t_ms t_nd t_op t_RF t_RB t_RC t_RI t_Ri t_RK t_RS t_RT t_RV t_Sb t_SC t_se t_Sf t_SH t_SI t_Si t_so t_SR t_sr t_ST t_Te t_te t_TE t_ti t_TI t_Ts t_ts t_u7 t_ue t_us t_Us t_ut t_vb t_ve t_vi t_VS t_vs t_WP t_WS t_XM t_xn t_xs t_ZH t_ZR t_8f t_8b t_8u t_xo skipwhite nextgroup=vimSetEqual,vimSetMod " term key codes syn keyword vimOption contained t_F1 t_F2 t_F3 t_F4 t_F5 t_F6 t_F7 t_F8 t_F9 t_k1 t_K1 t_k2 t_k3 t_K3 t_k4 t_K4 t_k5 t_K5 t_k6 t_K6 t_k7 t_K7 t_k8 t_K8 t_k9 t_K9 t_KA t_kb t_kB t_KB t_KC t_kd t_kD t_KD t_KE t_KF t_KG t_kh t_KH t_kI t_KI t_KJ t_KK t_kl t_KL t_kN t_kP t_kr t_ku syn match vimOption contained "t_%1" @@ -544,11 +544,15 @@ syn match vimCmplxRepeat '[^a-zA-Z_/\\()]q[0-9a-zA-Z"]\>'lc=1 syn match vimCmplxRepeat '@[0-9a-z".=@:]\ze\($\|[^a-zA-Z]\>\)' " Set command and associated set-options (vimOptions) with comment {{{2 -syn region vimSet matchgroup=vimCommand start="\<\%(setl\%[ocal]\|setg\%[lobal]\|se\%[t]\)\>" skip="\%(\\\\\)*\\.\n\@!" end="$" end="|" matchgroup=vimNotation end="<[cC][rR]>" keepend contains=vimSetEqual,vimOption,vimErrSetting,@vimComment,vimSetString,vimSetMod -syn region vimSetEqual contained start="[=:]\|[-+^]=" skip="\\\\\|\\\s" end="[| \t]"me=e-1 end="$" contains=vimCtrlChar,vimSetSep,vimNotation,vimEnvvar -syn region vimSetString contained start=+="+hs=s+1 skip=+\\\\\|\\"+ end=+"+ contains=vimCtrlChar +syn match vimSet "\<\%(setl\%[ocal]\|setg\%[lobal]\|se\%[t]\)\>" skipwhite nextgroup=vimSetBang,vimSetRegion +syn region vimSetRegion contained start="\S" skip=+\\\\\|\\|\|\n\s*\\\|\n\s*["#]\\ + matchgroup=vimCmdSep end="|" end="$" matchgroup=vimNotation end="<[cC][rR]>" keepend contains=@vimComment,@vimContinue,vimErrSetting,vimOption,vimSetAll,vimSetTermcap +syn region vimSetEqual contained matchgroup=vimOper start="[=:]\|[-+^]=" skip=+\\\\\|\\|\|\\\s\|\n\s*\\\|\n\s*["#]\\ \|^\s*\\\|^\s*["#]\\ + matchgroup=vimCmdSep end="|" end="\ze\s" end="$" contains=@vimContinue,vimCtrlChar,vimEnvvar,vimNotation,vimSetSep +syn match vimSetBang contained "\a\@1<=!" skipwhite nextgroup=vimSetAll,vimSetTermcap +syn keyword vimSetAll contained all nextgroup=vimSetMod +syn keyword vimSetTermcap contained termcap +syn region vimSetString contained start=+="+hs=s+1 skip=+\\\\\|\\"+ end=+"+ contains=vimCtrlChar syn match vimSetSep contained "[,:]" -syn match vimSetMod contained "&vim\=\|[!&?<]\|all&" +syn match vimSetMod contained "\a\@1<=\%(&vim\=\|[!&?<]\)" " Variable Declarations: {{{2 " ===================== @@ -1273,9 +1277,13 @@ if !exists("skip_vim_syntax_inits") hi def link vimSearchDelim Statement hi def link vimSearch vimString hi def link vimSep Delimiter + hi def link vimSet vimCommand + hi def link vimSetAll vimOption + hi def link vimSetBang vimBang hi def link vimSetMod vimOption - hi def link vimSetSep Statement + hi def link vimSetSep vimSep hi def link vimSetString vimString + hi def link vimSetTermcap vimOption hi def link vimShebang PreProc hi def link vimSleep vimCommand hi def link vimSleepArg Constant From 2979cfc2627d76a9c09cad46a1647dcd4aa73f5f Mon Sep 17 00:00:00 2001 From: Christian Brabandt Date: Wed, 24 Jul 2024 21:37:39 +0200 Subject: [PATCH 008/186] patch 9.1.0613: tests: termdebug test may fail and leave file around MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Problem: tests: termdebug test may fail and leave temp file around (Dominique Pellé) Solution: only run balloon_show() if the function exists, validate termdebug is running using the g: termdebug_is_running var, use defer to delete temporary files fixes: #15334 Signed-off-by: Christian Brabandt --- runtime/pack/dist/opt/termdebug/plugin/termdebug.vim | 8 +++++++- src/testdir/test_termdebug.vim | 10 +++++++++- src/version.c | 2 ++ 3 files changed, 18 insertions(+), 2 deletions(-) diff --git a/runtime/pack/dist/opt/termdebug/plugin/termdebug.vim b/runtime/pack/dist/opt/termdebug/plugin/termdebug.vim index ee77008492..04f82bd504 100644 --- a/runtime/pack/dist/opt/termdebug/plugin/termdebug.vim +++ b/runtime/pack/dist/opt/termdebug/plugin/termdebug.vim @@ -1535,6 +1535,12 @@ def CleanupExpr(passed_expr: string): string return expr enddef +def Balloon_show(expr: string) + if has("+balloon_eval") || has("+balloon_eval_term") + balloon_show(expr) + endif +enddef + def HandleEvaluate(msg: string) var value = msg ->substitute('.*value="\(.*\)"', '\1', '') @@ -1555,7 +1561,7 @@ def HandleEvaluate(msg: string) else evalFromBalloonExprResult ..= $' = {value}' endif - balloon_show(evalFromBalloonExprResult) + Balloon_show(evalFromBalloonExprResult) else echomsg $'"{evalexpr}": {value}' endif diff --git a/src/testdir/test_termdebug.vim b/src/testdir/test_termdebug.vim index fe5ed89dc2..b5c12aefe1 100644 --- a/src/testdir/test_termdebug.vim +++ b/src/testdir/test_termdebug.vim @@ -63,6 +63,7 @@ func Test_termdebug_basic() edit XTD_basic.c Termdebug ./XTD_basic + call WaitForAssert({-> assert_true(get(g:, "termdebug_is_running", v:false))}) call WaitForAssert({-> assert_equal(3, winnr('$'))}) let gdb_buf = winbufnr(1) wincmd b @@ -164,6 +165,7 @@ func Test_termdebug_basic() let g:termdebug_config = {} let g:termdebug_config['use_prompt'] = use_prompt TermdebugCommand ./XTD_basic arg args + call WaitForAssert({-> assert_true(get(g:, "termdebug_is_running", v:false))}) call WaitForAssert({-> assert_equal(3, winnr('$'))}) wincmd t quit! @@ -186,6 +188,7 @@ func Test_termdebug_tbreak() execute 'edit ' .. src_name execute 'Termdebug ./' .. bin_name + call WaitForAssert({-> assert_true(get(g:, "termdebug_is_running", v:false))}) call WaitForAssert({-> assert_equal(3, winnr('$'))}) let gdb_buf = winbufnr(1) wincmd b @@ -246,6 +249,7 @@ func Test_termdebug_mapping() call assert_true(maparg('-', 'n', 0, 1)->empty()) call assert_true(maparg('+', 'n', 0, 1)->empty()) Termdebug + call WaitForAssert({-> assert_true(get(g:, "termdebug_is_running", v:false))}) call WaitForAssert({-> assert_equal(3, winnr('$'))}) wincmd b call assert_false(maparg('K', 'n', 0, 1)->empty()) @@ -268,6 +272,7 @@ func Test_termdebug_mapping() nnoremap - :echom "-" nnoremap + :echom "+" Termdebug + call WaitForAssert({-> assert_true(get(g:, "termdebug_is_running", v:false))}) call WaitForAssert({-> assert_equal(3, winnr('$'))}) wincmd b call assert_false(maparg('K', 'n', 0, 1)->empty()) @@ -305,6 +310,7 @@ func Test_termdebug_mapping() " Start termdebug from foo buffer foo Termdebug + call WaitForAssert({-> assert_true(get(g:, "termdebug_is_running", v:false))}) call WaitForAssert({-> assert_equal(3, winnr('$'))}) wincmd b call assert_true(maparg('K', 'n', 0, 1).buffer) @@ -368,6 +374,7 @@ function Test_termdebug_save_restore_variables() let g:termdebug_config['map_K'] = v:true Termdebug + call WaitForAssert({-> assert_true(get(g:, "termdebug_is_running", v:false))}) call WaitForAssert({-> assert_equal(3, winnr('$'))}) call WaitForAssert({-> assert_match(&mousemodel, 'popup_setpos')}) wincmd t @@ -398,7 +405,7 @@ function Test_termdebug_sanity_check() let s:error_message = "You have a file/folder named '" .. s:filename .. "'" " Write dummy file with bad name - call writefile(['This', 'is', 'a', 'test'], s:filename) + call writefile(['This', 'is', 'a', 'test'], s:filename, 'D') Termdebug call WaitForAssert({-> assert_true(execute('messages') =~ s:error_message)}) call WaitForAssert({-> assert_equal(1, winnr('$'))}) @@ -413,6 +420,7 @@ endfunction function Test_termdebug_double_termdebug_instances() let s:error_message = 'Terminal debugger already running, cannot run two' Termdebug + call WaitForAssert({-> assert_true(get(g:, "termdebug_is_running", v:false))}) call WaitForAssert({-> assert_equal(3, winnr('$'))}) Termdebug call WaitForAssert({-> assert_true(execute('messages') =~ s:error_message)}) diff --git a/src/version.c b/src/version.c index 7cef73c8ba..0583e272ba 100644 --- a/src/version.c +++ b/src/version.c @@ -704,6 +704,8 @@ static char *(features[]) = static int included_patches[] = { /* Add new patch number below this line */ +/**/ + 613, /**/ 612, /**/ From 377a085ea360dd9c5342240bd18e6719fcb1ebfc Mon Sep 17 00:00:00 2001 From: Doug Kearns Date: Thu, 25 Jul 2024 20:43:50 +0200 Subject: [PATCH 009/186] patch 9.1.0614: tests: screendump tests fail due to recent syntax changes Problem: Vim syntax file changes to :set command highlighting render some test dump files invalid. (zeertzjq, after commit ddbb6fe) Solution: Regenerate the affected dump files (Doug Kearns) closes: #15342 Signed-off-by: Doug Kearns Signed-off-by: Christian Brabandt --- src/testdir/dumps/Test_cmdwin_no_terminal.dump | 2 +- src/testdir/dumps/Test_wildmenu_pum_22.dump | 4 ++-- src/version.c | 2 ++ 3 files changed, 5 insertions(+), 3 deletions(-) diff --git a/src/testdir/dumps/Test_cmdwin_no_terminal.dump b/src/testdir/dumps/Test_cmdwin_no_terminal.dump index 97d81478eb..6de9879819 100644 --- a/src/testdir/dumps/Test_cmdwin_no_terminal.dump +++ b/src/testdir/dumps/Test_cmdwin_no_terminal.dump @@ -1,6 +1,6 @@ | +0&#ffffff0@74 |[+1&&|N|o| |N|a|m|e|]| @47|0|,|0|-|1| @9|A|l@1 -|:+0#4040ff13&|s+0#af5f00255&|e|t| +0#0000000&|c+0#e000e06&|m|d|h|e|i|g|h|t|=+0#0000000&|2| @58 +|:+0#4040ff13&|s+0#af5f00255&|e|t| +0#0000000&|c+0#e000e06&|m|d|h|e|i|g|h|t|=+0#af5f00255&|2+0#0000000&| @58 |:+0#4040ff13&> +0#0000000&@73 |~+0#4040ff13&| @73 |~| @73 diff --git a/src/testdir/dumps/Test_wildmenu_pum_22.dump b/src/testdir/dumps/Test_wildmenu_pum_22.dump index 3fd00ade37..e774d5dda2 100644 --- a/src/testdir/dumps/Test_wildmenu_pum_22.dump +++ b/src/testdir/dumps/Test_wildmenu_pum_22.dump @@ -1,7 +1,7 @@ | +0&#ffffff0@74 |[+1&&|N|o| |N|a|m|e|]| @65 -|:+0#4040ff13&|s+0#af5f00255&|e|t| +0#0000000&|w+0#e000e06&|i|l|d|m|o|d|e|=+0#0000000&|l|o|n|g|e|s|t|,+0#af5f00255&|f+0#0000000&|u|l@1| @48 -|:+0#4040ff13&|s+0#af5f00255&|e|t| +0#0000000&|w+0#e000e06&|i|l|d|m|o|d|e|=+0#0000000&|f|u|l@1| @56 +|:+0#4040ff13&|s+0#af5f00255&|e|t| +0#0000000&|w+0#e000e06&|i|l|d|m|o|d|e|=+0#af5f00255&|l+0#0000000&|o|n|g|e|s|t|,+0#e000e06&|f+0#0000000&|u|l@1| @48 +|:+0#4040ff13&|s+0#af5f00255&|e|t| +0#0000000&|w+0#e000e06&|i|l|d|m|o|d|e|=+0#af5f00255&|f+0#0000000&|u|l@1| @56 |:+0#4040ff13&|s+0#af5f00255&|i|g|n| +0#0000000&|d|e|f|i|n|e| @62 |:+0#4040ff13&|s+0#af5f00255&|i|g|n| +0#0000000&|d|e|f|i|n|e> @62 |~+0#4040ff13&| @73 diff --git a/src/version.c b/src/version.c index 0583e272ba..3d6e3a878e 100644 --- a/src/version.c +++ b/src/version.c @@ -704,6 +704,8 @@ static char *(features[]) = static int included_patches[] = { /* Add new patch number below this line */ +/**/ + 614, /**/ 613, /**/ From d5cc8ee0fa3e952492aed0c2f7e97586a0a87ab7 Mon Sep 17 00:00:00 2001 From: Daniel Smith Date: Thu, 25 Jul 2024 20:54:10 +0200 Subject: [PATCH 010/186] runtime(progress): Update maintainer info The Progress syntax file was last updated eight years ago, and the header information twelve years ago. Attempts to contact the last known maintainer at the email address listed in the file header (with the spam-prevention characters removed) produced a delivery failure notification stating that the address did not exist. I intend to submit some minor improvements to this file. Per [1], I will assume maintainership of it for the time being. related: #15339 Signed-off-by: Daniel Smith Signed-off-by: Christian Brabandt [1]: https://groups.google.com/g/vim_dev/c/I3pOKIOgM4A/m/pekGQB_lBwAJ --- .github/MAINTAINERS | 1 + runtime/syntax/progress.vim | 3 ++- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/.github/MAINTAINERS b/.github/MAINTAINERS index 7ec5433a2b..0c5c3d6272 100644 --- a/.github/MAINTAINERS +++ b/.github/MAINTAINERS @@ -510,6 +510,7 @@ runtime/syntax/pod.vim @petdance runtime/syntax/poefilter.vim @ObserverOfTime runtime/syntax/postscr.vim @mrdubya runtime/syntax/privoxy.vim @dkearns +runtime/syntax/progress.vim @rdnlsmith runtime/syntax/prolog.vim @XVilka runtime/syntax/ps1.vim @heaths runtime/syntax/ps1xml.vim @heaths diff --git a/runtime/syntax/progress.vim b/runtime/syntax/progress.vim index 5e7cfef299..2227fbec2a 100644 --- a/runtime/syntax/progress.vim +++ b/runtime/syntax/progress.vim @@ -3,7 +3,8 @@ " Filename extensions: *.p (collides with Pascal), " *.i (collides with assembler) " *.w (collides with cweb) -" Maintainer: Philip Uren Remove SPAXY spam block +" Maintainer: Daniel Smith +" Previous Maintainer: Philip Uren Remove SPAXY spam block " Contributors: Matthew Stickney " Chris Ruprecht " Mikhail Kuperblum From 408bd9ffe7e4d1f0891582edcbc4ab4c2a7df4bf Mon Sep 17 00:00:00 2001 From: Daniel Smith Date: Thu, 25 Jul 2024 20:54:57 +0200 Subject: [PATCH 011/186] runtime(progress): Add syntax test for comments We intend to update the Progress syntax file to support the single-line comment syntax that was introduced in Progress OpenEdge 11.6. As there are no existing tests for this file, we should first add one that demonstrates the comment syntax that is already supported. related: #15339 Signed-off-by: Daniel Smith Signed-off-by: Christian Brabandt --- .../testdir/dumps/progress_comments_00.dump | 20 ++++++++++++ .../testdir/dumps/progress_comments_01.dump | 20 ++++++++++++ .../syntax/testdir/input/progress_comments.p | 31 +++++++++++++++++++ 3 files changed, 71 insertions(+) create mode 100644 runtime/syntax/testdir/dumps/progress_comments_00.dump create mode 100644 runtime/syntax/testdir/dumps/progress_comments_01.dump create mode 100644 runtime/syntax/testdir/input/progress_comments.p diff --git a/runtime/syntax/testdir/dumps/progress_comments_00.dump b/runtime/syntax/testdir/dumps/progress_comments_00.dump new file mode 100644 index 0000000000..d0cff21a55 --- /dev/null +++ b/runtime/syntax/testdir/dumps/progress_comments_00.dump @@ -0,0 +1,20 @@ +>/+0#0000e05#ffffff0|*| +0#0000000&@72 +| +0#0000e05&|*| |V|I|M|_|T|E|S|T|_|S|E|T|U|P| |s|e|t| |f|i|l|e|t|y|p|e|=|p|r|o|g|r|e|s@1| +0#0000000&@35 +| +0#0000e05&|*|/| +0#0000000&@71 +@75 +|d+0#af5f00255&|e|f|i|n|e| +0#0000000&|v+0#af5f00255&|a|r|i|a|b|l|e| +0#0000000&|c|u|s|t|o|m|e|r|_|n|a|m|e| |a+0#af5f00255&|s| +0#0000000&|c+0#af5f00255&|h|a|r|a|c|t|e|r| +0#0000000&|n+0#af5f00255&|o|-|u|n|d|o|.| +0#0000000&@23 +@75 +|/+0#0000e05&|*| |T|h|e| |t|e|s|t| |s|e|t|u|p| |a|b|o|v|e| |i|s| |a|n| |e|x|a|m|p|l|e| |o|f| |a| |m|u|l|t|i|-|l|i|n|e| |c|o|m@1|e|n|t|.| +0#0000000&@12 +|T+0#0000e05&|h|i|s| |i|s| |t|o@1|;| |t|h|e| |l|e|a|d|i|n|g| |*| |a|n|d| |l|e|f|t|-|h|a|n|d| |a|l|i|g|n|m|e|n|t| |a|r|e| |n|o|t| |r|e|q|u|i|r|e|d|.| |*|/| +0#0000000&@3 +|f+0#af5f00255&|o|r| +0#0000000&|e+0#af5f00255&|a|c|h| +0#0000000&|c|u|s|t|o|m|e|r| |n+0#af5f00255&|o|-|l|o|c|k| +0#0000000&@49 +@4|w+0#af5f00255&|h|e|r|e| +0#0000000&|c|u|s|t|o|m|e|r|.+0#af5f00255&|c+0#0000000&|u|s|t|o|m|e|r|_|i|d| |=+0#af5f00255&| +0#0000000&|1+0#e000002&|2|3|4|5| +0#0000000&@36 +|:+0#af5f00255&| +0#0000000&@73 +@4|a+0#af5f00255&|s@1|i|g|n| +0#0000000&|c|u|s|t|_|n|a|m|e| |=+0#af5f00255&| +0#0000000&|c|u|s|t|o|m|e|r|.+0#af5f00255&|c+0#0000000&|u|s|t|o|m|e|r|_|n|a|m|e|.+0#af5f00255&| +0#0000000&|/+0#0000e05&|*| |C|o|m@1|e|n|t|s| |c|a|n| |a|l|s|o| |a|p@1|e|a|r| +0#0000000& +| +0#0000e05&@49|a|t| |t|h|e| |e|n|d| |o|f| |a| |l|i|n|e|.| |*|/| +0#0000000& +|e+0#af5f00255&|n|d|.| +0#0000000&|/+0#0000e05&|*| |f|o|r| |e|a|c|h| |c|u|s|t|o|m|e|r| |*|/| +0#0000000&@46 +@75 +|/+0#0000e05&|*| |C|o|m@1|e|n|t|s| |c|a|n| |b|e| |/|*| |n|e|s|t|e|d| |*|/|.| |H|e|r|e|'|s| |t|h|e| |s|a|m|e| |q|u|e|r|y| |a|s| |a|b|o|v|e|,| |b|u|t| +0#0000000&@6 +|c+0#0000e05&|o|m@1|e|n|t|e|d| |o|u|t| |t|h|i|s| |t|i|m|e|:| +0#0000000&@50 +@75 +|f+0#0000e05&|o|r| |e|a|c|h| |c|u|s|t|o|m|e|r| |n|o|-|l|o|c|k| +0#0000000&@49 +@57|1|,|1| @10|T|o|p| diff --git a/runtime/syntax/testdir/dumps/progress_comments_01.dump b/runtime/syntax/testdir/dumps/progress_comments_01.dump new file mode 100644 index 0000000000..6ccebc2008 --- /dev/null +++ b/runtime/syntax/testdir/dumps/progress_comments_01.dump @@ -0,0 +1,20 @@ +|e+0#af5f00255#ffffff0|n|d|.| +0#0000000&|/+0#0000e05&|*| |f|o|r| |e|a|c|h| |c|u|s|t|o|m|e|r| |*|/| +0#0000000&@46 +@75 +|/+0#0000e05&|*| |C|o|m@1|e|n|t|s| |c|a|n| |b|e| |/|*| |n|e|s|t|e|d| |*|/|.| |H|e|r|e|'|s| |t|h|e| |s|a|m|e| |q|u|e|r|y| |a|s| |a|b|o|v|e|,| |b|u|t| +0#0000000&@6 +|c+0#0000e05&|o|m@1|e|n|t|e|d| |o|u|t| |t|h|i|s| |t|i|m|e|:| +0#0000000&@50 +@75 +>f+0#0000e05&|o|r| |e|a|c|h| |c|u|s|t|o|m|e|r| |n|o|-|l|o|c|k| +0#0000000&@49 +| +0#0000e05&@3|w|h|e|r|e| |c|u|s|t|o|m|e|r|.|c|u|s|t|o|m|e|r|_|i|d| |=| |1|2|3|4|5| +0#0000000&@36 +|:+0#0000e05&| +0#0000000&@73 +| +0#0000e05&@3|a|s@1|i|g|n| |c|u|s|t|_|n|a|m|e| |=| |c|u|s|t|o|m|e|r|.|c|u|s|t|o|m|e|r|_|n|a|m|e|.| |/|*| |C|o|m@1|e|n|t|s| |c|a|n| |a|l|s|o| |a|p@1|e|a|r| +0#0000000& +| +0#0000e05&@49|a|t| |t|h|e| |e|n|d| |o|f| |a| |l|i|n|e|.| |*|/| +0#0000000& +|e+0#0000e05&|n|d|.| |/|*| |f|o|r| |e|a|c|h| |c|u|s|t|o|m|e|r| |*|/| +0#0000000&@46 +@75 +|T+0#0000001#ffff4012|O|D|O|:+0#0000e05#ffffff0| |N|o|t|e| |t|h|a|t| |/|*|/| |d|o|e|s| |n|o|t| |e|n|d| |t|h|e| |c|o|m@1|e|n|t|,| |b|e|c|a|u|s|e| |i|t| |a|c|t|u|a|l@1|y| |s|t|a|r|t|s| |a| +0#0000000& +|n+0#0000e05&|e|w| |c|o|m@1|e|n|t| |w|h|o|s|e| |f|i|r|s|t| |c|h|a|r|a|c|t|e|r| |i|s| |a| |'|/|'|.| |N|o|w| |w|e| |n|e@1|d| |t|w|o| |e|n|d|-|c|o|m@1|e|n|t| +0#0000000&@3 +|m+0#0000e05&|a|r|k|e|r|s| |t|o| |r|e|t|u|r|n| |t|o| |a|c|t|u|a|l| |c|o|d|e|.| |*|/| |*|/| +0#0000000&@35 +@75 +|d+0#af5f00255&|i|s|p|l|a|y| +0#0000000&|c|u|s|t|o|m|e|r|_|n|a|m|e|.+0#af5f00255&| +0#0000000&@52 +@75 +|~+0#4040ff13&| @73 +| +0#0000000&@56|1|9|,|1| @9|B|o|t| diff --git a/runtime/syntax/testdir/input/progress_comments.p b/runtime/syntax/testdir/input/progress_comments.p new file mode 100644 index 0000000000..fc3f1cf881 --- /dev/null +++ b/runtime/syntax/testdir/input/progress_comments.p @@ -0,0 +1,31 @@ +/* + * VIM_TEST_SETUP set filetype=progress + */ + +define variable customer_name as character no-undo. + +/* The test setup above is an example of a multi-line comment. +This is too; the leading * and left-hand alignment are not required. */ +for each customer no-lock + where customer.customer_id = 12345 +: + assign cust_name = customer.customer_name. /* Comments can also appear + at the end of a line. */ +end. /* for each customer */ + +/* Comments can be /* nested */. Here's the same query as above, but +commented out this time: + +for each customer no-lock + where customer.customer_id = 12345 +: + assign cust_name = customer.customer_name. /* Comments can also appear + at the end of a line. */ +end. /* for each customer */ + +TODO: Note that /*/ does not end the comment, because it actually starts a +new comment whose first character is a '/'. Now we need two end-comment +markers to return to actual code. */ */ + +display customer_name. + From 4d68054c1e49b937a1aa9567196b97b36fe99c27 Mon Sep 17 00:00:00 2001 From: Daniel Smith Date: Thu, 25 Jul 2024 20:55:34 +0200 Subject: [PATCH 012/186] runtime(progress): Add single-line comment syntax Progress OpenEdge 11.6 added a new C-like single-line comment syntax; such comments begin with `//` and proceed to the end of the line. Add a new syntax group `ProgressLineComment` to implement highlighting for this syntax. Rename the existing group from `ProgressComment` to `ProgressBlockComment`, and introduce a cluster named `ProgressComment` to encapsulate both. closes: #15339 Signed-off-by: Daniel Smith Signed-off-by: Christian Brabandt --- runtime/syntax/progress.vim | 11 ++++++---- .../testdir/dumps/progress_comments_01.dump | 4 ++-- .../testdir/dumps/progress_comments_02.dump | 20 +++++++++++++++++++ .../syntax/testdir/input/progress_comments.p | 14 +++++++++++++ 4 files changed, 43 insertions(+), 6 deletions(-) create mode 100644 runtime/syntax/testdir/dumps/progress_comments_02.dump diff --git a/runtime/syntax/progress.vim b/runtime/syntax/progress.vim index 2227fbec2a..4b8f61287c 100644 --- a/runtime/syntax/progress.vim +++ b/runtime/syntax/progress.vim @@ -9,8 +9,7 @@ " Chris Ruprecht " Mikhail Kuperblum " John Florian -" Version: 13 -" Last Change: Nov 11 2012 +" Last Change: Jul 23 2024 " quit when a syntax file was already loaded if exists("b:current_syntax") @@ -117,8 +116,10 @@ syn match ProgressShowTab "\t" " If you don't like white space on the end of lines, uncomment this: " syn match ProgressSpaceError "\s\+$" -syn region ProgressComment start="/\*" end="\*/" contains=ProgressComment,ProgressTodo,ProgressDebug,@Spell -syn region ProgressInclude start="^[ ]*[{]" end="[}]" contains=ProgressPreProc,ProgressOperator,ProgressString,ProgressComment +syn region ProgressBlockComment start="/\*" end="\*/" contains=ProgressBlockComment,ProgressTodo,ProgressDebug,@Spell +syn match ProgressLineComment "//.*$" contains=ProgressTodo,ProgressDebug,@Spell +syn cluster ProgressComment contains=ProgressBlockComment,ProgressLineComment +syn region ProgressInclude start="^[ ]*[{]" end="[}]" contains=ProgressPreProc,ProgressOperator,ProgressString,@ProgressComment syn region ProgressPreProc start="&" end="\>" contained " This next line works reasonably well. @@ -282,6 +283,8 @@ syn sync lines=800 hi def link ProgressByte Number hi def link ProgressCase Repeat hi def link ProgressComment Comment +hi def link ProgressBlockComment ProgressComment +hi def link ProgressLineComment ProgressComment hi def link ProgressConditional Conditional hi def link ProgressDebug Debug hi def link ProgressDo Repeat diff --git a/runtime/syntax/testdir/dumps/progress_comments_01.dump b/runtime/syntax/testdir/dumps/progress_comments_01.dump index 6ccebc2008..11dc103bad 100644 --- a/runtime/syntax/testdir/dumps/progress_comments_01.dump +++ b/runtime/syntax/testdir/dumps/progress_comments_01.dump @@ -16,5 +16,5 @@ @75 |d+0#af5f00255&|i|s|p|l|a|y| +0#0000000&|c|u|s|t|o|m|e|r|_|n|a|m|e|.+0#af5f00255&| +0#0000000&@52 @75 -|~+0#4040ff13&| @73 -| +0#0000000&@56|1|9|,|1| @9|B|o|t| +|/+0#0000e05&@1| |T|h|i|s| |i|s| |t|h|e| |s|i|n|g|l|e|-|l|i|n|e| |c|o|m@1|e|n|t| |s|y|n|t|a|x|.| +0#0000000&@32 +@57|1|9|,|1| @9|5|0|%| diff --git a/runtime/syntax/testdir/dumps/progress_comments_02.dump b/runtime/syntax/testdir/dumps/progress_comments_02.dump new file mode 100644 index 0000000000..1967476fc5 --- /dev/null +++ b/runtime/syntax/testdir/dumps/progress_comments_02.dump @@ -0,0 +1,20 @@ +|/+0#0000e05#ffffff0@1| |T|h|i|s| |i|s| |t|h|e| |s|i|n|g|l|e|-|l|i|n|e| |c|o|m@1|e|n|t| |s|y|n|t|a|x|.| +0#0000000&@32 +@75 +|/+0#0000e05&@1|N|o| |s|p|a|c|e| |i|s| |r|e|q|u|i|r|e|d| |a|f|t|e|r| |t|h|e| |s|l|a|s|h|e|s|.| |A|l|s|o|,| |a| |/|*| |h|e|r|e| |d|o|e|s| |n|o|t| |b|e|g|i|n| |a| +0#0000000& +|/+0#0000e05&@1|n|e|w| |b|l|o|c|k| |c|o|m@1|e|n|t|.| +0#0000000&@54 +@75 +>f+0#af5f00255&|o|r| +0#0000000&|e+0#af5f00255&|a|c|h| +0#0000000&|s|u|p@1|l|i|e|r| |n+0#af5f00255&|o|-|l|o|c|k|:| +0#0000000&@48 +@4|/+0#0000e05&|*| |H|o|w|e|v|e|r|,| |a| |b|l|o|c|k| |c|o|m@1|e|n|t| |c|a|n| |e|n|d| |i|n|s|i|d|e| |(|w|h|a|t| |l|o@1|k|s| |l|i|k|e|)| |a| +0#0000000&@8 +| +0#0000e05&@6|s|i|n|g|l|e|-|l|i|n|e| |c|o|m@1|e|n|t|,| |b|e|c|a|u|s|e| |t|h|e| |s|l|a|s|h|e|s| |a|r|e| |j|u|s|t| |t|e|x|t| |a|s| |f|a|r| |a|s| |t|h|e +| @6|/@1| |b|l|o|c|k| |c|o|m@1|e|n|t| |i|s| |c|o|n|c|e|r|n|e|d|.| |*|/| +0#0000000&@34 +@4|d+0#af5f00255&|i|s|p|l|a|y| +0#0000000&|s|u|p@1|l|i|e|r|.+0#af5f00255&| +0#0000000&@53 +@75 +@4|/+0#0000e05&@1| |T+0#0000001#ffff4012|O|D|O|:+0#0000e05#ffffff0| |O|b|s|e|r|v|e| |t|h|a|t| |t+0#0000001#ffff4012|o|d|o| +0#0000e05#ffffff0|h|i|g|h|l|i|g|h|t|i|n|g| |w|o|r|k|s| |i|n| |l|i|n|e| |c|o|m@1|e|n|t|s| |t|o@1|.| +0#0000000&@3 +|e+0#af5f00255&|n|d|.| +0#0000000&@70 +@75 +|~+0#4040ff13&| @73 +|~| @73 +|~| @73 +|~| @73 +|~| @73 +| +0#0000000&@56|3|7|,|1| @9|B|o|t| diff --git a/runtime/syntax/testdir/input/progress_comments.p b/runtime/syntax/testdir/input/progress_comments.p index fc3f1cf881..dd831fe8c5 100644 --- a/runtime/syntax/testdir/input/progress_comments.p +++ b/runtime/syntax/testdir/input/progress_comments.p @@ -29,3 +29,17 @@ markers to return to actual code. */ */ display customer_name. +// This is the single-line comment syntax. + +//No space is required after the slashes. Also, a /* here does not begin a +//new block comment. + +for each supplier no-lock: + /* However, a block comment can end inside (what looks like) a + single-line comment, because the slashes are just text as far as the + // block comment is concerned. */ + display supplier. + + // TODO: Observe that todo highlighting works in line comments too. +end. + From 242667ae142d9862a7bace82c58cb11c79fdab7a Mon Sep 17 00:00:00 2001 From: zeertzjq Date: Thu, 25 Jul 2024 20:58:42 +0200 Subject: [PATCH 013/186] patch 9.1.0615: Unnecessary STRLEN() in make_percent_swname() Problem: Unnecessary STRLEN() in make_percent_swname() Solution: Pass the end of "dir" to make_percent_swname() (zeertzjq) closes: #15340 Signed-off-by: zeertzjq Signed-off-by: Christian Brabandt --- src/bufwrite.c | 4 ++-- src/memline.c | 8 ++++---- src/proto/memline.pro | 2 +- src/version.c | 2 ++ 4 files changed, 9 insertions(+), 7 deletions(-) diff --git a/src/bufwrite.c b/src/bufwrite.c index c9d9875d64..23cd884bfa 100644 --- a/src/bufwrite.c +++ b/src/bufwrite.c @@ -1350,7 +1350,7 @@ buf_write( p = copybuf + STRLEN(copybuf); if (after_pathsep(copybuf, p) && p[-1] == p[-2]) // Ends with '//', use full path - if ((p = make_percent_swname(copybuf, fname)) != NULL) + if ((p = make_percent_swname(copybuf, p, fname)) != NULL) { backup = modname(p, backup_ext, FALSE); vim_free(p); @@ -1564,7 +1564,7 @@ buf_write( p = IObuff + STRLEN(IObuff); if (after_pathsep(IObuff, p) && p[-1] == p[-2]) // path ends with '//', use full path - if ((p = make_percent_swname(IObuff, fname)) != NULL) + if ((p = make_percent_swname(IObuff, p, fname)) != NULL) { backup = modname(p, backup_ext, FALSE); vim_free(p); diff --git a/src/memline.c b/src/memline.c index 9e579cdfd9..b93eb0a48e 100644 --- a/src/memline.c +++ b/src/memline.c @@ -1975,7 +1975,7 @@ recover_names( if (after_pathsep(dir_name, p) && len > 1 && p[-1] == p[-2]) { // Ends with '//', Use Full path for swap name - tail = make_percent_swname(dir_name, fname_res); + tail = make_percent_swname(dir_name, p, fname_res); } else #endif @@ -2143,7 +2143,7 @@ recover_names( * removed. */ char_u * -make_percent_swname(char_u *dir, char_u *name) +make_percent_swname(char_u *dir, char_u *dir_end, char_u *name) { char_u *d = NULL, *s, *f; @@ -2159,7 +2159,7 @@ make_percent_swname(char_u *dir, char_u *name) if (vim_ispathsep(*d)) *d = '%'; - dir[STRLEN(dir) - 1] = NUL; // remove one trailing slash + dir_end[-1] = NUL; // remove one trailing slash d = concat_fnames(dir, s, TRUE); vim_free(s); } @@ -4676,7 +4676,7 @@ makeswapname( if (after_pathsep(dir_name, s) && len > 1 && s[-1] == s[-2]) { // Ends with '//', Use Full path r = NULL; - if ((s = make_percent_swname(dir_name, fname_res)) != NULL) + if ((s = make_percent_swname(dir_name, s, fname_res)) != NULL) { r = modname(s, (char_u *)".swp", FALSE); vim_free(s); diff --git a/src/proto/memline.pro b/src/proto/memline.pro index c5d9b5d8da..238bceafbb 100644 --- a/src/proto/memline.pro +++ b/src/proto/memline.pro @@ -11,7 +11,7 @@ void ml_close_notmod(void); void ml_timestamp(buf_T *buf); void ml_recover(int checkext); int recover_names(char_u *fname, int do_list, list_T *ret_list, int nr, char_u **fname_out); -char_u *make_percent_swname(char_u *dir, char_u *name); +char_u *make_percent_swname(char_u *dir, char_u *dir_end, char_u *name); void get_b0_dict(char_u *fname, dict_T *d); void ml_sync_all(int check_file, int check_char); void ml_preserve(buf_T *buf, int message); diff --git a/src/version.c b/src/version.c index 3d6e3a878e..f434a136b8 100644 --- a/src/version.c +++ b/src/version.c @@ -704,6 +704,8 @@ static char *(features[]) = static int included_patches[] = { /* Add new patch number below this line */ +/**/ + 615, /**/ 614, /**/ From eb4b903c9b238ebcc1d14cfcb207129b4931a33d Mon Sep 17 00:00:00 2001 From: Ken Takata Date: Thu, 25 Jul 2024 21:07:13 +0200 Subject: [PATCH 014/186] patch 9.1.0616: filetype: Make syntax highlighting off for MS Makefiles Problem: filetype: Make syntax highlighting off for MS Makefiles Solution: Try to detect MS Makefiles and adjust syntax rules to it. (Ken Takata) Highlighting of variable expansion in Microsoft Makefile can be broken. E.g.: https://github.com/vim/vim/blob/2979cfc2627d76a9c09cad46a1647dcd4aa73f5f/src/Make_mvc.mak#L1331 Don't use backslash as escape characters if `make_microsoft` is set. Also fix that `make_no_comments` was not considered if `make_microsoft` was set. Also add description for `make_microsoft` and `make_no_comments` to the documentation and include a very simple filetype test closes: #15341 Signed-off-by: Christian Brabandt Signed-off-by: Ken Takata --- runtime/autoload/dist/ft.vim | 19 +++++++++++++++++++ runtime/doc/syntax.txt | 14 ++++++++++++-- runtime/filetype.vim | 2 +- runtime/syntax/make.vim | 21 ++++++++++++++------- src/testdir/test_filetype.vim | 17 +++++++++++++++++ src/version.c | 2 ++ 6 files changed, 65 insertions(+), 10 deletions(-) diff --git a/runtime/autoload/dist/ft.vim b/runtime/autoload/dist/ft.vim index be299ef50d..e53cdacbe3 100644 --- a/runtime/autoload/dist/ft.vim +++ b/runtime/autoload/dist/ft.vim @@ -532,6 +532,25 @@ export def FTm() endif enddef +export def FTmake() + # Check if it is a Microsoft Makefile + unlet! b:make_microsoft + var n = 1 + while n < 1000 && n <= line('$') + var line = getline(n) + if line =~? '^\s*!\s*\(ifn\=\(def\)\=\|include\|message\|error\)\>' + b:make_microsoft = 1 + break + elseif line =~ '^ *ifn\=\(eq\|def\)\>' || line =~ '^ *[-s]\=include\s' + break + elseif line =~ '^ *\w\+\s*[!?:+]=' + break + endif + n += 1 + endwhile + setf make +enddef + export def FTmms() var n = 1 while n < 20 diff --git a/runtime/doc/syntax.txt b/runtime/doc/syntax.txt index f843082183..2f8d9505c4 100644 --- a/runtime/doc/syntax.txt +++ b/runtime/doc/syntax.txt @@ -1,4 +1,4 @@ -*syntax.txt* For Vim version 9.1. Last change: 2024 Jul 23 +*syntax.txt* For Vim version 9.1. Last change: 2024 Jul 25 VIM REFERENCE MANUAL by Bram Moolenaar @@ -2278,7 +2278,7 @@ By default mail.vim synchronises syntax to 100 lines before the first displayed line. If you have a slow machine, and generally deal with emails with short headers, you can change this to a smaller value: > - :let mail_minlines = 30 + :let mail_minlines = 30 MAKE *make.vim* *ft-make-syntax* @@ -2289,6 +2289,16 @@ feature off by using: > :let make_no_commands = 1 +Comments are also highlighted by default. You can turn this off by using: > + + :let make_no_comments = 1 + +Microsoft Makefile handles variable expansion and comments differently +(backslashes are not used for escape). If you see any wrong highlights +because of this, you can try this: > + + :let make_microsoft = 1 + MAPLE *maple.vim* *ft-maple-syntax* diff --git a/runtime/filetype.vim b/runtime/filetype.vim index b589a0b781..d02826578e 100644 --- a/runtime/filetype.vim +++ b/runtime/filetype.vim @@ -1387,7 +1387,7 @@ au BufNewFile,BufRead */etc/mail/aliases,*/etc/aliases setf mailaliases au BufNewFile,BufRead .mailcap,mailcap setf mailcap " Makefile -au BufNewFile,BufRead *[mM]akefile,*.mk,*.mak setf make +au BufNewFile,BufRead *[mM]akefile,*.mk,*.mak call dist#ft#FTmake() au BufNewFile,BufRead Kbuild setf make " MakeIndex diff --git a/runtime/syntax/make.vim b/runtime/syntax/make.vim index b4573044ca..d3ddf78291 100644 --- a/runtime/syntax/make.vim +++ b/runtime/syntax/make.vim @@ -28,8 +28,13 @@ syn match makePreCondit "^!\s*\(cmdswitches\|error\|message\|include\|if\|ifdef\ syn case match " identifiers -syn region makeIdent start="\$(" skip="\\)\|\\\\" end=")" contains=makeStatement,makeIdent -syn region makeIdent start="\${" skip="\\}\|\\\\" end="}" contains=makeStatement,makeIdent +if exists("b:make_microsoft") || exists("make_microsoft") + syn region makeIdent start="\$(" end=")" contains=makeStatement,makeIdent + syn region makeIdent start="\${" end="}" contains=makeStatement,makeIdent +else + syn region makeIdent start="\$(" skip="\\)\|\\\\" end=")" contains=makeStatement,makeIdent + syn region makeIdent start="\${" skip="\\}\|\\\\" end="}" contains=makeStatement,makeIdent +endif syn match makeIdent "\$\$\w*" syn match makeIdent "\$[^({]" syn match makeIdent "^ *[^:#= \t]*\s*[:+?!*]="me=e-2 @@ -78,11 +83,13 @@ syn match makeOverride "^ *override\>" syn match makeStatement contained "(\(abspath\|addprefix\|addsuffix\|and\|basename\|call\|dir\|error\|eval\|file\|filter-out\|filter\|findstring\|firstword\|flavor\|foreach\|guile\|if\|info\|join\|lastword\|notdir\|or\|origin\|patsubst\|realpath\|shell\|sort\|strip\|subst\|suffix\|value\|warning\|wildcard\|word\|wordlist\|words\)\>"ms=s+1 " Comment -if exists("make_microsoft") - syn match makeComment "#.*" contains=@Spell,makeTodo -elseif !exists("make_no_comments") - syn region makeComment start="#" end="^$" end="[^\\]$" keepend contains=@Spell,makeTodo - syn match makeComment "#$" contains=@Spell +if !exists("make_no_comments") + if exists("b:make_microsoft") || exists("make_microsoft") + syn match makeComment "#.*" contains=@Spell,makeTodo + else + syn region makeComment start="#" end="^$" end="[^\\]$" keepend contains=@Spell,makeTodo + syn match makeComment "#$" contains=@Spell + endif endif syn keyword makeTodo TODO FIXME XXX contained diff --git a/src/testdir/test_filetype.vim b/src/testdir/test_filetype.vim index cee7c21f3a..f8b3ea872b 100644 --- a/src/testdir/test_filetype.vim +++ b/src/testdir/test_filetype.vim @@ -2646,4 +2646,21 @@ func Test_pl_file() filetype off endfunc +func Test_make_file() + filetype on + + " Microsoft Makefile + call writefile(['# Makefile for Windows', '!if "$(VIMDLL)" == "yes"'], 'XMakefile.mak', 'D') + split XMakefile.mak + call assert_equal(1, get(b:, 'make_microsoft', 0)) + bwipe! + + call writefile(['# get the list of tests', 'include testdir/Make_all.mak'], 'XMakefile.mak', 'D') + split XMakefile.mak + call assert_equal(0, get(b:, 'make_microsoft', 0)) + bwipe! + + filetype off +endfunc + " vim: shiftwidth=2 sts=2 expandtab diff --git a/src/version.c b/src/version.c index f434a136b8..9ee1592cf0 100644 --- a/src/version.c +++ b/src/version.c @@ -704,6 +704,8 @@ static char *(features[]) = static int included_patches[] = { /* Add new patch number below this line */ +/**/ + 616, /**/ 615, /**/ From dc373d456b5919ed2b8f83e8642c115f646ca93d Mon Sep 17 00:00:00 2001 From: Luuk van Baal Date: Thu, 25 Jul 2024 21:24:32 +0200 Subject: [PATCH 015/186] patch 9.1.0617: Cursor moves beyond first line of folded end of buffer Problem: Cursor moves beyond start of a folded range at the end of a buffer. Solution: Move cursor to start of fold when going beyond end of buffer. Check that cursor moved to detect FAIL in outer cursor function. (Luuk van Baal) closes: #15344 Signed-off-by: Luuk van Baal Signed-off-by: Christian Brabandt --- src/edit.c | 8 +++++--- src/testdir/test_fold.vim | 14 ++++++++++++++ src/version.c | 2 ++ 3 files changed, 21 insertions(+), 3 deletions(-) diff --git a/src/edit.c b/src/edit.c index e75a1cf118..8a37a61693 100644 --- a/src/edit.c +++ b/src/edit.c @@ -2849,7 +2849,6 @@ cursor_down_inner(win_T *wp, long n) // count each sequence of folded lines as one logical line while (n--) { - // Move to last line of fold, will fail if it's the end-of-file. if (hasFoldingWin(wp, lnum, NULL, &last, TRUE, NULL)) lnum = last + 1; else @@ -2877,8 +2876,11 @@ cursor_down( { linenr_T lnum = curwin->w_cursor.lnum; linenr_T line_count = curwin->w_buffer->b_ml.ml_line_count; - // This fails if the cursor is already in the last line or would move - // beyond the last line and '-' is in 'cpoptions' + // This fails if the cursor is already in the last (folded) line, or would + // move beyond the last line and '-' is in 'cpoptions'. +#ifdef FEAT_FOLDING + hasFoldingWin(curwin, lnum, NULL, &lnum, TRUE, NULL); +#endif if (n > 0 && (lnum >= line_count || (lnum + n > line_count diff --git a/src/testdir/test_fold.vim b/src/testdir/test_fold.vim index dedc4a2432..7fb0043311 100644 --- a/src/testdir/test_fold.vim +++ b/src/testdir/test_fold.vim @@ -1914,4 +1914,18 @@ func Test_foldexpr_end_fold() bwipe! endfunc +" Test moving cursor down to or beyond start of folded end of buffer. +func Test_cursor_down_fold_eob() + call setline(1, range(1, 4)) + norm Gzf2kj + call assert_equal(2, line('.')) + norm zojzc + call assert_equal(3, line('.')) + norm j + call assert_equal(3, line('.')) + norm k2j + call assert_equal(4, line('.')) + bwipe! +endfunc + " vim: shiftwidth=2 sts=2 expandtab diff --git a/src/version.c b/src/version.c index 9ee1592cf0..1a267fd3fd 100644 --- a/src/version.c +++ b/src/version.c @@ -704,6 +704,8 @@ static char *(features[]) = static int included_patches[] = { /* Add new patch number below this line */ +/**/ + 617, /**/ 616, /**/ From 508e7856ec4afc9d6038b14bb6893668268dccab Mon Sep 17 00:00:00 2001 From: glepnir Date: Thu, 25 Jul 2024 21:39:08 +0200 Subject: [PATCH 016/186] patch 9.1.0618: cannot mark deprecated attributes in completion menu Problem: cannot mark deprecated attributes in completion menu Solution: add hl_group to the Dictionary of supported completion fields (glepnir) closes: #15314 Signed-off-by: glepnir Signed-off-by: Christian Brabandt --- runtime/doc/insert.txt | 8 ++++- runtime/doc/version9.txt | 4 ++- src/cmdexpand.c | 1 + src/insexpand.c | 25 +++++++++++----- src/popupmenu.c | 13 +++++++-- src/structs.h | 13 +++++---- src/testdir/dumps/Test_pum_highlights_12.dump | 20 +++++++++++++ src/testdir/test_popup.vim | 29 +++++++++++++++++++ src/version.c | 2 ++ 9 files changed, 97 insertions(+), 18 deletions(-) create mode 100644 src/testdir/dumps/Test_pum_highlights_12.dump diff --git a/runtime/doc/insert.txt b/runtime/doc/insert.txt index 0d59a2edab..e85f341c8f 100644 --- a/runtime/doc/insert.txt +++ b/runtime/doc/insert.txt @@ -1,4 +1,4 @@ -*insert.txt* For Vim version 9.1. Last change: 2024 Jul 13 +*insert.txt* For Vim version 9.1. Last change: 2024 Jul 25 VIM REFERENCE MANUAL by Bram Moolenaar @@ -1183,6 +1183,12 @@ items: user_data custom data which is associated with the item and available in |v:completed_item|; it can be any type; defaults to an empty string + hl_group allows specifying an additional highlight group to + apply extra attributes to completion items in the + popupmenu. Is combined with |hl-PmenuSel| and + |hl-Pmenu| highlighting attributes to apply cterm and + gui properties, such as strikethrough to the + completion items. All of these except "icase", "equal", "dup" and "empty" must be a string. If an item does not meet these requirements then an error message is given and diff --git a/runtime/doc/version9.txt b/runtime/doc/version9.txt index 26df6f2e58..5f91af62a7 100644 --- a/runtime/doc/version9.txt +++ b/runtime/doc/version9.txt @@ -1,4 +1,4 @@ -*version9.txt* For Vim version 9.1. Last change: 2024 Jul 15 +*version9.txt* For Vim version 9.1. Last change: 2024 Jul 25 VIM REFERENCE MANUAL by Bram Moolenaar @@ -41588,6 +41588,8 @@ Changed~ |getcompletion()| - add 'cpoptions' flag "z" |cpo-z|, to disable some (traditional) vi behaviour/inconsistency (see |d-special| and |cw|). +- allow to specify additional attributes in the completion menu (allows to + mark deprecated attributes from LSP server) |complete-items| *added-9.2* Added ~ diff --git a/src/cmdexpand.c b/src/cmdexpand.c index 0267d28e0f..a33d6bede1 100644 --- a/src/cmdexpand.c +++ b/src/cmdexpand.c @@ -359,6 +359,7 @@ cmdline_pum_create( compl_match_array[i].pum_info = NULL; compl_match_array[i].pum_extra = NULL; compl_match_array[i].pum_kind = NULL; + compl_match_array[i].pum_extrahlattr = -1; } // Compute the popup menu starting column diff --git a/src/insexpand.c b/src/insexpand.c index 2be63a58ef..02d29704bc 100644 --- a/src/insexpand.c +++ b/src/insexpand.c @@ -114,6 +114,7 @@ struct compl_S int cp_flags; // CP_ values int cp_number; // sequence number int cp_score; // fuzzy match score + int cp_extrahlattr; // extra highlight group attr }; // values for cp_flags @@ -205,7 +206,7 @@ static int compl_selected_item = -1; static int *compl_fuzzy_scores; -static int ins_compl_add(char_u *str, int len, char_u *fname, char_u **cptext, typval_T *user_data, int cdir, int flags, int adup); +static int ins_compl_add(char_u *str, int len, char_u *fname, char_u **cptext, typval_T *user_data, int cdir, int flags, int adup, int extrahl); static void ins_compl_longest_match(compl_T *match); static void ins_compl_del_pum(void); static void ins_compl_files(int count, char_u **files, int thesaurus, int flags, regmatch_T *regmatch, char_u *buf, int *dir); @@ -745,7 +746,7 @@ ins_compl_add_infercase( if (icase) flags |= CP_ICASE; - res = ins_compl_add(str, len, fname, NULL, NULL, dir, flags, FALSE); + res = ins_compl_add(str, len, fname, NULL, NULL, dir, flags, FALSE, -1); vim_free(tofree); return res; } @@ -778,7 +779,8 @@ ins_compl_add( typval_T *user_data UNUSED, // "user_data" entry or NULL int cdir, int flags_arg, - int adup) // accept duplicate match + int adup, // accept duplicate match + int extra_hlattr) { compl_T *match; int dir = (cdir == 0 ? compl_direction : cdir); @@ -842,6 +844,7 @@ ins_compl_add( else match->cp_fname = NULL; match->cp_flags = flags; + match->cp_extrahlattr = extra_hlattr; if (cptext != NULL) { @@ -994,7 +997,7 @@ ins_compl_add_matches( for (i = 0; i < num_matches && add_r != FAIL; i++) if ((add_r = ins_compl_add(matches[i], -1, NULL, NULL, NULL, dir, - CP_FAST | (icase ? CP_ICASE : 0), FALSE)) == OK) + CP_FAST | (icase ? CP_ICASE : 0), FALSE, -1)) == OK) // if dir was BACKWARD then honor it just once dir = FORWARD; FreeWild(num_matches, matches); @@ -1338,6 +1341,7 @@ ins_compl_build_pum(void) compl_match_array[i].pum_kind = compl->cp_text[CPT_KIND]; compl_match_array[i].pum_info = compl->cp_text[CPT_INFO]; compl_match_array[i].pum_score = compl->cp_score; + compl_match_array[i].pum_extrahlattr = compl->cp_extrahlattr; if (compl->cp_text[CPT_MENU] != NULL) compl_match_array[i++].pum_extra = compl->cp_text[CPT_MENU]; @@ -2856,6 +2860,8 @@ ins_compl_add_tv(typval_T *tv, int dir, int fast) char_u *(cptext[CPT_COUNT]); typval_T user_data; int status; + char_u *extra_hlname; + int extra_hlattr = -1; user_data.v_type = VAR_UNKNOWN; if (tv->v_type == VAR_DICT && tv->vval.v_dict != NULL) @@ -2865,6 +2871,10 @@ ins_compl_add_tv(typval_T *tv, int dir, int fast) cptext[CPT_MENU] = dict_get_string(tv->vval.v_dict, "menu", FALSE); cptext[CPT_KIND] = dict_get_string(tv->vval.v_dict, "kind", FALSE); cptext[CPT_INFO] = dict_get_string(tv->vval.v_dict, "info", FALSE); + extra_hlname = dict_get_string(tv->vval.v_dict, "hl_group", FALSE); + if (extra_hlname != NULL && *extra_hlname != NUL) + extra_hlattr = syn_name2attr(extra_hlname); + dict_get_tv(tv->vval.v_dict, "user_data", &user_data); if (dict_get_string(tv->vval.v_dict, "icase", FALSE) != NULL && dict_get_number(tv->vval.v_dict, "icase")) @@ -2887,7 +2897,8 @@ ins_compl_add_tv(typval_T *tv, int dir, int fast) clear_tv(&user_data); return FAIL; } - status = ins_compl_add(word, -1, NULL, cptext, &user_data, dir, flags, dup); + status = ins_compl_add(word, -1, NULL, cptext, + &user_data, dir, flags, dup, extra_hlattr); if (status != OK) clear_tv(&user_data); return status; @@ -2974,7 +2985,7 @@ set_completion(colnr_T startcol, list_T *list) flags |= CP_ICASE; if (compl_orig_text == NULL || ins_compl_add(compl_orig_text, -1, NULL, NULL, NULL, 0, - flags | CP_FAST, FALSE) != OK) + flags | CP_FAST, FALSE, -1) != OK) return; ctrl_x_mode = CTRL_X_EVAL; @@ -5177,7 +5188,7 @@ ins_compl_start(void) if (p_ic) flags |= CP_ICASE; if (compl_orig_text == NULL || ins_compl_add(compl_orig_text, - -1, NULL, NULL, NULL, 0, flags, FALSE) != OK) + -1, NULL, NULL, NULL, 0, flags, FALSE, -1) != OK) { VIM_CLEAR(compl_pattern); compl_patternlen = 0; diff --git a/src/popupmenu.c b/src/popupmenu.c index c116b102af..0f19c9e2a1 100644 --- a/src/popupmenu.c +++ b/src/popupmenu.c @@ -510,7 +510,8 @@ pum_screen_puts_with_attrs( int cells UNUSED, char_u *text, int textlen, - int *attrs) + int *attrs, + int extra_attr) { int col_start = col; char_u *ptr = text; @@ -527,6 +528,8 @@ pum_screen_puts_with_attrs( else #endif attr = attrs[col - col_start]; + if (extra_attr > 0) + attr = hl_combine_attr(extra_attr, attr); screen_puts_len(ptr, char_len, row, col, attr); col += mb_ptr2cells(ptr); ptr += char_len; @@ -628,6 +631,8 @@ pum_redraw(void) { hlf = hlfs[round]; attr = highlight_attr[hlf]; + if (pum_array[idx].pum_extrahlattr > 0) + attr = hl_combine_attr(attr, pum_array[idx].pum_extrahlattr); width = 0; s = NULL; switch (round) @@ -698,7 +703,8 @@ pum_redraw(void) else pum_screen_puts_with_attrs(row, col - cells + 1, cells, rt, - (int)STRLEN(rt), attrs); + (int)STRLEN(rt), attrs, + pum_array[idx].pum_extrahlattr); vim_free(rt_start); } @@ -732,7 +738,8 @@ pum_redraw(void) screen_puts_len(st, size, row, col, attr); else pum_screen_puts_with_attrs(row, col, cells, - st, size, attrs); + st, size, attrs, + pum_array[idx].pum_extrahlattr); vim_free(st); } diff --git a/src/structs.h b/src/structs.h index 63092115be..2e8efa89d4 100644 --- a/src/structs.h +++ b/src/structs.h @@ -4466,12 +4466,13 @@ typedef struct */ typedef struct { - char_u *pum_text; // main menu text - char_u *pum_kind; // extra kind text (may be truncated) - char_u *pum_extra; // extra menu text (may be truncated) - char_u *pum_info; // extra info - int pum_score; // fuzzy match score - int pum_idx; // index of item before sorting by score + char_u *pum_text; // main menu text + char_u *pum_kind; // extra kind text (may be truncated) + char_u *pum_extra; // extra menu text (may be truncated) + char_u *pum_info; // extra info + int pum_score; // fuzzy match score + int pum_idx; // index of item before sorting by score + int pum_extrahlattr; // extra highlight group attr for combine } pumitem_T; /* diff --git a/src/testdir/dumps/Test_pum_highlights_12.dump b/src/testdir/dumps/Test_pum_highlights_12.dump new file mode 100644 index 0000000000..a0d2b491fb --- /dev/null +++ b/src/testdir/dumps/Test_pum_highlights_12.dump @@ -0,0 +1,20 @@ +|a+0&#ffffff0|w|o|r|d|1> @68 +|a+0#ff404010#e0e0e08|w|o|r|d|1| |W| |e|x|t|r|a| |t|e|x|t| |1| | +0#4040ff13#ffffff0@52 +|a+0#0000001#ffd7ff255|w|o|r|d|2| |W| |e|x|t|r|a| |t|e|x|t| |2| | +0#4040ff13#ffffff0@52 +|你*0#ff404010#ffd7ff255|好| +&@2|W| |e|x|t|r|a| |t|e|x|t| |3| | +0#4040ff13#ffffff0@52 +|~| @73 +|~| @73 +|~| @73 +|~| @73 +|~| @73 +|~| @73 +|~| @73 +|~| @73 +|~| @73 +|~| @73 +|~| @73 +|~| @73 +|~| @73 +|~| @73 +|~| @73 +|-+2#0000000&@1| |U|s|e|r| |d|e|f|i|n|e|d| |c|o|m|p|l|e|t|i|o|n| |(|^|U|^|N|^|P|)| |m+0#00e0003&|a|t|c|h| |1| |o|f| |3| +0#0000000&@26 diff --git a/src/testdir/test_popup.vim b/src/testdir/test_popup.vim index d930133348..30cabf9e26 100644 --- a/src/testdir/test_popup.vim +++ b/src/testdir/test_popup.vim @@ -1499,4 +1499,33 @@ func Test_pum_highlights_match() call StopVimInTerminal(buf) endfunc +func Test_pum_extrahl() + CheckScreendump + let lines =<< trim END + hi StrikeFake ctermfg=9 + func CompleteFunc( findstart, base ) + if a:findstart + return 0 + endif + return { + \ 'words': [ + \ { 'word': 'aword1', 'menu': 'extra text 1', 'kind': 'W', 'extrahl': 'StrikeFake' }, + \ { 'word': 'aword2', 'menu': 'extra text 2', 'kind': 'W', }, + \ { 'word': '你好', 'menu': 'extra text 3', 'kind': 'W', 'extrahl': 'StrikeFake' }, + \]} + endfunc + set completeopt=menu + set completefunc=CompleteFunc + END + call writefile(lines, 'Xscript', 'D') + let buf = RunVimInTerminal('-S Xscript', {}) + call TermWait(buf) + call term_sendkeys(buf, "iaw\\") + call TermWait(buf, 50) + call VerifyScreenDump(buf, 'Test_pum_highlights_12', {}) + call term_sendkeys(buf, "\\u") + call TermWait(buf) + call StopVimInTerminal(buf) +endfunc + " vim: shiftwidth=2 sts=2 expandtab diff --git a/src/version.c b/src/version.c index 1a267fd3fd..fd33dab992 100644 --- a/src/version.c +++ b/src/version.c @@ -704,6 +704,8 @@ static char *(features[]) = static int included_patches[] = { /* Add new patch number below this line */ +/**/ + 618, /**/ 617, /**/ From 8754efe437fcb17ad2c64192f8722e08d68e032e Mon Sep 17 00:00:00 2001 From: glepnir Date: Fri, 26 Jul 2024 18:15:27 +0200 Subject: [PATCH 017/186] patch 9.1.0619: tests: test_popup fails Problem: tests: test_popup fails (after v9.1.0618) Solution: Correct test, move combining extra attributes to pum_compute_text_attrs() (glepnir) closes: #15353 Signed-off-by: glepnir Signed-off-by: Christian Brabandt --- src/popupmenu.c | 19 +++++++++---------- src/testdir/test_popup.vim | 4 ++-- src/version.c | 2 ++ 3 files changed, 13 insertions(+), 12 deletions(-) diff --git a/src/popupmenu.c b/src/popupmenu.c index 0f19c9e2a1..b6bc1dc45d 100644 --- a/src/popupmenu.c +++ b/src/popupmenu.c @@ -425,7 +425,7 @@ pum_under_menu(int row, int col, int only_redrawing) * Returns attributes for every cell, or NULL if all attributes are the same. */ static int * -pum_compute_text_attrs(char_u *text, hlf_T hlf) +pum_compute_text_attrs(char_u *text, hlf_T hlf, int extra_hlattr) { int i; size_t leader_len; @@ -483,6 +483,9 @@ pum_compute_text_attrs(char_u *text, hlf_T hlf) else if (matched_start && ptr < text + leader_len) new_attr = highlight_attr[hlf == HLF_PSI ? HLF_PMSI : HLF_PMNI]; + if (extra_hlattr > 0) + new_attr = hl_combine_attr(new_attr, extra_hlattr); + char_cells = mb_ptr2cells(ptr); for (i = 0; i < char_cells; i++) attrs[cell_idx + i] = new_attr; @@ -510,8 +513,7 @@ pum_screen_puts_with_attrs( int cells UNUSED, char_u *text, int textlen, - int *attrs, - int extra_attr) + int *attrs) { int col_start = col; char_u *ptr = text; @@ -528,8 +530,6 @@ pum_screen_puts_with_attrs( else #endif attr = attrs[col - col_start]; - if (extra_attr > 0) - attr = hl_combine_attr(extra_attr, attr); screen_puts_len(ptr, char_len, row, col, attr); col += mb_ptr2cells(ptr); ptr += char_len; @@ -661,7 +661,8 @@ pum_redraw(void) if (saved != NUL) *p = saved; - attrs = pum_compute_text_attrs(st, hlf); + int extra_hlattr = pum_array[idx].pum_extrahlattr; + attrs = pum_compute_text_attrs(st, hlf, extra_hlattr); #ifdef FEAT_RIGHTLEFT if (pum_rl) @@ -703,8 +704,7 @@ pum_redraw(void) else pum_screen_puts_with_attrs(row, col - cells + 1, cells, rt, - (int)STRLEN(rt), attrs, - pum_array[idx].pum_extrahlattr); + (int)STRLEN(rt), attrs); vim_free(rt_start); } @@ -738,8 +738,7 @@ pum_redraw(void) screen_puts_len(st, size, row, col, attr); else pum_screen_puts_with_attrs(row, col, cells, - st, size, attrs, - pum_array[idx].pum_extrahlattr); + st, size, attrs); vim_free(st); } diff --git a/src/testdir/test_popup.vim b/src/testdir/test_popup.vim index 30cabf9e26..67e600c4c0 100644 --- a/src/testdir/test_popup.vim +++ b/src/testdir/test_popup.vim @@ -1509,9 +1509,9 @@ func Test_pum_extrahl() endif return { \ 'words': [ - \ { 'word': 'aword1', 'menu': 'extra text 1', 'kind': 'W', 'extrahl': 'StrikeFake' }, + \ { 'word': 'aword1', 'menu': 'extra text 1', 'kind': 'W', 'hl_group': 'StrikeFake' }, \ { 'word': 'aword2', 'menu': 'extra text 2', 'kind': 'W', }, - \ { 'word': '你好', 'menu': 'extra text 3', 'kind': 'W', 'extrahl': 'StrikeFake' }, + \ { 'word': '你好', 'menu': 'extra text 3', 'kind': 'W', 'hl_group': 'StrikeFake' }, \]} endfunc set completeopt=menu diff --git a/src/version.c b/src/version.c index fd33dab992..298d577148 100644 --- a/src/version.c +++ b/src/version.c @@ -704,6 +704,8 @@ static char *(features[]) = static int included_patches[] = { /* Add new patch number below this line */ +/**/ + 619, /**/ 618, /**/ From be82825687fcf020dc79667cc1cdf62ace2215f2 Mon Sep 17 00:00:00 2001 From: Ernie Rael Date: Fri, 26 Jul 2024 18:37:02 +0200 Subject: [PATCH 018/186] patch 9.1.0620: Vim9: segfauls with null objects Problem: Vim9: segfauls with null objects (after v9.1.0219) Solution: Check object pointer being NULL (Ernie Rael) fixes: #15338 closes: #15349 Signed-off-by: Ernie Rael Signed-off-by: Yegappan Lakshmanan Signed-off-by: Christian Brabandt --- src/testdir/test_vim9_class.vim | 66 +++++++++++++++++++++++++++++++++ src/typval.c | 26 +++++++++---- src/version.c | 2 + src/vim9execute.c | 60 ++++++++++++++++++++++-------- 4 files changed, 130 insertions(+), 24 deletions(-) diff --git a/src/testdir/test_vim9_class.vim b/src/testdir/test_vim9_class.vim index 4654598465..b2ef0db98e 100644 --- a/src/testdir/test_vim9_class.vim +++ b/src/testdir/test_vim9_class.vim @@ -661,6 +661,31 @@ def Test_object_not_set() Func() END v9.CheckSourceFailure(lines, 'E1363: Incomplete type', 1) + + # Reference a object variable through a null class object which is stored in a + # variable of type "any". + lines =<< trim END + vim9script + + def Z() + var o: any = null_object + o.v = 4 + enddef + Z() + END + v9.CheckSourceFailure(lines, 'E1360: Using a null object', 2) + + # Do "echom" of a null object variable. + lines =<< trim END + vim9script + + def X() + var x = null_object + echom x + enddef + X() + END + v9.CheckSourceFailure(lines, 'E1324: Using an Object as a String', 2) enddef " Null object assignment and comparison @@ -7203,6 +7228,47 @@ def Test_null_object_method_call() T() END v9.CheckSourceFailure(lines, 'E1360: Using a null object', 2) + + # Calling an object method defined in a class that is extended. This differs + # from the previous by invoking ISN_METHODCALL instead of ISN_DCALL. + lines =<< trim END + vim9script + + class C0 + def F() + enddef + endclass + + class C extends C0 + endclass + + def X() + var o: C0 = null_object + o.F() + enddef + X() + END + v9.CheckSourceFailure(lines, 'E1360: Using a null object', 2) + + # Getting a function ref an object method. + lines =<< trim END + vim9script + + class C0 + def F() + enddef + endclass + + class C extends C0 + endclass + + def X() + var o: C0 = null_object + var XXX = o.F + enddef + X() + END + v9.CheckSourceFailure(lines, 'E1360: Using a null object', 2) enddef " Test for using a dict as an object member diff --git a/src/typval.c b/src/typval.c index 67c819f0a4..e50e96af0f 100644 --- a/src/typval.c +++ b/src/typval.c @@ -267,11 +267,16 @@ tv_get_bool_or_number_chk( break; case VAR_OBJECT: { - class_T *cl = varp->vval.v_object->obj_class; - if (cl != NULL && IS_ENUM(cl)) - semsg(_(e_using_enum_str_as_number), cl->class_name); + if (varp->vval.v_object == NULL) + emsg(_(e_using_object_as_string)); else - emsg(_(e_using_object_as_number)); + { + class_T *cl = varp->vval.v_object->obj_class; + if (cl != NULL && IS_ENUM(cl)) + semsg(_(e_using_enum_str_as_number), cl->class_name); + else + emsg(_(e_using_object_as_number)); + } } break; case VAR_VOID: @@ -1146,11 +1151,16 @@ tv_get_string_buf_chk_strict(typval_T *varp, char_u *buf, int strict) break; case VAR_OBJECT: { - class_T *cl = varp->vval.v_object->obj_class; - if (cl != NULL && IS_ENUM(cl)) - semsg(_(e_using_enum_str_as_string), cl->class_name); - else + if (varp->vval.v_object == NULL) emsg(_(e_using_object_as_string)); + else + { + class_T *cl = varp->vval.v_object->obj_class; + if (cl != NULL && IS_ENUM(cl)) + semsg(_(e_using_enum_str_as_string), cl->class_name); + else + emsg(_(e_using_object_as_string)); + } } break; case VAR_JOB: diff --git a/src/version.c b/src/version.c index 298d577148..806e3c542d 100644 --- a/src/version.c +++ b/src/version.c @@ -704,6 +704,8 @@ static char *(features[]) = static int included_patches[] = { /* Add new patch number below this line */ +/**/ + 620, /**/ 619, /**/ diff --git a/src/vim9execute.c b/src/vim9execute.c index 3a3960a8d1..40b549934b 100644 --- a/src/vim9execute.c +++ b/src/vim9execute.c @@ -2254,26 +2254,35 @@ execute_storeindex(isn_T *iptr, ectx_T *ectx) { // Need to get the member index now that the class is known. object_T *obj = tv_dest->vval.v_object; - class_T *cl = obj->obj_class; - char_u *member = tv_idx->vval.v_string; - - int m_idx; - ocmember_T *m = object_member_lookup(cl, member, 0, &m_idx); - if (m != NULL) + if (obj == NULL) { - if (*member == '_') - { - emsg_var_cl_define(e_cannot_access_protected_variable_str, - m->ocm_name, 0, cl); - status = FAIL; - } - - lidx = m_idx; + emsg(_(e_using_null_object)); + status = FAIL; } else { - member_not_found_msg(cl, VAR_OBJECT, member, 0); - status = FAIL; + class_T *cl = obj->obj_class; + char_u *member = tv_idx->vval.v_string; + + int m_idx; + ocmember_T *m = object_member_lookup(cl, member, 0, &m_idx); + if (m != NULL) + { + if (*member == '_') + { + emsg_var_cl_define( + e_cannot_access_protected_variable_str, + m->ocm_name, 0, cl); + status = FAIL; + } + + lidx = m_idx; + } + else + { + member_not_found_msg(cl, VAR_OBJECT, member, 0); + status = FAIL; + } } } else if ((dest_type == VAR_LIST || dest_type == VAR_OBJECT) @@ -3567,7 +3576,10 @@ exec_instructions(ectx_T *ectx) p = tv_get_string_buf(tv, buf); } else + { + SOURCING_LNUM = iptr->isn_lnum; p = tv_stringify(tv, buf); + } len = (int)STRLEN(p); if (GA_GROW_FAILS(&ga, len + 2)) @@ -4380,7 +4392,14 @@ exec_instructions(ectx_T *ectx) object_required_error(tv); goto on_error; } + object_T *obj = tv->vval.v_object; + if (obj == NULL) + { + emsg(_(e_using_null_object)); + goto on_error; + } + class_T *cl = obj->obj_class; // convert the interface index to the object index @@ -4536,12 +4555,21 @@ exec_instructions(ectx_T *ectx) tv = STACK_TV_BOT(-1); if (tv->v_type != VAR_OBJECT) { + SOURCING_LNUM = iptr->isn_lnum; object_required_error(tv); vim_free(pt); goto on_error; } object_T *obj = tv->vval.v_object; + if (obj == NULL) + { + SOURCING_LNUM = iptr->isn_lnum; + emsg(_(e_using_null_object)); + vim_free(pt); + goto on_error; + } + cl = obj->obj_class; // drop the value from the stack clear_tv(tv); From b32d0a479d18512be551a3bca6366796c47d2633 Mon Sep 17 00:00:00 2001 From: Ken Takata Date: Fri, 26 Jul 2024 18:46:54 +0200 Subject: [PATCH 019/186] patch 9.1.0621: MS-Windows: startup code can be improved Problem: MS-Windows: startup code can be improved Solution: Re-work and optimize win32 startup code (Ken Takata) * Revise the code and reduce #ifdefs. * For VIMDLL, stop using the default CRT startup code to reduce the file size. The file size becomes ~130 KB -> ~34 KB on MSVC. * Update comments. Make them consistent between os_w32dll.c and os_w32exe.c. closes: #15352 Signed-off-by: Ken Takata Signed-off-by: Christian Brabandt --- src/Make_cyg_ming.mak | 18 ++++++++++---- src/Make_mvc.mak | 8 +++---- src/os_w32dll.c | 2 +- src/os_w32exe.c | 55 ++++++++++++++++++++++++++++++------------- src/version.c | 2 ++ 5 files changed, 58 insertions(+), 27 deletions(-) diff --git a/src/Make_cyg_ming.mak b/src/Make_cyg_ming.mak index 20ed903567..911adb5ee0 100644 --- a/src/Make_cyg_ming.mak +++ b/src/Make_cyg_ming.mak @@ -995,7 +995,7 @@ VIMDLLBASE := vim32$(DEBUG_SUFFIX) endif TARGET = $(VIMDLLBASE).dll LFLAGS += -shared -EXELFLAGS += -municode +EXELFLAGS += -municode -nostdlib ifneq ($(DEBUG),yes) EXELFLAGS += -s endif @@ -1122,14 +1122,22 @@ $(EXEOBJG): | $(OUTDIR) $(EXEOBJC): | $(OUTDIR) ifeq ($(VIMDLL),yes) + ifeq ($(ARCH),x86-64) +EXEENTRYC = -Wl,--entry=wmainCRTStartup +EXEENTRYG = -Wl,--entry=wWinMainCRTStartup + else ifeq ($(ARCH),i686) +EXEENTRYC = -Wl,--entry=_wmainCRTStartup +EXEENTRYG = -Wl,--entry=_wWinMainCRTStartup@0 + endif + $(TARGET): $(OBJ) $(LINK) $(CFLAGS) $(LFLAGS) -o $@ $(OBJ) $(LIB) -lole32 -luuid -lgdi32 $(LUA_LIB) $(MZSCHEME_LIBDIR) $(MZSCHEME_LIB) $(PYTHONLIB) $(PYTHON3LIB) $(RUBYLIB) $(SODIUMLIB) $(GVIMEXE): $(EXEOBJG) $(VIMDLLBASE).dll - $(CC) -L. $(EXELFLAGS) -mwindows -o $@ $(EXEOBJG) -l$(VIMDLLBASE) + $(CC) -L. $(EXELFLAGS) -mwindows -o $@ $(EXEOBJG) -l$(VIMDLLBASE) $(EXEENTRYG) $(VIMEXE): $(EXEOBJC) $(VIMDLLBASE).dll - $(CC) -L. $(EXELFLAGS) -o $@ $(EXEOBJC) -l$(VIMDLLBASE) + $(CC) -L. $(EXELFLAGS) -o $@ $(EXEOBJC) -l$(VIMDLLBASE) $(EXEENTRYC) else $(TARGET): $(OBJ) $(LINK) $(CFLAGS) $(LFLAGS) -o $@ $(OBJ) $(LIB) -lole32 -luuid $(LUA_LIB) $(MZSCHEME_LIBDIR) $(MZSCHEME_LIB) $(PYTHONLIB) $(PYTHON3LIB) $(RUBYLIB) $(SODIUMLIB) @@ -1330,10 +1338,10 @@ $(OUTDIR)/netbeans.o: netbeans.c $(INCL) $(NBDEBUG_INCL) $(NBDEBUG_SRC) $(CC) -c $(CFLAGS) netbeans.c -o $@ $(OUTDIR)/os_w32exec.o: os_w32exe.c $(INCL) - $(CC) -c $(CFLAGS) -UFEAT_GUI_MSWIN os_w32exe.c -o $@ + $(CC) -c $(CFLAGS) -UFEAT_GUI_MSWIN -DUSE_OWNSTARTUP os_w32exe.c -o $@ $(OUTDIR)/os_w32exeg.o: os_w32exe.c $(INCL) - $(CC) -c $(CFLAGS) os_w32exe.c -o $@ + $(CC) -c $(CFLAGS) -DUSE_OWNSTARTUP os_w32exe.c -o $@ $(OUTDIR)/os_win32.o: os_win32.c $(INCL) $(MZSCHEME_INCL) $(CC) -c $(CFLAGS) os_win32.c -o $@ diff --git a/src/Make_mvc.mak b/src/Make_mvc.mak index adcf19a4e1..c750311d22 100644 --- a/src/Make_mvc.mak +++ b/src/Make_mvc.mak @@ -1302,11 +1302,11 @@ $(NETBEANS_OBJ) $(CHANNEL_OBJ) $(XPM_OBJ) $(OUTDIR)\version.obj $(LINKARGS2) $(GVIM).exe: $(OUTDIR) $(EXEOBJG) $(VIMDLLBASE).dll $(LINK) $(LINKARGS1) /subsystem:$(SUBSYSTEM) -out:$(GVIM).exe \ - $(EXEOBJG) $(VIMDLLBASE).lib $(LIBC) + $(EXEOBJG) $(VIMDLLBASE).lib $(VIM).exe: $(OUTDIR) $(EXEOBJC) $(VIMDLLBASE).dll $(LINK) $(LINKARGS1) /subsystem:$(SUBSYSTEM_CON) -out:$(VIM).exe \ - $(EXEOBJC) $(VIMDLLBASE).lib $(LIBC) + $(EXEOBJC) $(VIMDLLBASE).lib !else @@ -1715,10 +1715,10 @@ $(OUTDIR)/os_w32dll.obj: $(OUTDIR) os_w32dll.c $(OUTDIR)/os_w32exe.obj: $(OUTDIR) os_w32exe.c $(INCL) $(OUTDIR)/os_w32exec.obj: $(OUTDIR) os_w32exe.c $(INCL) - $(CC) $(CFLAGS:-DFEAT_GUI_MSWIN=) /Fo$@ os_w32exe.c + $(CC) $(CFLAGS:-DFEAT_GUI_MSWIN=) /DUSE_OWNSTARTUP /GS- /Fo$@ os_w32exe.c $(OUTDIR)/os_w32exeg.obj: $(OUTDIR) os_w32exe.c $(INCL) - $(CC) $(CFLAGS) /Fo$@ os_w32exe.c + $(CC) $(CFLAGS) /DUSE_OWNSTARTUP /GS- /Fo$@ os_w32exe.c $(OUTDIR)/pathdef.obj: $(OUTDIR) $(PATHDEF_SRC) $(INCL) $(CC) $(CFLAGS_OUTDIR) $(PATHDEF_SRC) diff --git a/src/os_w32dll.c b/src/os_w32dll.c index e7ba99bb95..651f96c978 100644 --- a/src/os_w32dll.c +++ b/src/os_w32dll.c @@ -7,7 +7,7 @@ * See README.txt for an overview of the Vim source code. */ /* - * Windows GUI: main program (DLL) entry point: + * Windows GUI/Console: main program (DLL) entry point: * * Ron Aaron wrote this and the DLL support code. * Adapted by Ken Takata. diff --git a/src/os_w32exe.c b/src/os_w32exe.c index c4f02949db..85bbfbcd21 100644 --- a/src/os_w32exe.c +++ b/src/os_w32exe.c @@ -8,10 +8,10 @@ * See README.txt for an overview of the Vim source code. */ /* - * Windows GUI: main program (EXE) entry point: + * Windows GUI/Console: main program (EXE) entry point: * - * Ron Aaron wrote this and the (now deleted) DLL support - * code. + * Ron Aaron wrote this and the DLL support code. + * Adapted by Ken Takata. */ #include "vim.h" @@ -20,32 +20,53 @@ __declspec(dllimport) #endif int VimMain(int argc, char **argv); -#ifndef VIMDLL + +#ifdef VIMDLL +# define SaveInst(hInst) // Do nothing +#else void SaveInst(HINSTANCE hInst); #endif -#ifndef PROTO -# ifdef FEAT_GUI +#ifdef FEAT_GUI int WINAPI wWinMain( HINSTANCE hInstance, HINSTANCE hPrevInst UNUSED, LPWSTR lpszCmdLine UNUSED, int nCmdShow UNUSED) -# else +{ + SaveInst(hInstance); + return VimMain(0, NULL); +} +#else int wmain(int argc UNUSED, wchar_t **argv UNUSED) -# endif { -# ifndef VIMDLL -# ifdef FEAT_GUI - SaveInst(hInstance); -# else SaveInst(GetModuleHandleW(NULL)); -# endif -# endif - VimMain(0, NULL); - - return 0; + return VimMain(0, NULL); } #endif + +#ifdef USE_OWNSTARTUP +// Use our own entry point and don't use the default CRT startup code to +// reduce the size of (g)vim.exe. This works only when VIMDLL is defined. +// +// For MSVC, the /GS- compiler option is needed to avoid the undefined symbol +// error. (It disables the security check. However, it affects only this +// function and doesn't have any effect on Vim itself.) +// For MinGW, the -nostdlib compiler option and the --entry linker option are +// needed. +# ifdef FEAT_GUI + void WINAPI +wWinMainCRTStartup(void) +{ + VimMain(0, NULL); +} +# else + void +wmainCRTStartup(void) +{ + VimMain(0, NULL); +} +# endif +#endif // USE_OWNSTARTUP diff --git a/src/version.c b/src/version.c index 806e3c542d..a70a978127 100644 --- a/src/version.c +++ b/src/version.c @@ -704,6 +704,8 @@ static char *(features[]) = static int included_patches[] = { /* Add new patch number below this line */ +/**/ + 621, /**/ 620, /**/ From 032accd98b6915b5d642a2d059cc666c2c786579 Mon Sep 17 00:00:00 2001 From: Ken Takata Date: Fri, 26 Jul 2024 18:51:20 +0200 Subject: [PATCH 020/186] patch 9.1.0622: MS-Windows: mingw-build can be optimized Problem: MS-Windows: mingw-build can be optimized Solution: use --gc-sections to reduce the size of the executable (Ken Takata) Use the --gc-sections linker option and the -ffunction-sections compiler option to reduce the size of the executable files. To make these work, the -fno-asynchronous-unwind-tables compiler option is also needed. This is enabled by default and can be disabled by `USE_GC_SECTIONS=no`. Note: A similar feature has been already used in MSVC. (The /OPT linker option.) related: #15350 Signed-off-by: Ken Takata Signed-off-by: Christian Brabandt --- src/Make_cyg_ming.mak | 17 ++++++++++++++++- src/version.c | 2 ++ 2 files changed, 18 insertions(+), 1 deletion(-) diff --git a/src/Make_cyg_ming.mak b/src/Make_cyg_ming.mak index 911adb5ee0..a0c10b1130 100644 --- a/src/Make_cyg_ming.mak +++ b/src/Make_cyg_ming.mak @@ -130,7 +130,6 @@ ifndef STATIC_STDCPLUS STATIC_STDCPLUS=no endif - # Link against the shared version of libwinpthread by default. Set # STATIC_WINPTHREAD to "yes" to link against static version instead. ifndef STATIC_WINPTHREAD @@ -140,6 +139,12 @@ endif # This is used when STATIC_STDCPLUS=yes. HAS_GCC_EH=yes +# Reduce the size of the executables by using the --gc-sections linker +# option. Set USE_GC_SECTIONS to "no" if you see any issues with this. +ifndef USE_GC_SECTIONS +USE_GC_SECTIONS=yes +endif + # If the user doesn't want gettext, undefine it. ifeq (no, $(GETTEXT)) GETTEXT= @@ -1093,6 +1098,16 @@ LIB += -lgcc_eh LIB += -Wl,-Bstatic -lwinpthread -Wl,-Bdynamic endif +# To reduce the file size +ifeq (yes, $(USE_GC_SECTIONS)) +CFLAGS += -ffunction-sections -fno-asynchronous-unwind-tables +CXXFLAGS += -fasynchronous-unwind-tables +LFLAGS += -Wl,--gc-sections + ifeq (yes, $(VIMDLL)) +EXELFLAGS += -Wl,--gc-sections + endif +endif + ifeq (yes, $(MAP)) LFLAGS += -Wl,-Map=$(TARGET).map endif diff --git a/src/version.c b/src/version.c index a70a978127..01aea1f24d 100644 --- a/src/version.c +++ b/src/version.c @@ -704,6 +704,8 @@ static char *(features[]) = static int included_patches[] = { /* Add new patch number below this line */ +/**/ + 622, /**/ 621, /**/ From 325420ebe459e7f67b959ce189269b0e8ca9dc12 Mon Sep 17 00:00:00 2001 From: Ken Takata Date: Fri, 26 Jul 2024 19:02:11 +0200 Subject: [PATCH 021/186] patch 9.1.0623: Mingw: errors when trying to delete non-existing files Problem: Mingw: warnings when trying to delete non-existing files Solution: Use "rm -f" instead of "rm" to suppress errors for non-existing files (Ken Takata) closes: #15350 Signed-off-by: Ken Takata Signed-off-by: Christian Brabandt --- src/GvimExt/Make_ming.mak | 4 ++-- src/Make_cyg_ming.mak | 4 ++-- src/version.c | 2 ++ src/xxd/Make_ming.mak | 2 +- 4 files changed, 7 insertions(+), 5 deletions(-) diff --git a/src/GvimExt/Make_ming.mak b/src/GvimExt/Make_ming.mak index 85017d89f7..06ec7b6dc5 100644 --- a/src/GvimExt/Make_ming.mak +++ b/src/GvimExt/Make_ming.mak @@ -29,7 +29,7 @@ LDFLAGS += -static-libgcc -static-libstdc++ endif ifeq ($(CROSS),yes) -DEL = rm +DEL = rm -f ifeq ($(MINGWOLD),yes) CXXFLAGS := -O2 -fvtable-thunks else @@ -38,7 +38,7 @@ endif else CXXFLAGS := -O2 ifneq (sh.exe, $(SHELL)) -DEL = rm +DEL = rm -f else DEL = del endif diff --git a/src/Make_cyg_ming.mak b/src/Make_cyg_ming.mak index a0c10b1130..bd9d0ac945 100644 --- a/src/Make_cyg_ming.mak +++ b/src/Make_cyg_ming.mak @@ -184,7 +184,7 @@ ifeq ($(CROSS),yes) ifndef CROSS_COMPILE CROSS_COMPILE = i586-pc-mingw32msvc- endif -DEL = rm +DEL = rm -f MKDIR = mkdir -p DIRSLASH = / else @@ -212,7 +212,7 @@ CROSS_COMPILE = # In this case, unix-like commands can be used. # ifneq (sh.exe, $(SHELL)) -DEL = rm +DEL = rm -f MKDIR = mkdir -p DIRSLASH = / else diff --git a/src/version.c b/src/version.c index 01aea1f24d..e16ad291a4 100644 --- a/src/version.c +++ b/src/version.c @@ -704,6 +704,8 @@ static char *(features[]) = static int included_patches[] = { /* Add new patch number below this line */ +/**/ + 623, /**/ 622, /**/ diff --git a/src/xxd/Make_ming.mak b/src/xxd/Make_ming.mak index 2d32261314..e621e67841 100644 --- a/src/xxd/Make_ming.mak +++ b/src/xxd/Make_ming.mak @@ -16,7 +16,7 @@ CC = gcc CFLAGS = -O2 -Wall -DWIN32 $(DEFINES) ifneq (sh.exe, $(SHELL)) -DEL = rm +DEL = rm -f else DEL = del endif From 70a11a6bf69f477844470ce59958b686024d2a41 Mon Sep 17 00:00:00 2001 From: Christian Brabandt Date: Fri, 26 Jul 2024 19:13:55 +0200 Subject: [PATCH 022/186] patch 9.1.0624: ex command modifiers not found Problem: ex command modifiers are not found (Ingo Karkat, after v9.1.0352) Solution: partly revert patch v9.1.0352, ignore :{ and :} when expanding ex commands The issue is, that the :keepmarks command can be abbreviated to :kee or :keep or :keepm but not to e.g. :ke (because that would be the :exe command :k with register e). This basically means, we need `:kee` sorted before `:keepalt` but at the same time `:keepmarks` sorted after the `:keepalt` command in the cmdmod_info_tab table. Due to this, the binary search may not work correctly, so let's revert that part of patch v9.1.0352. fixes: #15305 closes: #15336 Signed-off-by: Christian Brabandt --- src/ex_docmd.c | 81 +++++++++--------------------------- src/testdir/test_cmdline.vim | 21 ++++++++++ src/version.c | 2 + 3 files changed, 43 insertions(+), 61 deletions(-) diff --git a/src/ex_docmd.c b/src/ex_docmd.c index e6200ed706..2a59301548 100644 --- a/src/ex_docmd.c +++ b/src/ex_docmd.c @@ -19,10 +19,6 @@ static int ex_pressedreturn = FALSE; # define ex_hardcopy ex_ni #endif -#if defined(FEAT_EVAL) || defined(PROTO) -static int cmp_cmdmod_info(const void *a, const void *b); -#endif - #ifdef FEAT_EVAL static char_u *do_one_cmd(char_u **, int, cstack_T *, char_u *(*fgetline)(int, void *, int, getline_opt_T), void *cookie); #else @@ -4050,16 +4046,6 @@ static cmdmod_info_T cmdmod_info_tab[] = { {"vim9cmd", 4, FALSE} }; // cmdmod_info_tab -// compare two cmdmod_info_T structs by case sensitive name with length - static int -cmp_cmdmod_info(const void *a, const void *b) -{ - cmdmod_info_T *cm1 = (cmdmod_info_T *)a; - cmdmod_info_T *cm2 = (cmdmod_info_T *)b; - - return STRNCMP(cm1->name, cm2->name, cm2->minlen); -} - /* * Return length of a command modifier (including optional count). * Return zero when it's not a modifier. @@ -4067,36 +4053,20 @@ cmp_cmdmod_info(const void *a, const void *b) int modifier_len(char_u *cmd) { + int i, j; char_u *p = cmd; - cmdmod_info_T target; - cmdmod_info_T *entry; if (VIM_ISDIGIT(*cmd)) p = skipwhite(skipdigits(cmd + 1)); - - // only lowercase characters can match - if (!ASCII_ISLOWER(*p)) - return 0; - - target.name = (char *)p; - target.minlen = 0; // not used, see cmp_cmdmod_info() - target.has_count = FALSE; - - entry = (cmdmod_info_T *)bsearch(&target, &cmdmod_info_tab, ARRAY_LENGTH(cmdmod_info_tab), sizeof(cmdmod_info_tab[0]), cmp_cmdmod_info); - if (entry != NULL) + for (i = 0; i < (int)ARRAY_LENGTH(cmdmod_info_tab); ++i) { - int i; - - for (i = entry->minlen; p[i] != NUL; ++i) - { - if (p[i] != entry->name[i]) + for (j = 0; p[j] != NUL; ++j) + if (p[j] != cmdmod_info_tab[i].name[j]) break; - } - - if (!ASCII_ISALPHA(p[i]) && i >= entry->minlen && (p == cmd || entry->has_count)) - return i + (int)(p - cmd); + if (!ASCII_ISALPHA(p[j]) && j >= cmdmod_info_tab[i].minlen + && (p == cmd || cmdmod_info_tab[i].has_count)) + return j + (int)(p - cmd); } - return 0; } @@ -4110,33 +4080,18 @@ cmd_exists(char_u *name) { exarg_T ea; int full = FALSE; + int i; + int j; char_u *p; - // only lowercase characters can match - if (ASCII_ISLOWER(*name)) + // Check command modifiers. + for (i = 0; i < (int)ARRAY_LENGTH(cmdmod_info_tab); ++i) { - cmdmod_info_T target; - cmdmod_info_T *entry; - - target.name = (char *)name; - target.minlen = 0; // not used, see cmp_cmdmod_info() - target.has_count = FALSE; - - // Check command modifiers. - entry = (cmdmod_info_T *)bsearch(&target, &cmdmod_info_tab, ARRAY_LENGTH(cmdmod_info_tab), sizeof(cmdmod_info_tab[0]), cmp_cmdmod_info); - if (entry != NULL) - { - int i; - - for (i = entry->minlen; name[i] != NUL; ++i) - { - if (name[i] != entry->name[i]) - break; - } - - if (name[i] == NUL && i >= entry->minlen) - return (entry->name[i] == NUL ? 2 : 1); - } + for (j = 0; name[j] != NUL; ++j) + if (name[j] != cmdmod_info_tab[i].name[j]) + break; + if (name[j] == NUL && j >= cmdmod_info_tab[i].minlen) + return (cmdmod_info_tab[i].name[j] == NUL ? 2 : 1); } // Check built-in commands and user defined commands. @@ -5993,6 +5948,10 @@ get_command_name(expand_T *xp UNUSED, int idx) { if (idx >= (int)CMD_SIZE) return expand_user_command_name(idx); + // the following are no real commands + if (STRNCMP(cmdnames[idx].cmd_name, "{", 1) == 0 || + STRNCMP(cmdnames[idx].cmd_name, "}", 1) == 0) + return (char_u *)""; return cmdnames[idx].cmd_name; } diff --git a/src/testdir/test_cmdline.vim b/src/testdir/test_cmdline.vim index f83d673346..3f6918a8cd 100644 --- a/src/testdir/test_cmdline.vim +++ b/src/testdir/test_cmdline.vim @@ -3870,4 +3870,25 @@ func Test_term_option() let &cpo = _cpo endfunc +func Test_ex_command_completion() + " required for :* + set cpo+=* + let list = filter(getcompletion('', 'command'), 'exists(":" . v:val) == 0') + " :++ and :-- are only valid in Vim9 Script context, so they can be ignored + call assert_equal(['++', '--'], sort(list)) + call assert_equal(1, exists(':k')) + call assert_equal(0, exists(':ke')) + call assert_equal(1, exists(':kee')) + call assert_equal(1, exists(':keep')) + call assert_equal(1, exists(':keepm')) + call assert_equal(1, exists(':keepma')) + call assert_equal(1, exists(':keepmar')) + call assert_equal(1, exists(':keepmark')) + call assert_equal(2, exists(':keepmarks')) + call assert_equal(2, exists(':keepalt')) + call assert_equal(2, exists(':keepjumps')) + call assert_equal(2, exists(':keeppatterns')) + set cpo-=* +endfunc + " vim: shiftwidth=2 sts=2 expandtab diff --git a/src/version.c b/src/version.c index e16ad291a4..0dadd19b10 100644 --- a/src/version.c +++ b/src/version.c @@ -704,6 +704,8 @@ static char *(features[]) = static int included_patches[] = { /* Add new patch number below this line */ +/**/ + 624, /**/ 623, /**/ From 6ed8ae837b9c19985c4291c885544f3f2f624154 Mon Sep 17 00:00:00 2001 From: Christian Brabandt Date: Fri, 26 Jul 2024 19:21:03 +0200 Subject: [PATCH 023/186] patch 9.1.0625: tests: test output all translated messages for all translations Problem: tests: test output all translated messages for all translations Solution: Redirect the output of check.vim to /dev/null, it's not that useful. closes: #15354 Signed-off-by: Christian Brabandt --- src/po/Makefile | 2 +- src/version.c | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/src/po/Makefile b/src/po/Makefile index f23c6d66f4..df9a0405c6 100644 --- a/src/po/Makefile +++ b/src/po/Makefile @@ -41,7 +41,7 @@ converted: $(MOCONVERTED) .po.ck: $(VIMPROG) -u NONE --noplugins -e -s -X --cmd "set enc=utf-8" \ - -S check.vim -c "if error == 0 | q | else | num 2 | cq | endif" $< + -S check.vim -c "if error == 0 | q | else | num 2 | cq | endif" $< >/dev/null touch $@ check: $(CHECKFILES) diff --git a/src/version.c b/src/version.c index 0dadd19b10..a7b25391f2 100644 --- a/src/version.c +++ b/src/version.c @@ -704,6 +704,8 @@ static char *(features[]) = static int included_patches[] = { /* Add new patch number below this line */ +/**/ + 625, /**/ 624, /**/ From a7295ae7f5b956758f1c9c9a29d10c48661b29bc Mon Sep 17 00:00:00 2001 From: Peter Aronoff Date: Fri, 26 Jul 2024 19:24:33 +0200 Subject: [PATCH 024/186] runtime(autohotkey): include initial filetype plugin closes: #15345 Signed-off-by: Peter Aronoff Signed-off-by: Doug Kearns Signed-off-by: Christian Brabandt --- .github/MAINTAINERS | 1 + runtime/ftplugin/autohotkey.vim | 16 ++++++++++++++++ 2 files changed, 17 insertions(+) create mode 100644 runtime/ftplugin/autohotkey.vim diff --git a/.github/MAINTAINERS b/.github/MAINTAINERS index 0c5c3d6272..47a1751702 100644 --- a/.github/MAINTAINERS +++ b/.github/MAINTAINERS @@ -114,6 +114,7 @@ runtime/ftplugin/apache.vim @dubgeiser runtime/ftplugin/arduino.vim @k-takata runtime/ftplugin/astro.vim @romainl runtime/ftplugin/asy.vim @avidseeker +runtime/ftplugin/autohotkey.vim @telemachus runtime/ftplugin/awk.vim @dkearns runtime/ftplugin/basic.vim @dkearns runtime/ftplugin/bst.vim @tpope diff --git a/runtime/ftplugin/autohotkey.vim b/runtime/ftplugin/autohotkey.vim new file mode 100644 index 0000000000..9cb4fd7fdf --- /dev/null +++ b/runtime/ftplugin/autohotkey.vim @@ -0,0 +1,16 @@ +" Vim filetype plugin file +" Language: AutoHotkey +" Maintainer: Peter Aronoff +" Last Changed: 2024 Jul 25 + +if exists("b:did_ftplugin") + finish +endif +let b:did_ftplugin = 1 + +setlocal comments=:; +setlocal commentstring=;\ %s + +let b:undo_ftplugin = "setlocal comments< commentstring<" + +" vim: nowrap sw=2 sts=2 ts=8 noet: From 94082b60d5087246b19615d9b7d46e377c4eb766 Mon Sep 17 00:00:00 2001 From: Ernie Rael Date: Fri, 26 Jul 2024 19:40:29 +0200 Subject: [PATCH 025/186] patch 9.1.0626: Vim9: need more tests with null objects Problem: Vim9: need more tests with null objects (after v9.1.0620) Solution: add one more test with null_object (Ernie Rael) closes: #15360 Signed-off-by: Ernie Rael Signed-off-by: Christian Brabandt --- src/testdir/test_vim9_class.vim | 13 +++++++++++++ src/version.c | 2 ++ 2 files changed, 15 insertions(+) diff --git a/src/testdir/test_vim9_class.vim b/src/testdir/test_vim9_class.vim index b2ef0db98e..56c7b99d94 100644 --- a/src/testdir/test_vim9_class.vim +++ b/src/testdir/test_vim9_class.vim @@ -686,6 +686,19 @@ def Test_object_not_set() X() END v9.CheckSourceFailure(lines, 'E1324: Using an Object as a String', 2) + + # Use a null object variable that vim wants to force to number. + lines =<< trim END + vim9script + + def X() + var o = null_object + var l = [ 1, o] + sort(l, 'N') + enddef + X() + END + v9.CheckSourceFailure(lines, 'E1324: Using an Object as a String', 3) enddef " Null object assignment and comparison diff --git a/src/version.c b/src/version.c index a7b25391f2..54fda947b7 100644 --- a/src/version.c +++ b/src/version.c @@ -704,6 +704,8 @@ static char *(features[]) = static int included_patches[] = { /* Add new patch number below this line */ +/**/ + 626, /**/ 625, /**/ From e4486bad10dc605e2c996c9ef2f7656c01c7eb33 Mon Sep 17 00:00:00 2001 From: Ken Takata Date: Sat, 27 Jul 2024 13:11:27 +0200 Subject: [PATCH 026/186] patch 9.1.0627: MinGW: build-error when COVERAGE is enabled Problem: MinGW: build-error when COVERAGE is enabled (after v9.1.0621) Solution: Fix regressions in v9.1.0621 and v9.1.0622 (Ken Takata) * Fix build error when COVERAGE=yes. * Fix if_lua with USE_GC_SECTIONS=yes. related: #15361 Signed-off-by: Ken Takata Signed-off-by: Christian Brabandt --- src/Make_cyg_ming.mak | 18 +++++++++++++----- src/version.c | 2 ++ 2 files changed, 15 insertions(+), 5 deletions(-) diff --git a/src/Make_cyg_ming.mak b/src/Make_cyg_ming.mak index bd9d0ac945..5fb3a41f08 100644 --- a/src/Make_cyg_ming.mak +++ b/src/Make_cyg_ming.mak @@ -1000,12 +1000,15 @@ VIMDLLBASE := vim32$(DEBUG_SUFFIX) endif TARGET = $(VIMDLLBASE).dll LFLAGS += -shared -EXELFLAGS += -municode -nostdlib +EXELFLAGS += -municode ifneq ($(DEBUG),yes) EXELFLAGS += -s endif ifeq ($(COVERAGE),yes) EXELFLAGS += --coverage + else +EXELFLAGS += -nostdlib +EXECFLAGS = -DUSE_OWNSTARTUP endif DEFINES += $(DEF_GUI) -DVIMDLL OBJ += $(GUIOBJ) $(CUIOBJ) @@ -1137,12 +1140,14 @@ $(EXEOBJG): | $(OUTDIR) $(EXEOBJC): | $(OUTDIR) ifeq ($(VIMDLL),yes) - ifeq ($(ARCH),x86-64) + ifneq ($(COVERAGE),yes) + ifeq ($(ARCH),x86-64) EXEENTRYC = -Wl,--entry=wmainCRTStartup EXEENTRYG = -Wl,--entry=wWinMainCRTStartup - else ifeq ($(ARCH),i686) + else ifeq ($(ARCH),i686) EXEENTRYC = -Wl,--entry=_wmainCRTStartup EXEENTRYG = -Wl,--entry=_wWinMainCRTStartup@0 + endif endif $(TARGET): $(OBJ) @@ -1320,6 +1325,9 @@ $(OUTDIR)/gui_w32.o: gui_w32.c $(INCL) $(GUI_INCL) version.h $(OUTDIR)/if_cscope.o: if_cscope.c $(INCL) $(CC) -c $(CFLAGS) if_cscope.c -o $@ +$(OUTDIR)/if_lua.o: if_lua.c $(INCL) + $(CC) -c $(CFLAGS:-fno-asynchronous-unwind-tables=) if_lua.c -o $@ + $(OUTDIR)/if_mzsch.o: if_mzsch.c $(INCL) $(MZSCHEME_INCL) $(MZ_EXTRA_DEP) $(CC) -c $(CFLAGS) if_mzsch.c -o $@ @@ -1353,10 +1361,10 @@ $(OUTDIR)/netbeans.o: netbeans.c $(INCL) $(NBDEBUG_INCL) $(NBDEBUG_SRC) $(CC) -c $(CFLAGS) netbeans.c -o $@ $(OUTDIR)/os_w32exec.o: os_w32exe.c $(INCL) - $(CC) -c $(CFLAGS) -UFEAT_GUI_MSWIN -DUSE_OWNSTARTUP os_w32exe.c -o $@ + $(CC) -c $(CFLAGS) -UFEAT_GUI_MSWIN $(EXECFLAGS) os_w32exe.c -o $@ $(OUTDIR)/os_w32exeg.o: os_w32exe.c $(INCL) - $(CC) -c $(CFLAGS) -DUSE_OWNSTARTUP os_w32exe.c -o $@ + $(CC) -c $(CFLAGS) $(EXECFLAGS) os_w32exe.c -o $@ $(OUTDIR)/os_win32.o: os_win32.c $(INCL) $(MZSCHEME_INCL) $(CC) -c $(CFLAGS) os_win32.c -o $@ diff --git a/src/version.c b/src/version.c index 54fda947b7..d6f8085628 100644 --- a/src/version.c +++ b/src/version.c @@ -704,6 +704,8 @@ static char *(features[]) = static int included_patches[] = { /* Add new patch number below this line */ +/**/ + 627, /**/ 626, /**/ From f08865ce8309a7d4c7d55d5d9d60b9062eca5370 Mon Sep 17 00:00:00 2001 From: Ken Takata Date: Sat, 27 Jul 2024 13:14:35 +0200 Subject: [PATCH 027/186] patch 9.1.0628: MinGW: coverage files are not cleaned up Problem: MinGW: coverage files are not cleaned up Solution: Adjust clean rule to remove the coverage files (Ken Takata) closes: #15361 Signed-off-by: Ken Takata Signed-off-by: Christian Brabandt --- src/Make_cyg_ming.mak | 3 +++ src/version.c | 2 ++ 2 files changed, 5 insertions(+) diff --git a/src/Make_cyg_ming.mak b/src/Make_cyg_ming.mak index 5fb3a41f08..f082c960d8 100644 --- a/src/Make_cyg_ming.mak +++ b/src/Make_cyg_ming.mak @@ -1188,10 +1188,13 @@ notags: clean: -$(DEL) $(OUTDIR)$(DIRSLASH)*.o + -$(DEL) $(OUTDIR)$(DIRSLASH)*.gcno + -$(DEL) $(OUTDIR)$(DIRSLASH)*.gcda -$(DEL) $(OUTDIR)$(DIRSLASH)*.res -$(DEL) $(OUTDIR)$(DIRSLASH)pathdef.c -rmdir $(OUTDIR) -$(DEL) $(MAIN_TARGET) vimrun.exe install.exe uninstall.exe + -$(DEL) *.gcno *.gcda -$(DEL) *.map ifdef PERL -$(DEL) if_perl.c diff --git a/src/version.c b/src/version.c index d6f8085628..f2b7a19f36 100644 --- a/src/version.c +++ b/src/version.c @@ -704,6 +704,8 @@ static char *(features[]) = static int included_patches[] = { /* Add new patch number below this line */ +/**/ + 628, /**/ 627, /**/ From 4100852e099133a0c9603e1087e5dc6d82001ce7 Mon Sep 17 00:00:00 2001 From: zeertzjq Date: Sat, 27 Jul 2024 13:21:49 +0200 Subject: [PATCH 028/186] patch 9.1.0629: Rename of pum hl_group is incomplete Problem: Rename of pum hl_group is incomplete in source. Solution: Also rename the test function. Rename to user_hlattr in code to avoid confusion with pum_extra. Add test with matched text highlighting (zeertzjq). closes: #15348 Signed-off-by: zeertzjq Signed-off-by: Christian Brabandt --- runtime/doc/insert.txt | 14 +++++------ src/cmdexpand.c | 2 +- src/insexpand.c | 22 ++++++++-------- src/popupmenu.c | 14 +++++------ src/structs.h | 2 +- src/testdir/dumps/Test_pum_highlights_13.dump | 20 +++++++++++++++ src/testdir/dumps/Test_pum_highlights_14.dump | 20 +++++++++++++++ src/testdir/test_popup.vim | 25 +++++++++++++++---- src/version.c | 2 ++ 9 files changed, 89 insertions(+), 32 deletions(-) create mode 100644 src/testdir/dumps/Test_pum_highlights_13.dump create mode 100644 src/testdir/dumps/Test_pum_highlights_14.dump diff --git a/runtime/doc/insert.txt b/runtime/doc/insert.txt index e85f341c8f..e80fea8c2b 100644 --- a/runtime/doc/insert.txt +++ b/runtime/doc/insert.txt @@ -1,4 +1,4 @@ -*insert.txt* For Vim version 9.1. Last change: 2024 Jul 25 +*insert.txt* For Vim version 9.1. Last change: 2024 Jul 27 VIM REFERENCE MANUAL by Bram Moolenaar @@ -1183,12 +1183,12 @@ items: user_data custom data which is associated with the item and available in |v:completed_item|; it can be any type; defaults to an empty string - hl_group allows specifying an additional highlight group to - apply extra attributes to completion items in the - popupmenu. Is combined with |hl-PmenuSel| and - |hl-Pmenu| highlighting attributes to apply cterm and - gui properties, such as strikethrough to the - completion items. + hl_group an additional highlight group whose attributes are + combined with |hl-PmenuSel| and |hl-Pmenu| or + |hl-PmenuMatchSel| and |hl-PmenuMatch| highlight + attributes in the popup menu to apply cterm and gui + properties (with higher priority) like strikethrough + to the completion items All of these except "icase", "equal", "dup" and "empty" must be a string. If an item does not meet these requirements then an error message is given and diff --git a/src/cmdexpand.c b/src/cmdexpand.c index a33d6bede1..c1ed03b78c 100644 --- a/src/cmdexpand.c +++ b/src/cmdexpand.c @@ -359,7 +359,7 @@ cmdline_pum_create( compl_match_array[i].pum_info = NULL; compl_match_array[i].pum_extra = NULL; compl_match_array[i].pum_kind = NULL; - compl_match_array[i].pum_extrahlattr = -1; + compl_match_array[i].pum_user_hlattr = -1; } // Compute the popup menu starting column diff --git a/src/insexpand.c b/src/insexpand.c index 02d29704bc..7a5298f026 100644 --- a/src/insexpand.c +++ b/src/insexpand.c @@ -114,7 +114,7 @@ struct compl_S int cp_flags; // CP_ values int cp_number; // sequence number int cp_score; // fuzzy match score - int cp_extrahlattr; // extra highlight group attr + int cp_user_hlattr; // highlight attribute to combine with }; // values for cp_flags @@ -206,7 +206,7 @@ static int compl_selected_item = -1; static int *compl_fuzzy_scores; -static int ins_compl_add(char_u *str, int len, char_u *fname, char_u **cptext, typval_T *user_data, int cdir, int flags, int adup, int extrahl); +static int ins_compl_add(char_u *str, int len, char_u *fname, char_u **cptext, typval_T *user_data, int cdir, int flags, int adup, int user_hlattr); static void ins_compl_longest_match(compl_T *match); static void ins_compl_del_pum(void); static void ins_compl_files(int count, char_u **files, int thesaurus, int flags, regmatch_T *regmatch, char_u *buf, int *dir); @@ -780,7 +780,7 @@ ins_compl_add( int cdir, int flags_arg, int adup, // accept duplicate match - int extra_hlattr) + int user_hlattr) { compl_T *match; int dir = (cdir == 0 ? compl_direction : cdir); @@ -844,7 +844,7 @@ ins_compl_add( else match->cp_fname = NULL; match->cp_flags = flags; - match->cp_extrahlattr = extra_hlattr; + match->cp_user_hlattr = user_hlattr; if (cptext != NULL) { @@ -1341,7 +1341,7 @@ ins_compl_build_pum(void) compl_match_array[i].pum_kind = compl->cp_text[CPT_KIND]; compl_match_array[i].pum_info = compl->cp_text[CPT_INFO]; compl_match_array[i].pum_score = compl->cp_score; - compl_match_array[i].pum_extrahlattr = compl->cp_extrahlattr; + compl_match_array[i].pum_user_hlattr = compl->cp_user_hlattr; if (compl->cp_text[CPT_MENU] != NULL) compl_match_array[i++].pum_extra = compl->cp_text[CPT_MENU]; @@ -2860,8 +2860,8 @@ ins_compl_add_tv(typval_T *tv, int dir, int fast) char_u *(cptext[CPT_COUNT]); typval_T user_data; int status; - char_u *extra_hlname; - int extra_hlattr = -1; + char_u *user_hlname; + int user_hlattr = -1; user_data.v_type = VAR_UNKNOWN; if (tv->v_type == VAR_DICT && tv->vval.v_dict != NULL) @@ -2871,9 +2871,9 @@ ins_compl_add_tv(typval_T *tv, int dir, int fast) cptext[CPT_MENU] = dict_get_string(tv->vval.v_dict, "menu", FALSE); cptext[CPT_KIND] = dict_get_string(tv->vval.v_dict, "kind", FALSE); cptext[CPT_INFO] = dict_get_string(tv->vval.v_dict, "info", FALSE); - extra_hlname = dict_get_string(tv->vval.v_dict, "hl_group", FALSE); - if (extra_hlname != NULL && *extra_hlname != NUL) - extra_hlattr = syn_name2attr(extra_hlname); + user_hlname = dict_get_string(tv->vval.v_dict, "hl_group", FALSE); + if (user_hlname != NULL && *user_hlname != NUL) + user_hlattr = syn_name2attr(user_hlname); dict_get_tv(tv->vval.v_dict, "user_data", &user_data); if (dict_get_string(tv->vval.v_dict, "icase", FALSE) != NULL @@ -2898,7 +2898,7 @@ ins_compl_add_tv(typval_T *tv, int dir, int fast) return FAIL; } status = ins_compl_add(word, -1, NULL, cptext, - &user_data, dir, flags, dup, extra_hlattr); + &user_data, dir, flags, dup, user_hlattr); if (status != OK) clear_tv(&user_data); return status; diff --git a/src/popupmenu.c b/src/popupmenu.c index b6bc1dc45d..4bc01a586a 100644 --- a/src/popupmenu.c +++ b/src/popupmenu.c @@ -425,7 +425,7 @@ pum_under_menu(int row, int col, int only_redrawing) * Returns attributes for every cell, or NULL if all attributes are the same. */ static int * -pum_compute_text_attrs(char_u *text, hlf_T hlf, int extra_hlattr) +pum_compute_text_attrs(char_u *text, hlf_T hlf, int user_hlattr) { int i; size_t leader_len; @@ -483,8 +483,8 @@ pum_compute_text_attrs(char_u *text, hlf_T hlf, int extra_hlattr) else if (matched_start && ptr < text + leader_len) new_attr = highlight_attr[hlf == HLF_PSI ? HLF_PMSI : HLF_PMNI]; - if (extra_hlattr > 0) - new_attr = hl_combine_attr(new_attr, extra_hlattr); + if (user_hlattr > 0) + new_attr = hl_combine_attr(new_attr, user_hlattr); char_cells = mb_ptr2cells(ptr); for (i = 0; i < char_cells; i++) @@ -631,8 +631,8 @@ pum_redraw(void) { hlf = hlfs[round]; attr = highlight_attr[hlf]; - if (pum_array[idx].pum_extrahlattr > 0) - attr = hl_combine_attr(attr, pum_array[idx].pum_extrahlattr); + if (pum_array[idx].pum_user_hlattr > 0) + attr = hl_combine_attr(attr, pum_array[idx].pum_user_hlattr); width = 0; s = NULL; switch (round) @@ -661,8 +661,8 @@ pum_redraw(void) if (saved != NUL) *p = saved; - int extra_hlattr = pum_array[idx].pum_extrahlattr; - attrs = pum_compute_text_attrs(st, hlf, extra_hlattr); + int user_hlattr = pum_array[idx].pum_user_hlattr; + attrs = pum_compute_text_attrs(st, hlf, user_hlattr); #ifdef FEAT_RIGHTLEFT if (pum_rl) diff --git a/src/structs.h b/src/structs.h index 2e8efa89d4..32c35b7bf5 100644 --- a/src/structs.h +++ b/src/structs.h @@ -4472,7 +4472,7 @@ typedef struct char_u *pum_info; // extra info int pum_score; // fuzzy match score int pum_idx; // index of item before sorting by score - int pum_extrahlattr; // extra highlight group attr for combine + int pum_user_hlattr; // highlight attribute to combine with } pumitem_T; /* diff --git a/src/testdir/dumps/Test_pum_highlights_13.dump b/src/testdir/dumps/Test_pum_highlights_13.dump new file mode 100644 index 0000000000..34fde12ba8 --- /dev/null +++ b/src/testdir/dumps/Test_pum_highlights_13.dump @@ -0,0 +1,20 @@ +|a+0&#ffffff0|w|o|r|d|1> @68 +|a+8#ff404010#e0e0e08|w|o+0&&|r|d|1| |W| |e|x|t|r|a| |t|e|x|t| |1| | +0#4040ff13#ffffff0@52 +|a+8#0000e05#ffd7ff255|w|o+0#0000001&|r|d|2| |W| |e|x|t|r|a| |t|e|x|t| |2| | +0#4040ff13#ffffff0@52 +|你*0#ff404010#ffd7ff255|好| +&@2|W| |e|x|t|r|a| |t|e|x|t| |3| | +0#4040ff13#ffffff0@52 +|~| @73 +|~| @73 +|~| @73 +|~| @73 +|~| @73 +|~| @73 +|~| @73 +|~| @73 +|~| @73 +|~| @73 +|~| @73 +|~| @73 +|~| @73 +|~| @73 +|~| @73 +|-+2#0000000&@1| |U|s|e|r| |d|e|f|i|n|e|d| |c|o|m|p|l|e|t|i|o|n| |(|^|U|^|N|^|P|)| |m+0#00e0003&|a|t|c|h| |1| |o|f| |3| +0#0000000&@26 diff --git a/src/testdir/dumps/Test_pum_highlights_14.dump b/src/testdir/dumps/Test_pum_highlights_14.dump new file mode 100644 index 0000000000..f35b4cbf01 --- /dev/null +++ b/src/testdir/dumps/Test_pum_highlights_14.dump @@ -0,0 +1,20 @@ +|a+0&#ffffff0|w|o|r|d|2> @68 +|a+8#ff404010#ffd7ff255|w|o+0&&|r|d|1| |W| |e|x|t|r|a| |t|e|x|t| |1| | +0#4040ff13#ffffff0@52 +|a+8#00e0e07#e0e0e08|w|o+0#0000001&|r|d|2| |W| |e|x|t|r|a| |t|e|x|t| |2| | +0#4040ff13#ffffff0@52 +|你*0#ff404010#ffd7ff255|好| +&@2|W| |e|x|t|r|a| |t|e|x|t| |3| | +0#4040ff13#ffffff0@52 +|~| @73 +|~| @73 +|~| @73 +|~| @73 +|~| @73 +|~| @73 +|~| @73 +|~| @73 +|~| @73 +|~| @73 +|~| @73 +|~| @73 +|~| @73 +|~| @73 +|~| @73 +|-+2#0000000&@1| |U|s|e|r| |d|e|f|i|n|e|d| |c|o|m|p|l|e|t|i|o|n| |(|^|U|^|N|^|P|)| |m+0#00e0003&|a|t|c|h| |2| |o|f| |3| +0#0000000&@26 diff --git a/src/testdir/test_popup.vim b/src/testdir/test_popup.vim index 67e600c4c0..4c2fb4542f 100644 --- a/src/testdir/test_popup.vim +++ b/src/testdir/test_popup.vim @@ -1499,10 +1499,9 @@ func Test_pum_highlights_match() call StopVimInTerminal(buf) endfunc -func Test_pum_extrahl() +func Test_pum_user_hl_group() CheckScreendump let lines =<< trim END - hi StrikeFake ctermfg=9 func CompleteFunc( findstart, base ) if a:findstart return 0 @@ -1516,15 +1515,31 @@ func Test_pum_extrahl() endfunc set completeopt=menu set completefunc=CompleteFunc + + hi StrikeFake ctermfg=9 + func HlMatch() + hi PmenuMatchSel ctermfg=6 ctermbg=7 cterm=underline + hi PmenuMatch ctermfg=4 ctermbg=225 cterm=underline + endfunc END call writefile(lines, 'Xscript', 'D') let buf = RunVimInTerminal('-S Xscript', {}) + call TermWait(buf) - call term_sendkeys(buf, "iaw\\") - call TermWait(buf, 50) + call term_sendkeys(buf, "Saw\\") call VerifyScreenDump(buf, 'Test_pum_highlights_12', {}) - call term_sendkeys(buf, "\\u") + call term_sendkeys(buf, "\\") + call TermWait(buf) + call term_sendkeys(buf, ":call HlMatch()\") + + call TermWait(buf) + call term_sendkeys(buf, "Saw\\") + call VerifyScreenDump(buf, 'Test_pum_highlights_13', {}) + call term_sendkeys(buf, "\") + call VerifyScreenDump(buf, 'Test_pum_highlights_14', {}) + call term_sendkeys(buf, "\\") + call StopVimInTerminal(buf) endfunc diff --git a/src/version.c b/src/version.c index f2b7a19f36..a7b5405e43 100644 --- a/src/version.c +++ b/src/version.c @@ -704,6 +704,8 @@ static char *(features[]) = static int included_patches[] = { /* Add new patch number below this line */ +/**/ + 629, /**/ 628, /**/ From f0ce176b5ff631cbc4d149e9f6ba03e78a9bf2a6 Mon Sep 17 00:00:00 2001 From: Ken Takata Date: Sat, 27 Jul 2024 13:25:34 +0200 Subject: [PATCH 029/186] patch 9.1.0630: MS-Windows: build fails with VIMDLL and mzscheme Problem: MS-Windows: build fails with VIMDLL and mzscheme Solution: define scheme_register_tls_space() inside gvim.exe and refer to it from the dll (Ken Takata). `scheme_register_tls_space()` doesn't support a thread-local variable in a DLL: https://docs.racket-lang.org/inside/im_memoryalloc.html#%28cpp._scheme_register_tls_space%29 closes: #15363 Signed-off-by: Ken Takata Signed-off-by: Christian Brabandt --- src/Make_cyg_ming.mak | 8 +++++--- src/Make_mvc.mak | 19 +++++++++++++++---- src/if_mzsch.c | 21 +++++++++++++++++++-- src/os_w32exe.c | 21 +++++++++++++++++++++ src/version.c | 2 ++ 5 files changed, 62 insertions(+), 9 deletions(-) diff --git a/src/Make_cyg_ming.mak b/src/Make_cyg_ming.mak index f082c960d8..7c324fb64f 100644 --- a/src/Make_cyg_ming.mak +++ b/src/Make_cyg_ming.mak @@ -1006,7 +1006,7 @@ EXELFLAGS += -s endif ifeq ($(COVERAGE),yes) EXELFLAGS += --coverage - else + else ifndef MZSCHEME EXELFLAGS += -nostdlib EXECFLAGS = -DUSE_OWNSTARTUP endif @@ -1141,12 +1141,14 @@ $(EXEOBJC): | $(OUTDIR) ifeq ($(VIMDLL),yes) ifneq ($(COVERAGE),yes) - ifeq ($(ARCH),x86-64) + ifndef MZSCHEME + ifeq ($(ARCH),x86-64) EXEENTRYC = -Wl,--entry=wmainCRTStartup EXEENTRYG = -Wl,--entry=wWinMainCRTStartup - else ifeq ($(ARCH),i686) + else ifeq ($(ARCH),i686) EXEENTRYC = -Wl,--entry=_wmainCRTStartup EXEENTRYG = -Wl,--entry=_wWinMainCRTStartup@0 + endif endif endif diff --git a/src/Make_mvc.mak b/src/Make_mvc.mak index c750311d22..3454a20fcb 100644 --- a/src/Make_mvc.mak +++ b/src/Make_mvc.mak @@ -801,6 +801,13 @@ OBJ = $(OBJ) $(OUTDIR)\os_w32dll.obj $(OUTDIR)\vimd.res EXEOBJC = $(OUTDIR)\os_w32exec.obj $(OUTDIR)\vimc.res EXEOBJG = $(OUTDIR)\os_w32exeg.obj $(OUTDIR)\vimg.res CFLAGS = $(CFLAGS) -DVIMDLL +! ifdef MZSCHEME +EXECFLAGS = +EXELIBC = $(LIBC) +! else +EXECFLAGS = -DUSE_OWNSTARTUP /GS- +EXELIBC = +! endif !else OBJ = $(OBJ) $(OUTDIR)\os_w32exe.obj $(OUTDIR)\vim.res !endif @@ -1302,11 +1309,11 @@ $(NETBEANS_OBJ) $(CHANNEL_OBJ) $(XPM_OBJ) $(OUTDIR)\version.obj $(LINKARGS2) $(GVIM).exe: $(OUTDIR) $(EXEOBJG) $(VIMDLLBASE).dll $(LINK) $(LINKARGS1) /subsystem:$(SUBSYSTEM) -out:$(GVIM).exe \ - $(EXEOBJG) $(VIMDLLBASE).lib + $(EXEOBJG) $(VIMDLLBASE).lib $(EXELIBC) $(VIM).exe: $(OUTDIR) $(EXEOBJC) $(VIMDLLBASE).dll $(LINK) $(LINKARGS1) /subsystem:$(SUBSYSTEM_CON) -out:$(VIM).exe \ - $(EXEOBJC) $(VIMDLLBASE).lib + $(EXEOBJC) $(VIMDLLBASE).lib $(EXELIBC) !else @@ -1380,12 +1387,16 @@ clean: testclean - if exist $(OUTDIR)/nul $(DEL_TREE) $(OUTDIR) - if exist *.obj del *.obj - if exist $(VIM).exe del $(VIM).exe + - if exist $(VIM).exp del $(VIM).exp + - if exist $(VIM).lib del $(VIM).lib - if exist $(VIM).ilk del $(VIM).ilk - if exist $(VIM).pdb del $(VIM).pdb - if exist $(VIM).map del $(VIM).map - if exist $(VIM).ncb del $(VIM).ncb !if "$(VIMDLL)" == "yes" - if exist $(GVIM).exe del $(GVIM).exe + - if exist $(GVIM).exp del $(GVIM).exp + - if exist $(GVIM).lib del $(GVIM).lib - if exist $(GVIM).map del $(GVIM).map - if exist $(VIMDLLBASE).dll del $(VIMDLLBASE).dll - if exist $(VIMDLLBASE).ilk del $(VIMDLLBASE).ilk @@ -1715,10 +1726,10 @@ $(OUTDIR)/os_w32dll.obj: $(OUTDIR) os_w32dll.c $(OUTDIR)/os_w32exe.obj: $(OUTDIR) os_w32exe.c $(INCL) $(OUTDIR)/os_w32exec.obj: $(OUTDIR) os_w32exe.c $(INCL) - $(CC) $(CFLAGS:-DFEAT_GUI_MSWIN=) /DUSE_OWNSTARTUP /GS- /Fo$@ os_w32exe.c + $(CC) $(CFLAGS:-DFEAT_GUI_MSWIN=) $(EXECFLAGS) /Fo$@ os_w32exe.c $(OUTDIR)/os_w32exeg.obj: $(OUTDIR) os_w32exe.c $(INCL) - $(CC) $(CFLAGS) /DUSE_OWNSTARTUP /GS- /Fo$@ os_w32exe.c + $(CC) $(CFLAGS) $(EXECFLAGS) /Fo$@ os_w32exe.c $(OUTDIR)/pathdef.obj: $(OUTDIR) $(PATHDEF_SRC) $(INCL) $(CC) $(CFLAGS_OUTDIR) $(PATHDEF_SRC) diff --git a/src/if_mzsch.c b/src/if_mzsch.c index 9a9c48732b..4a8644c50f 100644 --- a/src/if_mzsch.c +++ b/src/if_mzsch.c @@ -383,7 +383,7 @@ static void (*dll_scheme_set_config_path)(Scheme_Object *p); # define scheme_null dll_scheme_null # define scheme_true dll_scheme_true -// pointers are GetProceAddress'ed as pointers to pointer +// pointers are GetProcAddress'ed as pointers to pointer #if !defined(USE_THREAD_LOCAL) && !defined(LINK_EXTENSIONS_BY_TABLE) # define scheme_current_thread (*dll_scheme_current_thread_ptr) # endif @@ -924,7 +924,7 @@ mzscheme_end(void) #endif } -#if HAVE_TLS_SPACE +#if HAVE_TLS_SPACE && !defined(VIMDLL) # if defined(_MSC_VER) static __declspec(thread) void *tls_space; extern intptr_t _tls_index; @@ -960,7 +960,24 @@ mzscheme_main(void) } #endif #ifdef HAVE_TLS_SPACE +# ifdef VIMDLL + void **ptls_space; + intptr_t tls_index; + void (*pget_tls_info)(void ***ptls_space, intptr_t *ptls_index); + + // Get the address of get_tls_info() from (g)vim.exe. + pget_tls_info = (void *)GetProcAddress( + GetModuleHandle(NULL), "get_tls_info"); + if (pget_tls_info == NULL) + { + disabled = TRUE; + return vim_main2(); + } + pget_tls_info(&ptls_space, &tls_index); + scheme_register_tls_space(ptls_space, tls_index); +# else scheme_register_tls_space(&tls_space, _tls_index); +# endif #endif #ifdef TRAMPOLINED_MZVIM_STARTUP return scheme_main_setup(TRUE, mzscheme_env_main, argc, &argv); diff --git a/src/os_w32exe.c b/src/os_w32exe.c index 85bbfbcd21..7aa4ead99d 100644 --- a/src/os_w32exe.c +++ b/src/os_w32exe.c @@ -70,3 +70,24 @@ wmainCRTStartup(void) } # endif #endif // USE_OWNSTARTUP + + +#if defined(VIMDLL) && defined(FEAT_MZSCHEME) + +# if defined(_MSC_VER) +static __declspec(thread) void *tls_space; +extern intptr_t _tls_index; +# elif defined(__MINGW32__) +static __thread void *tls_space; +extern intptr_t _tls_index; +# endif + +// Get TLS information that is needed for if_mzsch. + __declspec(dllexport) void +get_tls_info(void ***ptls_space, intptr_t *ptls_index) +{ + *ptls_space = &tls_space; + *ptls_index = _tls_index; + return; +} +#endif diff --git a/src/version.c b/src/version.c index a7b5405e43..417e4003a5 100644 --- a/src/version.c +++ b/src/version.c @@ -704,6 +704,8 @@ static char *(features[]) = static int included_patches[] = { /* Add new patch number below this line */ +/**/ + 630, /**/ 629, /**/ From 6b6280c4a270547f84f01c0e0d9be1b7d6bb9e20 Mon Sep 17 00:00:00 2001 From: glepnir Date: Sat, 27 Jul 2024 16:25:45 +0200 Subject: [PATCH 030/186] patch 9.1.0631: wrong completion list displayed with non-existing dir + fuzzy completion Problem: wrong completion list displayed with non-existing dir + fuzzy completion (kawarimidoll) Solution: clear list of matches, if leader did not use fuzzy match (glepnir) fixes: #15357 closes: #15365 Signed-off-by: glepnir --- src/insexpand.c | 9 ++++++++- src/testdir/dumps/Test_pum_highlights_15.dump | 20 +++++++++++++++++++ src/testdir/test_popup.vim | 5 +++++ src/version.c | 2 ++ 4 files changed, 35 insertions(+), 1 deletion(-) create mode 100644 src/testdir/dumps/Test_pum_highlights_15.dump diff --git a/src/insexpand.c b/src/insexpand.c index 7a5298f026..2a5f8e8045 100644 --- a/src/insexpand.c +++ b/src/insexpand.c @@ -3581,6 +3581,7 @@ get_next_filename_completion(void) // Move leader to the file part leader = last_sep + 1; + leader_len = STRLEN(leader); } } } @@ -3643,12 +3644,18 @@ get_next_filename_completion(void) matches = sorted_matches; num_matches = fuzzy_indices.ga_len; } + else if (leader_len > 0) + { + FreeWild(num_matches, matches); + num_matches = 0; + } vim_free(compl_fuzzy_scores); ga_clear(&fuzzy_indices); } - ins_compl_add_matches(num_matches, matches, p_fic || p_wic); + if (num_matches > 0) + ins_compl_add_matches(num_matches, matches, p_fic || p_wic); } /* diff --git a/src/testdir/dumps/Test_pum_highlights_15.dump b/src/testdir/dumps/Test_pum_highlights_15.dump new file mode 100644 index 0000000000..e923b439a3 --- /dev/null +++ b/src/testdir/dumps/Test_pum_highlights_15.dump @@ -0,0 +1,20 @@ +|/+0&#ffffff0|n|o|n|_|e|x|i|t|_|f|o|l|d|e|r> @58 +|~+0#4040ff13&| @73 +|~| @73 +|~| @73 +|~| @73 +|~| @73 +|~| @73 +|~| @73 +|~| @73 +|~| @73 +|~| @73 +|~| @73 +|~| @73 +|~| @73 +|~| @73 +|~| @73 +|~| @73 +|~| @73 +|~| @73 +|-+2#0000000&@1| |F|i|l|e| |n|a|m|e| |c|o|m|p|l|e|t|i|o|n| |(|^|F|^|N|^|P|)| |P+0#ffffff16#e000002|a|t@1|e|r|n| |n|o|t| |f|o|u|n|d| +0#0000000#ffffff0@24 diff --git a/src/testdir/test_popup.vim b/src/testdir/test_popup.vim index 4c2fb4542f..38324c1cda 100644 --- a/src/testdir/test_popup.vim +++ b/src/testdir/test_popup.vim @@ -1493,6 +1493,11 @@ func Test_pum_highlights_match() call TermWait(buf, 50) call VerifyScreenDump(buf, 'Test_pum_highlights_11', {}) + " issue #15357 + call term_sendkeys(buf, "\S/non_exit_folder\\") + call TermWait(buf, 50) + call VerifyScreenDump(buf, 'Test_pum_highlights_15', {}) + call term_sendkeys(buf, "\\") call TermWait(buf) diff --git a/src/version.c b/src/version.c index 417e4003a5..31b0c2462f 100644 --- a/src/version.c +++ b/src/version.c @@ -704,6 +704,8 @@ static char *(features[]) = static int included_patches[] = { /* Add new patch number below this line */ +/**/ + 631, /**/ 630, /**/ From 52e7cc26d81c61fff1b2e3b32e8b9b04347be1d3 Mon Sep 17 00:00:00 2001 From: h-east Date: Sun, 28 Jul 2024 17:03:29 +0200 Subject: [PATCH 031/186] runtime(doc): tweak documentation style a bit closes: #15371 Signed-off-by: h-east Signed-off-by: Christian Brabandt --- runtime/doc/builtin.txt | 14 +++++++------- runtime/doc/change.txt | 4 ++-- runtime/doc/eval.txt | 4 ++-- runtime/doc/insert.txt | 4 ++-- runtime/doc/options.txt | 8 ++++---- runtime/doc/terminal.txt | 4 ++-- runtime/doc/usr_05.txt | 5 +++-- runtime/doc/version9.txt | 6 +++--- 8 files changed, 25 insertions(+), 24 deletions(-) diff --git a/runtime/doc/builtin.txt b/runtime/doc/builtin.txt index c4e7d36a46..fe940ca46f 100644 --- a/runtime/doc/builtin.txt +++ b/runtime/doc/builtin.txt @@ -1,4 +1,4 @@ -*builtin.txt* For Vim version 9.1. Last change: 2024 Jul 17 +*builtin.txt* For Vim version 9.1. Last change: 2024 Jul 28 VIM REFERENCE MANUAL by Bram Moolenaar @@ -279,8 +279,7 @@ gettabvar({nr}, {varname} [, {def}]) gettabwinvar({tabnr}, {winnr}, {name} [, {def}]) any {name} in {winnr} in tab page {tabnr} gettagstack([{nr}]) Dict get the tag stack of window {nr} -gettext({text} [, {package}]) - String lookup translation of {text} +gettext({text} [, {package}]) String lookup translation of {text} getwininfo([{winid}]) List list of info about each window getwinpos([{timeout}]) List X and Y coord in pixels of Vim window getwinposx() Number X coord in pixels of the Vim window @@ -1226,7 +1225,7 @@ bindtextdomain({package}, {path}) *bindtextdomain()* Bind a specific {package} to a {path} so that the |gettext()| function can be used to get language-specific translations for a package. {path} is the directory name - for the translations. See |package-translation|. + for the translations. See |package-translation|. Returns v:true on success and v:false on failure (out of memory). @@ -8142,7 +8141,7 @@ pyxeval({expr}) *pyxeval()* See also: |pyeval()|, |py3eval()| Can also be used as a |method|: > - < GetExpr()->pyxeval() + GetExpr()->pyxeval() < Return type: any, depending on {expr} @@ -9550,7 +9549,8 @@ setline({lnum}, {text}) *setline()* Set line {lnum} of the current buffer to {text}. To insert lines use |append()|. To set lines in another buffer use |setbufline()|. - Any text properties in {lnum} are cleared |text-prop-cleared|. + Any text properties in {lnum} are cleared. See + |text-prop-cleared| {lnum} is used like with |getline()|. When {lnum} is just below the last line the {text} will be @@ -11103,7 +11103,7 @@ synconcealed({lnum}, {col}) *synconcealed()* Note: Doesn't consider |matchadd()| highlighting items, since syntax and matching highlighting are two different mechanisms |syntax-vs-match|. -< + Return type: list diff --git a/runtime/doc/change.txt b/runtime/doc/change.txt index 52a68c439a..2304712c3e 100644 --- a/runtime/doc/change.txt +++ b/runtime/doc/change.txt @@ -1,4 +1,4 @@ -*change.txt* For Vim version 9.1. Last change: 2024 Jul 14 +*change.txt* For Vim version 9.1. Last change: 2024 Jul 28 VIM REFERENCE MANUAL by Bram Moolenaar @@ -1414,7 +1414,7 @@ The next three commands always work on whole lines. :[range]m[ove] {address} *:m* *:mo* *:move* *E134* Move the lines given by [range] to below the line given by {address}. - Any text properties in [range] are cleared + Any text properties in [range] are cleared. See |text-prop-cleared|. ============================================================================== diff --git a/runtime/doc/eval.txt b/runtime/doc/eval.txt index b921cb54a9..e2c6967b59 100644 --- a/runtime/doc/eval.txt +++ b/runtime/doc/eval.txt @@ -1,4 +1,4 @@ -*eval.txt* For Vim version 9.1. Last change: 2024 Jul 17 +*eval.txt* For Vim version 9.1. Last change: 2024 Jul 28 VIM REFERENCE MANUAL by Bram Moolenaar @@ -3125,7 +3125,7 @@ text... let lconst[1][0] = 'b' " OK < *E995* It is an error to specify an existing variable with - :const. > + |:const|. > :let x = 1 :const x = 1 " Error! < *E996* diff --git a/runtime/doc/insert.txt b/runtime/doc/insert.txt index e80fea8c2b..2dd3e03991 100644 --- a/runtime/doc/insert.txt +++ b/runtime/doc/insert.txt @@ -1,4 +1,4 @@ -*insert.txt* For Vim version 9.1. Last change: 2024 Jul 27 +*insert.txt* For Vim version 9.1. Last change: 2024 Jul 28 VIM REFERENCE MANUAL by Bram Moolenaar @@ -2007,7 +2007,7 @@ command in ex mode: > two . :visual - +appends the following text, after the cursor line: > one two < diff --git a/runtime/doc/options.txt b/runtime/doc/options.txt index 52714da2db..8f8f70a74e 100644 --- a/runtime/doc/options.txt +++ b/runtime/doc/options.txt @@ -1,4 +1,4 @@ -*options.txt* For Vim version 9.1. Last change: 2024 Jul 24 +*options.txt* For Vim version 9.1. Last change: 2024 Jul 28 VIM REFERENCE MANUAL by Bram Moolenaar @@ -5919,17 +5919,17 @@ A jump table for the options with a short description can be found at |Q_op|. Using CTRL-X on "0" or CTRL-A on "18446744073709551615" (2^64 - 1) has no effect, overflow is prevented. blank If included, treat numbers as signed or unsigned based on - preceding whitespace. If a number with a leading dash has its + preceding whitespace. If a number with a leading dash has its dash immediately preceded by a non-whitespace character (i.e., not a tab or a " "), the negative sign won't be considered as part of the number. For example: Using CTRL-A on "14" in "Carbon-14" results in "Carbon-15" (without "blank" it would become "Carbon-13"). Using CTRL-X on "8" in "Carbon -8" results in "Carbon -9" - (because -8 is preceded by whitespace. If "unsigned" was + (because -8 is preceded by whitespace. If "unsigned" was set, it would result in "Carbon -7"). If this format is included, overflow is prevented as if - "unsigned" were set. If both this format and "unsigned" are + "unsigned" were set. If both this format and "unsigned" are included, "unsigned" will take precedence. Numbers which simply begin with a digit in the range 1-9 are always diff --git a/runtime/doc/terminal.txt b/runtime/doc/terminal.txt index 6f98cba447..5020ed5b45 100644 --- a/runtime/doc/terminal.txt +++ b/runtime/doc/terminal.txt @@ -1,4 +1,4 @@ -*terminal.txt* For Vim version 9.1. Last change: 2024 Jul 20 +*terminal.txt* For Vim version 9.1. Last change: 2024 Jul 28 VIM REFERENCE MANUAL by Bram Moolenaar @@ -1253,7 +1253,7 @@ Starting ~ *termdebug-starting* Load the plugin with this command: > packadd termdebug - +When loading the plugin from the |.vimrc| file, add the "!" attribute: > packadd! termdebug < *:Termdebug* To start debugging use `:Termdebug` or `:TermdebugCommand` followed by the diff --git a/runtime/doc/usr_05.txt b/runtime/doc/usr_05.txt index d9222594ce..21629e3ca1 100644 --- a/runtime/doc/usr_05.txt +++ b/runtime/doc/usr_05.txt @@ -1,4 +1,4 @@ -*usr_05.txt* For Vim version 9.1. Last change: 2024 Jun 19 +*usr_05.txt* For Vim version 9.1. Last change: 2024 Jun 28 VIM USER MANUAL - by Bram Moolenaar @@ -455,7 +455,8 @@ Adding nohlsearch package *nohlsearch-install* Load the plugin with this command: > packadd nohlsearch < -Automatically execute |:nohlsearch| after 'updatetime' or getting into |Insert| mode. +Automatically execute |:nohlsearch| after 'updatetime' or getting into +|Insert| mode. Thus assuming default updatetime, hlsearch would be suspended/turned off after 4 seconds of idle time. diff --git a/runtime/doc/version9.txt b/runtime/doc/version9.txt index 5f91af62a7..e8e9194dc5 100644 --- a/runtime/doc/version9.txt +++ b/runtime/doc/version9.txt @@ -1,4 +1,4 @@ -*version9.txt* For Vim version 9.1. Last change: 2024 Jul 25 +*version9.txt* For Vim version 9.1. Last change: 2024 Jul 28 VIM REFERENCE MANUAL by Bram Moolenaar @@ -41581,7 +41581,7 @@ Changed~ function |get()-func| - |:bwipe| also wipes jumplist and tagstack data - moving in the buffer list using |:bnext| and similar commands, behaves as - documented and skips help buffers (if not run from a help buffer, else + documented and skips help buffers (if not run from a help buffer, else moves to the next/previous help buffer). - allow to complete directories from 'cdpath' for |:cd| and similar commands, add the "cd_in_path" completion type for e.g. |:command-complete| and @@ -41614,7 +41614,7 @@ Functions: ~ Autocommands: ~ |CursorMovedC| after the cursor was moved in the comamnd-line -|KeyInputPre| process any Key event in any mode +|KeyInputPre| before processing any key event in any mode |SessionWritePost| after writing the session file |:mksession| |TermResponseAll| after the terminal response to |t_RV| and others is received From 4c45425c10a94382a435239e8f63c6b1ca55d4e4 Mon Sep 17 00:00:00 2001 From: josch Date: Sun, 28 Jul 2024 17:05:06 +0200 Subject: [PATCH 032/186] runtime(debcopyright): Add support for Files-Included in syntax script Full support (including for components) was finished with this commit: https://salsa.debian.org/debian/devscripts/-/commit/ee90dad7712a7db1e9541b405e065a08d29d62f8 closes: #15374 Signed-off-by: josch Signed-off-by: James McCoy Signed-off-by: Christian Brabandt --- runtime/syntax/debcopyright.vim | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/runtime/syntax/debcopyright.vim b/runtime/syntax/debcopyright.vim index 6f76b5c868..cb9e8965de 100644 --- a/runtime/syntax/debcopyright.vim +++ b/runtime/syntax/debcopyright.vim @@ -1,7 +1,7 @@ " Vim syntax file " Language: Debian copyright file " Maintainer: Debian Vim Maintainers -" Last Change: 2023 Jan 16 +" Last Change: 2024 Jul 28 " URL: https://salsa.debian.org/vim-team/vim-debian/blob/main/syntax/debcopyright.vim " Standard syntax initialization @@ -15,7 +15,7 @@ set cpo&vim syn case match syn match debcopyrightUrl "\vhttps?://[[:alnum:]][-[:alnum:]]*[[:alnum:]]?(\.[[:alnum:]][-[:alnum:]]*[[:alnum:]]?)*\.[[:alpha:]][-[:alnum:]]*[[:alpha:]]?(:\d+)?(/[^[:space:]]*)?$" -syn match debcopyrightKey "^\%(Format\|Upstream-Name\|Upstream-Contact\|Disclaimer\|Source\|Comment\|Files\|Copyright\|License\|Files-Excluded\%(-[-a-zA-Z0-9]\+\)\=\): *" +syn match debcopyrightKey "^\%(Format\|Upstream-Name\|Upstream-Contact\|Disclaimer\|Source\|Comment\|Files\|Copyright\|License\|Files-\%(Excluded\|Included\)\%(-[-a-zA-Z0-9]\+\)\=\): *" syn match debcopyrightEmail "[_=[:alnum:]\.+-]\+@[[:alnum:]\./\-]\+" syn match debcopyrightEmail "<.\{-}>" syn match debcopyrightComment "^#.*$" contains=@Spell From 073cb02cb5fd3209a9f0ff65fa2dc748c792792f Mon Sep 17 00:00:00 2001 From: Ken Takata Date: Sun, 28 Jul 2024 17:08:15 +0200 Subject: [PATCH 033/186] patch 9.1.0632: MS-Windows: Compiler Warnings Problem: MS-Windows: Compiler Warnings Solution: Fix the warnings (Ken Takata) * Unused variable. * Conversion from size_t to int. closes: #15369 Signed-off-by: Ken Takata Signed-off-by: Christian Brabandt --- src/if_py_both.h | 2 ++ src/insexpand.c | 2 +- src/search.c | 2 +- src/version.c | 2 ++ 4 files changed, 6 insertions(+), 2 deletions(-) diff --git a/src/if_py_both.h b/src/if_py_both.h index e0fd3eafb0..d09b14c756 100644 --- a/src/if_py_both.h +++ b/src/if_py_both.h @@ -358,7 +358,9 @@ static PyObject *py_find_spec; #else static PyObject *py_load_module; #endif +#if PY_VERSION_HEX < 0x30c00a7 static PyObject *py_find_module; +#endif static PyObject *VimError; diff --git a/src/insexpand.c b/src/insexpand.c index 2a5f8e8045..00a7b75684 100644 --- a/src/insexpand.c +++ b/src/insexpand.c @@ -3544,7 +3544,7 @@ get_next_filename_completion(void) int i; int score; char_u *leader = ins_compl_leader(); - int leader_len = STRLEN(leader); + size_t leader_len = STRLEN(leader); int in_fuzzy = ((get_cot_flags() & COT_FUZZY) != 0 && leader_len > 0); char_u **sorted_matches; int *fuzzy_indices_data; diff --git a/src/search.c b/src/search.c index c8f8736768..01c143f69b 100644 --- a/src/search.c +++ b/src/search.c @@ -5265,7 +5265,7 @@ search_for_fuzzy_match( { found_new_match = TRUE; *pos = current_pos; - *len = STRLEN(*ptr); + *len = (int)STRLEN(*ptr); break; } } diff --git a/src/version.c b/src/version.c index 31b0c2462f..398b4821ad 100644 --- a/src/version.c +++ b/src/version.c @@ -704,6 +704,8 @@ static char *(features[]) = static int included_patches[] = { /* Add new patch number below this line */ +/**/ + 632, /**/ 631, /**/ From 0268ff3af3d598e18454a3ce1c510f411427b6c0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Dominique=20Pell=C3=A9?= Date: Sun, 28 Jul 2024 21:12:20 +0200 Subject: [PATCH 034/186] patch 9.1.0633: Compilation warnings with `-Wunused-parameter` MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Problem: Compilation warnings with `-Wunused-parameter` Solution: Add the `UNUSED` macro where needed, and remove some superfluous ones (Dominique Pellé) Change fixes these kind of warnings when building without the channel feature: ``` eval.c:6122:15: warning: unused parameter ‘tv’ [-Wunused-parameter] typval_T *tv, ^ eval.c:6123:14: warning: unused parameter ‘tofree’ [-Wunused-parameter] char_u **tofree, ^ eval.c:6124:13: warning: unused parameter ‘numbuf’ [-Wunused-parameter] char_u *numbuf, ^ eval.c:6125:10: warning: unused parameter ‘composite_val’ [-Wunused-parameter] int composite_val) ``` closes: #15378 Signed-off-by: Dominique Pellé Signed-off-by: Christian Brabandt --- src/eval.c | 8 ++++---- src/misc2.c | 2 +- src/strings.c | 2 +- src/terminal.c | 2 +- src/textprop.c | 2 +- src/typval.c | 2 +- src/undo.c | 4 ++-- src/version.c | 2 ++ src/vim9class.c | 2 +- src/vim9cmds.c | 4 ++-- src/viminfo.c | 2 +- src/window.c | 12 ++++++------ 12 files changed, 23 insertions(+), 21 deletions(-) diff --git a/src/eval.c b/src/eval.c index a001bba6a0..4f5646377d 100644 --- a/src/eval.c +++ b/src/eval.c @@ -6119,10 +6119,10 @@ dict_tv2string( */ static char_u * jobchan_tv2string( - typval_T *tv, - char_u **tofree, - char_u *numbuf, - int composite_val) + typval_T *tv UNUSED, + char_u **tofree UNUSED, + char_u *numbuf UNUSED, + int composite_val UNUSED) { char_u *r = NULL; diff --git a/src/misc2.c b/src/misc2.c index c07ed8065c..b5044fb366 100644 --- a/src/misc2.c +++ b/src/misc2.c @@ -72,7 +72,7 @@ coladvance_force(colnr_T wcol) * Get the screen position of character col with a coladd in the cursor line. */ int -getviscol2(colnr_T col, colnr_T coladd UNUSED) +getviscol2(colnr_T col, colnr_T coladd) { colnr_T x; pos_T pos; diff --git a/src/strings.c b/src/strings.c index 6b2ff0a011..20ca65d429 100644 --- a/src/strings.c +++ b/src/strings.c @@ -1037,7 +1037,7 @@ string_reduce( * Implementation of "byteidx()" and "byteidxcomp()" functions */ static void -byteidx_common(typval_T *argvars, typval_T *rettv, int comp UNUSED) +byteidx_common(typval_T *argvars, typval_T *rettv, int comp) { rettv->vval.v_number = -1; diff --git a/src/terminal.c b/src/terminal.c index 648fc78728..c681f3a432 100644 --- a/src/terminal.c +++ b/src/terminal.c @@ -6299,7 +6299,7 @@ f_term_getsize(typval_T *argvars, typval_T *rettv) * "term_setsize(buf, rows, cols)" function */ void -f_term_setsize(typval_T *argvars UNUSED, typval_T *rettv UNUSED) +f_term_setsize(typval_T *argvars, typval_T *rettv UNUSED) { buf_T *buf; term_T *term; diff --git a/src/textprop.c b/src/textprop.c index 83c42a371c..fe0c8d20cb 100644 --- a/src/textprop.c +++ b/src/textprop.c @@ -2060,7 +2060,7 @@ list_types(hashtab_T *ht, list_T *l) * prop_type_list([{bufnr}]) */ void -f_prop_type_list(typval_T *argvars, typval_T *rettv UNUSED) +f_prop_type_list(typval_T *argvars, typval_T *rettv) { buf_T *buf = NULL; diff --git a/src/typval.c b/src/typval.c index e50e96af0f..01ffef5e5d 100644 --- a/src/typval.c +++ b/src/typval.c @@ -2214,7 +2214,7 @@ eval_number( char_u **arg, typval_T *rettv, int evaluate, - int want_string UNUSED) + int want_string) { int len; int skip_quotes = !in_old_script(4); diff --git a/src/undo.c b/src/undo.c index 1cd8912823..8c2783acd5 100644 --- a/src/undo.c +++ b/src/undo.c @@ -3683,7 +3683,7 @@ u_eval_tree(buf_T *buf, u_header_T *first_uhp, list_T *list) * "undofile(name)" function */ void -f_undofile(typval_T *argvars UNUSED, typval_T *rettv) +f_undofile(typval_T *argvars, typval_T *rettv) { if (in_vim9script() && check_for_string_arg(argvars, 0) == FAIL) return; @@ -3738,7 +3738,7 @@ u_undofile_reset_and_delete(buf_T *buf) * "undotree(expr)" function */ void -f_undotree(typval_T *argvars UNUSED, typval_T *rettv) +f_undotree(typval_T *argvars, typval_T *rettv) { if (in_vim9script() && check_for_opt_buffer_arg(argvars, 0) == FAIL) return; diff --git a/src/version.c b/src/version.c index 398b4821ad..373cd8cb5c 100644 --- a/src/version.c +++ b/src/version.c @@ -704,6 +704,8 @@ static char *(features[]) = static int included_patches[] = { /* Add new patch number below this line */ +/**/ + 633, /**/ 632, /**/ diff --git a/src/vim9class.c b/src/vim9class.c index 70f2405f01..d8813c6f20 100644 --- a/src/vim9class.c +++ b/src/vim9class.c @@ -2665,7 +2665,7 @@ typealias_unref(typealias_T *ta) * Handle ":type". Create an alias for a type specification. */ void -ex_type(exarg_T *eap UNUSED) +ex_type(exarg_T *eap) { char_u *arg = eap->arg; diff --git a/src/vim9cmds.c b/src/vim9cmds.c index 694bb3349f..c7fa60aa4f 100644 --- a/src/vim9cmds.c +++ b/src/vim9cmds.c @@ -1639,7 +1639,7 @@ compile_try(char_u *arg, cctx_T *cctx) * Compile "catch {expr}". */ char_u * -compile_catch(char_u *arg, cctx_T *cctx UNUSED) +compile_catch(char_u *arg, cctx_T *cctx) { scope_T *scope = cctx->ctx_scope; garray_T *instr = &cctx->ctx_instr; @@ -1923,7 +1923,7 @@ compile_endtry(char_u *arg, cctx_T *cctx) * compile "throw {expr}" */ char_u * -compile_throw(char_u *arg, cctx_T *cctx UNUSED) +compile_throw(char_u *arg, cctx_T *cctx) { char_u *p = skipwhite(arg); diff --git a/src/viminfo.c b/src/viminfo.c index 540422c8ca..11a2946816 100644 --- a/src/viminfo.c +++ b/src/viminfo.c @@ -251,7 +251,7 @@ barline_writestring(FILE *fd, char_u *s, int remaining_start) viminfo_readstring( vir_T *virp, int off, // offset for virp->vir_line - int convert UNUSED) // convert the string + int convert) // convert the string { char_u *retval = NULL; char_u *s, *d; diff --git a/src/window.c b/src/window.c index db0bb1b628..7ca29d46a5 100644 --- a/src/window.c +++ b/src/window.c @@ -1708,7 +1708,7 @@ win_count(void) int make_windows( int count, - int vertical UNUSED) // split windows vertically if TRUE + int vertical) // split windows vertically if TRUE { int maxcount; int todo; @@ -3486,7 +3486,7 @@ win_free_all(void) win_T * winframe_remove( win_T *win, - int *dirp UNUSED, // set to 'v' or 'h' for direction if 'ea' + int *dirp, // set to 'v' or 'h' for direction if 'ea' tabpage_T *tp, // tab page "win" is in, NULL for current frame_T **unflat_altfr) // if not NULL, set to pointer of frame that got // the space, and it is not flattened @@ -4855,8 +4855,8 @@ tabpage_index(tabpage_T *ftp) */ static int leave_tabpage( - buf_T *new_curbuf UNUSED, // what is going to be the new curbuf, - // NULL if unknown + buf_T *new_curbuf, // what is going to be the new curbuf, + // NULL if unknown int trigger_leave_autocmds) { tabpage_T *tp = curtab; @@ -4908,7 +4908,7 @@ leave_tabpage( static void enter_tabpage( tabpage_T *tp, - buf_T *old_curbuf UNUSED, + buf_T *old_curbuf, int trigger_enter_autocmds, int trigger_leave_autocmds) { @@ -7855,7 +7855,7 @@ get_win_number(win_T *wp, win_T *first_win) } int -get_tab_number(tabpage_T *tp UNUSED) +get_tab_number(tabpage_T *tp) { int i = 1; tabpage_T *t; From 13032a49b7d2a45e7c774cf23ee8f58f56b03781 Mon Sep 17 00:00:00 2001 From: Christian Brabandt Date: Sun, 28 Jul 2024 21:16:48 +0200 Subject: [PATCH 035/186] patch 9.1.0634: Ctrl-P not working by default Problem: Ctrl-P not working by default (Jesse Pavel, after v9.1.0598) Solution: Revert part of v9.1.0598 and set cur_match_pos correctly according to compl_dir_forward() fixes: #15370 closes: #15379 Signed-off-by: Christian Brabandt --- src/insexpand.c | 5 +---- src/testdir/test_ins_complete.vim | 10 ++++++++++ src/version.c | 2 ++ 3 files changed, 13 insertions(+), 4 deletions(-) diff --git a/src/insexpand.c b/src/insexpand.c index 00a7b75684..3a168848fe 100644 --- a/src/insexpand.c +++ b/src/insexpand.c @@ -4012,11 +4012,8 @@ ins_compl_get_exp(pos_T *ini) st.ins_buf = curbuf; // In case the buffer was wiped out. compl_old_match = compl_curr_match; // remember the last current match - if (in_fuzzy) - st.cur_match_pos = (compl_dir_forward()) + st.cur_match_pos = (compl_dir_forward()) ? &st.last_match_pos : &st.first_match_pos; - else - st.cur_match_pos = &st.last_match_pos; // For ^N/^P loop over all the flags/windows/buffers in 'complete'. for (;;) diff --git a/src/testdir/test_ins_complete.vim b/src/testdir/test_ins_complete.vim index f3f6eac23f..cf688ac6a6 100644 --- a/src/testdir/test_ins_complete.vim +++ b/src/testdir/test_ins_complete.vim @@ -2688,4 +2688,14 @@ func Test_complete_fuzzy_match_tie() set completeopt& endfunc +func Test_complete_backwards_default() + new + call append(1, ['foobar', 'foobaz']) + new + call feedkeys("i\", 'tx') + call assert_equal('foobaz', getline('.')) + bw! + bw! +endfunc + " vim: shiftwidth=2 sts=2 expandtab nofoldenable diff --git a/src/version.c b/src/version.c index 373cd8cb5c..6520422955 100644 --- a/src/version.c +++ b/src/version.c @@ -704,6 +704,8 @@ static char *(features[]) = static int included_patches[] = { /* Add new patch number below this line */ +/**/ + 634, /**/ 633, /**/ From e57c9a19edc906a96ccb8821ae33fa6a8b20c3cd Mon Sep 17 00:00:00 2001 From: EliSauder <24995216+EliSauder@users.noreply.github.com> Date: Sun, 28 Jul 2024 21:28:11 +0200 Subject: [PATCH 036/186] patch 9.1.0635: filetype: SuperHTML template files not recognized Problem: filetype: SuperHTML template files not recognized Solution: Update the filetype detection code to detect '*.shtml' either as HTML (Server Side Includes) or SuperHTML (template files) (EliSauder) related: #15355 related: #15367 Signed-off-by: EliSauder <24995216+EliSauder@users.noreply.github.com> Signed-off-by: Christian Brabandt --- runtime/autoload/dist/ft.vim | 6 +++++- runtime/filetype.vim | 2 +- src/testdir/test_filetype.vim | 32 ++++++++++++++++++++++++++++++++ src/version.c | 2 ++ 4 files changed, 40 insertions(+), 2 deletions(-) diff --git a/runtime/autoload/dist/ft.vim b/runtime/autoload/dist/ft.vim index e53cdacbe3..c8942eb3d1 100644 --- a/runtime/autoload/dist/ft.vim +++ b/runtime/autoload/dist/ft.vim @@ -421,7 +421,6 @@ export def FThtml() setf htmlangular return endif - # Check for XHTML if getline(n) =~ '\' + setf superhtml + return + endif n += 1 endwhile setf FALLBACK html diff --git a/runtime/filetype.vim b/runtime/filetype.vim index d02826578e..bdf591ac7b 100644 --- a/runtime/filetype.vim +++ b/runtime/filetype.vim @@ -1039,7 +1039,7 @@ au BufNewFile,BufRead *.t.html setf tilde " Translate shell au BufNewFile,BufRead init.trans,*/etc/translate-shell,.trans setf clojure -" HTML (.shtml and .stm for server side) +" HTML (.stm for server side, .shtml is server-side or superhtml) au BufNewFile,BufRead *.html,*.htm,*.shtml,*.stm call dist#ft#FThtml() au BufNewFile,BufRead *.cshtml setf html diff --git a/src/testdir/test_filetype.vim b/src/testdir/test_filetype.vim index f8b3ea872b..3aa3e97f4e 100644 --- a/src/testdir/test_filetype.vim +++ b/src/testdir/test_filetype.vim @@ -1603,6 +1603,38 @@ func Test_html_file() call assert_equal('htmldjango', &filetype) bwipe! + " Super html layout + let content = ['', + \ '', + \ '', + \ '
', + \ '
'] + call writefile(content, 'Xfile.shtml', 'D') + split Xfile.shtml + call assert_equal('superhtml', &filetype) + bwipe! + + " Super html template + let content = ['', + \ '', + \ ' ', + \ ' ', + \ ' <super>', + \ ' suffix', + \ ' ', + \ ' ', + \ ' ', + \ ' ', + \ '
', + \ ' ', + \ '
', + \ ' ', + \ ''] + call writefile(content, 'Xfile.shtml', 'D') + split Xfile.shtml + call assert_equal('superhtml', &filetype) + bwipe! + " regular HTML let content = ['', '', ' Foobar', ' Content', ' ', ''] call writefile(content, 'Xfile.html', 'D') diff --git a/src/version.c b/src/version.c index 6520422955..a321cc53e3 100644 --- a/src/version.c +++ b/src/version.c @@ -704,6 +704,8 @@ static char *(features[]) = static int included_patches[] = { /* Add new patch number below this line */ +/**/ + 635, /**/ 634, /**/ From f4572cee35a6c224985e71116e676ab711c09af3 Mon Sep 17 00:00:00 2001 From: EliSauder <24995216+EliSauder@users.noreply.github.com> Date: Sun, 28 Jul 2024 21:32:38 +0200 Subject: [PATCH 037/186] patch 9.1.0636: filetype: ziggy files are not recognized Problem: filetype: ziggy files are not recognized Solution: detect '*.ziggy' files as ziggy filetype, detect '*.ziggy-schema' files as ziggy-schema filetype (EliSauder) References: https://ziggy-lang.io/ fixes: #15355 closes: #15367 Signed-off-by: EliSauder <24995216+EliSauder@users.noreply.github.com> Signed-off-by: Christian Brabandt --- runtime/filetype.vim | 4 ++++ src/testdir/test_filetype.vim | 2 ++ src/version.c | 2 ++ 3 files changed, 8 insertions(+) diff --git a/runtime/filetype.vim b/runtime/filetype.vim index bdf591ac7b..676738078c 100644 --- a/runtime/filetype.vim +++ b/runtime/filetype.vim @@ -2196,6 +2196,10 @@ au BufNewFile,BufRead .login,.cshrc,csh.cshrc,csh.login,csh.logout,*.csh,.alias " Zig and Zig Object Notation (ZON) au BufNewFile,BufRead *.zig,*.zon setf zig +" Ziggy and Ziggy Schema +au BufNewFile,BufRead *.ziggy setf ziggy +au BufNewFile,BufRead *.ziggy-schema setf ziggy_schema + " Zserio au BufNewFile,BufRead *.zs setf zserio diff --git a/src/testdir/test_filetype.vim b/src/testdir/test_filetype.vim index 3aa3e97f4e..9c2a5e8e59 100644 --- a/src/testdir/test_filetype.vim +++ b/src/testdir/test_filetype.vim @@ -864,6 +864,8 @@ def s:GetFilenameChecks(): dict> z8a: ['file.z8a'], zathurarc: ['zathurarc'], zig: ['file.zig', 'build.zig.zon'], + ziggy: ['file.ziggy'], + ziggy_schema: ['file.ziggy-schema'], zimbu: ['file.zu'], zimbutempl: ['file.zut'], zserio: ['file.zs'], diff --git a/src/version.c b/src/version.c index a321cc53e3..d526d9f469 100644 --- a/src/version.c +++ b/src/version.c @@ -704,6 +704,8 @@ static char *(features[]) = static int included_patches[] = { /* Add new patch number below this line */ +/**/ + 636, /**/ 635, /**/ From 81a65000c5b478cbf88397f0ffd7f8833a9babe1 Mon Sep 17 00:00:00 2001 From: Ken Takata Date: Mon, 29 Jul 2024 19:52:03 +0200 Subject: [PATCH 038/186] patch 9.1.0637: MS-Windows: Style issues in MSVC Makefile Problem: MS-Windows: Style issues in MSVC Makefile Solution: Fix style issues, simplify logic (Ken Takata) * Add space around the operators for consistency. * Remove unnecessary ren command. Use the /Fe option to create install.exe directly. * Remove unnecessary mkdir auto command. src/auto should always exist. closes: #15389 Signed-off-by: Ken Takata Signed-off-by: Christian Brabandt --- src/Make_mvc.mak | 53 ++++++++++++++++++++++-------------------------- src/version.c | 2 ++ 2 files changed, 26 insertions(+), 29 deletions(-) diff --git a/src/Make_mvc.mak b/src/Make_mvc.mak index 3454a20fcb..c90ec4baa5 100644 --- a/src/Make_mvc.mak +++ b/src/Make_mvc.mak @@ -157,10 +157,10 @@ # you can set DEFINES on the command line, e.g., # nmake -f Make_mvc.mvc "DEFINES=-DEMACS_TAGS" -RM= del /f /q -PS= powershell.exe +RM = del /f /q +PS = powershell.exe -PSFLAGS= -NoLogo -NoProfile -Command +PSFLAGS = -NoLogo -NoProfile -Command !IF ![$(PS) $(PSFLAGS) try{Out-File -FilePath '.\major.tmp' -InputObject \ \"MAJOR=$$(((Select-String -Pattern 'VIM_VERSION_MAJOR\s+\d{1,2}' \ @@ -171,7 +171,7 @@ PSFLAGS= -NoLogo -NoProfile -Command ! ENDIF !ELSE # Change this value for the new version -MAJOR= 9 +MAJOR = 9 !ENDIF !IF ![$(PS) $(PSFLAGS) try{Out-File -FilePath '.\minor.tmp' -InputObject \ @@ -183,7 +183,7 @@ MAJOR= 9 ! ENDIF !ELSE # Change this value for the new version -MINOR= 1 +MINOR = 1 !ENDIF !IF ![$(PS) $(PSFLAGS) try{Out-File -FilePath '.\patchlvl.tmp' -InputObject \ @@ -202,7 +202,7 @@ MINOR= 1 TARGETOS = WINNT !IFDEF PATCHLEVEL -RCFLAGS= -DVIM_VERSION_PATCHLEVEL=$(PATCHLEVEL) +RCFLAGS = -DVIM_VERSION_PATCHLEVEL=$(PATCHLEVEL) !ENDIF @@ -260,7 +260,7 @@ OBJDIR = $(OBJDIR)d !ifdef PROCESSOR_ARCHITECTURE # We're on Windows NT or using VC 6+ ! ifdef CPU -ASSEMBLY_ARCHITECTURE=$(CPU) +ASSEMBLY_ARCHITECTURE = $(CPU) # Using I386 for $ASSEMBLY_ARCHITECTURE doesn't work for VC7. ! if "$(CPU)" == "I386" CPU = i386 @@ -288,7 +288,7 @@ CPU = ARM64 # We're on Windows 95 CPU = i386 !endif # !PROCESSOR_ARCHITECTURE -ASSEMBLY_ARCHITECTURE=$(CPU) +ASSEMBLY_ARCHITECTURE = $(CPU) OBJDIR = $(OBJDIR)$(CPU) # Build a retail version by default @@ -355,7 +355,7 @@ WINVER = 0x0601 # Use multiprocess build USE_MP = yes -!if "$(FEATURES)"=="" +!if "$(FEATURES)" == "" FEATURES = HUGE !endif @@ -374,7 +374,7 @@ CSCOPE_DEFS = -DFEAT_CSCOPE !endif !ifndef TERMINAL -! if "$(FEATURES)"=="HUGE" +! if "$(FEATURES)" == "HUGE" TERMINAL = yes ! else TERMINAL = no @@ -403,7 +403,7 @@ TERM_DEPS = \ !endif !ifndef SOUND -! if "$(FEATURES)"=="HUGE" +! if "$(FEATURES)" == "HUGE" SOUND = yes ! else SOUND = no @@ -444,7 +444,7 @@ NETBEANS = $(GUI) !endif !ifndef CHANNEL -! if "$(FEATURES)"=="HUGE" || "$(TERMINAL)"=="yes" +! if "$(FEATURES)" == "HUGE" || "$(TERMINAL)" == "yes" CHANNEL = yes ! else CHANNEL = $(GUI) @@ -549,8 +549,8 @@ CFLAGS = -c /W3 /GF /nologo -I. -Iproto -DHAVE_PATHDEF -DWIN32 -DHAVE_STDINT_H \ DEL_TREE = rmdir /s /q -INTDIR=$(OBJDIR) -OUTDIR=$(OBJDIR) +INTDIR = $(OBJDIR) +OUTDIR = $(OBJDIR) ### Validate CPUNR !ifndef CPUNR @@ -960,11 +960,9 @@ LUA_LIB = "$(LUA)\lib\lua$(LUA_VER).lib" ! endif !endif -!ifdef PYTHON -! ifdef PYTHON3 -DYNAMIC_PYTHON=yes -DYNAMIC_PYTHON3=yes -! endif +!if defined(PYTHON) && defined(PYTHON3) +DYNAMIC_PYTHON = yes +DYNAMIC_PYTHON3 = yes !endif # PYTHON interface @@ -1029,13 +1027,13 @@ PYTHON3_LIB = "$(PYTHON3)\libs\$(PYTHON3_NAME).lib" MZSCHEME_VER = 3m_a0solc ! endif ! ifndef MZSCHEME_COLLECTS -MZSCHEME_COLLECTS=$(MZSCHEME)\collects +MZSCHEME_COLLECTS = $(MZSCHEME)\collects ! endif CFLAGS = $(CFLAGS) -DFEAT_MZSCHEME -I "$(MZSCHEME)\include" ! if EXIST("$(MZSCHEME)\lib\msvc\libmzsch$(MZSCHEME_VER).lib") -MZSCHEME_MAIN_LIB=mzsch +MZSCHEME_MAIN_LIB = mzsch ! else -MZSCHEME_MAIN_LIB=racket +MZSCHEME_MAIN_LIB = racket ! endif ! if (EXIST("$(MZSCHEME)\lib\lib$(MZSCHEME_MAIN_LIB)$(MZSCHEME_VER).dll") \ && !EXIST("$(MZSCHEME)\lib\libmzgc$(MZSCHEME_VER).dll")) \ @@ -1226,7 +1224,7 @@ LINK_PDB = /PDB:$(VIM).pdb -debug !message # CFLAGS with /Fo$(OUTDIR)/ -CFLAGS_OUTDIR=$(CFLAGS) /Fo$(OUTDIR)/ +CFLAGS_OUTDIR = $(CFLAGS) /Fo$(OUTDIR)/ PATHDEF_SRC = $(OUTDIR)\pathdef.c @@ -1344,15 +1342,13 @@ CFLAGS_INST = /nologo /O2 -DNDEBUG -DWIN32 -DWINVER=$(WINVER) \ -D_WIN32_WINNT=$(WINVER) $(CFLAGS_DEPR) !IFDEF PATCHLEVEL -CFLAGS_INST= $(CFLAGS_INST) -DVIM_VERSION_PATCHLEVEL=$(PATCHLEVEL) +CFLAGS_INST = $(CFLAGS_INST) -DVIM_VERSION_PATCHLEVEL=$(PATCHLEVEL) !ENDIF install.exe: dosinst.c dosinst.h version.h - $(CC) $(CFLAGS_INST) dosinst.c kernel32.lib shell32.lib \ + $(CC) $(CFLAGS_INST) /Fe$@ dosinst.c kernel32.lib shell32.lib \ user32.lib ole32.lib advapi32.lib uuid.lib \ -link -subsystem:$(SUBSYSTEM_TOOLS) - - if exist install.exe del install.exe - ren dosinst.exe install.exe uninstall.exe: uninstall.c dosinst.h version.h $(CC) $(CFLAGS_INST) uninstall.c shell32.lib advapi32.lib \ @@ -1631,8 +1627,7 @@ $(OUTDIR)/if_cscope.obj: $(OUTDIR) if_cscope.c $(INCL) $(OUTDIR)/if_lua.obj: $(OUTDIR) if_lua.c $(INCL) $(CC) $(CFLAGS_OUTDIR) $(LUA_INC) if_lua.c -auto/if_perl.c : if_perl.xs typemap - -if not exist auto/nul mkdir auto +auto/if_perl.c: if_perl.xs typemap $(XSUBPP) -prototypes -typemap $(XSUBPP_TYPEMAP) \ -typemap typemap if_perl.xs -output $@ diff --git a/src/version.c b/src/version.c index d526d9f469..4d9ba95218 100644 --- a/src/version.c +++ b/src/version.c @@ -704,6 +704,8 @@ static char *(features[]) = static int included_patches[] = { /* Add new patch number below this line */ +/**/ + 637, /**/ 636, /**/ From 0dff31576a340b74cec81517912923c38cb28450 Mon Sep 17 00:00:00 2001 From: zeertzjq Date: Mon, 29 Jul 2024 20:28:14 +0200 Subject: [PATCH 039/186] patch 9.1.0638: E1510 may happen when formatting a message for smsg() Problem: E1510 may happen when formatting a message (after 9.1.0181). Solution: Only give E1510 when using typval. (zeertzjq) closes: #15391 Signed-off-by: zeertzjq Signed-off-by: Christian Brabandt --- src/strings.c | 62 ++++++++++++++++++---------------- src/testdir/test_spellfile.vim | 16 +++++++++ src/version.c | 2 ++ 3 files changed, 51 insertions(+), 29 deletions(-) diff --git a/src/strings.c b/src/strings.c index 20ca65d429..b8ea00bb3a 100644 --- a/src/strings.c +++ b/src/strings.c @@ -2497,7 +2497,8 @@ format_overflow_error(const char *pstart) get_unsigned_int( const char *pstart, const char **p, - unsigned int *uj) + unsigned int *uj, + int overflow_err) { *uj = **p - '0'; ++*p; @@ -2510,8 +2511,13 @@ get_unsigned_int( if (*uj > MAX_ALLOWED_STRING_WIDTH) { - format_overflow_error(pstart); - return FAIL; + if (overflow_err) + { + format_overflow_error(pstart); + return FAIL; + } + else + *uj = MAX_ALLOWED_STRING_WIDTH; } return OK; @@ -2584,7 +2590,7 @@ parse_fmt_types( // Positional argument unsigned int uj; - if (get_unsigned_int(pstart, &p, &uj) == FAIL) + if (get_unsigned_int(pstart, &p, &uj, tvs != NULL) == FAIL) goto error; pos_arg = uj; @@ -2625,7 +2631,7 @@ parse_fmt_types( // Positional argument field width unsigned int uj; - if (get_unsigned_int(arg + 1, &p, &uj) == FAIL) + if (get_unsigned_int(arg + 1, &p, &uj, tvs != NULL) == FAIL) goto error; if (*p != '$') @@ -2656,7 +2662,7 @@ parse_fmt_types( const char *digstart = p; unsigned int uj; - if (get_unsigned_int(digstart, &p, &uj) == FAIL) + if (get_unsigned_int(digstart, &p, &uj, tvs != NULL) == FAIL) goto error; if (*p == '$') @@ -2680,7 +2686,7 @@ parse_fmt_types( // Parse precision unsigned int uj; - if (get_unsigned_int(arg + 1, &p, &uj) == FAIL) + if (get_unsigned_int(arg + 1, &p, &uj, tvs != NULL) == FAIL) goto error; if (*p == '$') @@ -2712,7 +2718,7 @@ parse_fmt_types( const char *digstart = p; unsigned int uj; - if (get_unsigned_int(digstart, &p, &uj) == FAIL) + if (get_unsigned_int(digstart, &p, &uj, tvs != NULL) == FAIL) goto error; if (*p == '$') @@ -3025,7 +3031,7 @@ vim_vsnprintf_typval( const char *digstart = p; unsigned int uj; - if (get_unsigned_int(digstart, &p, &uj) == FAIL) + if (get_unsigned_int(digstart, &p, &uj, tvs != NULL) == FAIL) goto error; pos_arg = uj; @@ -3067,7 +3073,7 @@ vim_vsnprintf_typval( // Positional argument field width unsigned int uj; - if (get_unsigned_int(digstart, &p, &uj) == FAIL) + if (get_unsigned_int(digstart, &p, &uj, tvs != NULL) == FAIL) goto error; arg_idx = uj; @@ -3085,8 +3091,13 @@ vim_vsnprintf_typval( if (j > MAX_ALLOWED_STRING_WIDTH) { - format_overflow_error(digstart); - goto error; + if (tvs != NULL) + { + format_overflow_error(digstart); + goto error; + } + else + j = MAX_ALLOWED_STRING_WIDTH; } if (j >= 0) @@ -3104,14 +3115,8 @@ vim_vsnprintf_typval( const char *digstart = p; unsigned int uj; - if (get_unsigned_int(digstart, &p, &uj) == FAIL) - goto error; - - if (uj > MAX_ALLOWED_STRING_WIDTH) - { - format_overflow_error(digstart); + if (get_unsigned_int(digstart, &p, &uj, tvs != NULL) == FAIL) goto error; - } min_field_width = uj; } @@ -3129,15 +3134,9 @@ vim_vsnprintf_typval( const char *digstart = p; unsigned int uj; - if (get_unsigned_int(digstart, &p, &uj) == FAIL) + if (get_unsigned_int(digstart, &p, &uj, tvs != NULL) == FAIL) goto error; - if (uj > MAX_ALLOWED_STRING_WIDTH) - { - format_overflow_error(digstart); - goto error; - } - precision = uj; } else if (*p == '*') @@ -3152,7 +3151,7 @@ vim_vsnprintf_typval( // positional argument unsigned int uj; - if (get_unsigned_int(digstart, &p, &uj) == FAIL) + if (get_unsigned_int(digstart, &p, &uj, tvs != NULL) == FAIL) goto error; arg_idx = uj; @@ -3170,8 +3169,13 @@ vim_vsnprintf_typval( if (j > MAX_ALLOWED_STRING_WIDTH) { - format_overflow_error(digstart); - goto error; + if (tvs != NULL) + { + format_overflow_error(digstart); + goto error; + } + else + j = MAX_ALLOWED_STRING_WIDTH; } if (j >= 0) diff --git a/src/testdir/test_spellfile.vim b/src/testdir/test_spellfile.vim index d8d954b3bf..8abb680622 100644 --- a/src/testdir/test_spellfile.vim +++ b/src/testdir/test_spellfile.vim @@ -845,6 +845,22 @@ func Test_spell_add_word() %bw! endfunc +func Test_spell_add_long_word() + set spell spellfile=./Xspellfile.add spelllang=en + + let word = repeat('a', 9000) + let v:errmsg = '' + " Spell checking doesn't really work for such a long word, + " but this should not cause an E1510 error. + exe 'spellgood ' .. word + call assert_equal('', v:errmsg) + call assert_equal([word], readfile('./Xspellfile.add')) + + set spell& spellfile= spelllang& encoding=utf-8 + call delete('./Xspellfile.add') + call delete('./Xspellfile.add.spl') +endfunc + func Test_spellfile_verbose() call writefile(['1', 'one'], 'XtestVerbose.dic', 'D') call writefile([], 'XtestVerbose.aff', 'D') diff --git a/src/version.c b/src/version.c index 4d9ba95218..f8d1762b84 100644 --- a/src/version.c +++ b/src/version.c @@ -704,6 +704,8 @@ static char *(features[]) = static int included_patches[] = { /* Add new patch number below this line */ +/**/ + 638, /**/ 637, /**/ From 0bee82b1d0a46a6ca6fb4ffcebd6a63d4141a355 Mon Sep 17 00:00:00 2001 From: Ken Takata Date: Mon, 29 Jul 2024 20:39:12 +0200 Subject: [PATCH 040/186] patch 9.1.0639: channel timeout may wrap around Problem: channel timeout may wrap around Solution: Correct timeout calculation when GetTickCount() wraps around (Ken Takata) closes: #15390 Signed-off-by: Ken Takata Signed-off-by: Christian Brabandt --- src/channel.c | 2 +- src/version.c | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/src/channel.c b/src/channel.c index b99b3a90ae..69bbff24e9 100644 --- a/src/channel.c +++ b/src/channel.c @@ -2277,7 +2277,7 @@ channel_parse_json(channel_T *channel, ch_part_T part) { int timeout; #ifdef MSWIN - timeout = GetTickCount() > chanpart->ch_deadline; + timeout = (int)(GetTickCount() - chanpart->ch_deadline) > 0; #else { struct timeval now_tv; diff --git a/src/version.c b/src/version.c index f8d1762b84..97414a08a3 100644 --- a/src/version.c +++ b/src/version.c @@ -704,6 +704,8 @@ static char *(features[]) = static int included_patches[] = { /* Add new patch number below this line */ +/**/ + 639, /**/ 638, /**/ From 3da011871a494ee5f3172278b6209afc6345fb5a Mon Sep 17 00:00:00 2001 From: Ken Takata Date: Mon, 29 Jul 2024 20:43:21 +0200 Subject: [PATCH 041/186] patch 9.1.0640: Mingw: Makefile can be improved Problem: Mingw: Makefile can be improved Solution: Reduce nesting level, directly check if the '-Wl,--entry' option is required (Ken Takata) closes: #15386 Signed-off-by: Ken Takata Signed-off-by: Christian Brabandt --- src/Make_cyg_ming.mak | 9 ++++----- src/version.c | 2 ++ 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/src/Make_cyg_ming.mak b/src/Make_cyg_ming.mak index 7c324fb64f..d3b04e813a 100644 --- a/src/Make_cyg_ming.mak +++ b/src/Make_cyg_ming.mak @@ -1140,15 +1140,14 @@ $(EXEOBJG): | $(OUTDIR) $(EXEOBJC): | $(OUTDIR) ifeq ($(VIMDLL),yes) - ifneq ($(COVERAGE),yes) - ifndef MZSCHEME - ifeq ($(ARCH),x86-64) + ifneq ($(findstring -nostdlib,$(EXELFLAGS)),) + # -Wl,--entry needs to be specified when -nostdlib is used. + ifeq ($(ARCH),x86-64) EXEENTRYC = -Wl,--entry=wmainCRTStartup EXEENTRYG = -Wl,--entry=wWinMainCRTStartup - else ifeq ($(ARCH),i686) + else ifeq ($(ARCH),i686) EXEENTRYC = -Wl,--entry=_wmainCRTStartup EXEENTRYG = -Wl,--entry=_wWinMainCRTStartup@0 - endif endif endif diff --git a/src/version.c b/src/version.c index 97414a08a3..53c1118937 100644 --- a/src/version.c +++ b/src/version.c @@ -704,6 +704,8 @@ static char *(features[]) = static int included_patches[] = { /* Add new patch number below this line */ +/**/ + 640, /**/ 639, /**/ From 011f2223e5df68f45a382f6a9dff6eaf5ecac346 Mon Sep 17 00:00:00 2001 From: Yinzuo Jiang Date: Mon, 29 Jul 2024 20:51:05 +0200 Subject: [PATCH 042/186] runtime(thrift): add ftplugin, indent and syntax scripts Problem: Apache Thrift files misses ftplugin, indent and syntax scripts Solution: - add ftplugin and indent scripts - add thrift indent test - port the syntax script from apache/thrift (Apache License 2) Reference: https://diwakergupta.github.io/thrift-missing-guide/#_language_reference closes: #15387 Signed-off-by: Yinzuo Jiang Signed-off-by: Christian Brabandt --- .github/MAINTAINERS | 3 ++ runtime/ftplugin/thrift.vim | 17 ++++++++ runtime/indent/testdir/thrift.in | 38 ++++++++++++++++ runtime/indent/testdir/thrift.ok | 38 ++++++++++++++++ runtime/indent/thrift.vim | 74 ++++++++++++++++++++++++++++++++ runtime/syntax/thrift.vim | 74 ++++++++++++++++++++++++++++++++ 6 files changed, 244 insertions(+) create mode 100644 runtime/ftplugin/thrift.vim create mode 100644 runtime/indent/testdir/thrift.in create mode 100644 runtime/indent/testdir/thrift.ok create mode 100644 runtime/indent/thrift.vim create mode 100644 runtime/syntax/thrift.vim diff --git a/.github/MAINTAINERS b/.github/MAINTAINERS index 47a1751702..966309dbee 100644 --- a/.github/MAINTAINERS +++ b/.github/MAINTAINERS @@ -261,6 +261,7 @@ runtime/ftplugin/tap.vim @petdance runtime/ftplugin/tcsh.vim @dkearns runtime/ftplugin/terraform.vim @JannoTjarks runtime/ftplugin/tf.vim @ribru17 +runtime/ftplugin/thrift.vim @jiangyinzuo runtime/ftplugin/tidy.vim @dkearns runtime/ftplugin/tmux.vim @ericpruitt runtime/ftplugin/toml.vim @averms @@ -355,6 +356,7 @@ runtime/indent/systemverilog.vim @Kocha runtime/indent/tcl.vim @dkearns runtime/indent/tcsh.vim @dkearns runtime/indent/teraterm.vim @k-takata +runtime/indent/thrift.vim @jiangyinzuo runtime/indent/typescript.vim @HerringtonDarkholme runtime/indent/typst.vim @gpanders runtime/indent/vroom.vim @dbarnett @@ -556,6 +558,7 @@ runtime/syntax/systemverilog.vim @Kocha runtime/syntax/tap.vim @petdance runtime/syntax/tcsh.vim @dkearns runtime/syntax/teraterm.vim @k-takata +runtime/syntax/thrift.vim @jiangyinzuo runtime/syntax/tidy.vim @dkearns runtime/syntax/tmux.vim @ericpruitt runtime/syntax/toml.vim @averms diff --git a/runtime/ftplugin/thrift.vim b/runtime/ftplugin/thrift.vim new file mode 100644 index 0000000000..dd18e19948 --- /dev/null +++ b/runtime/ftplugin/thrift.vim @@ -0,0 +1,17 @@ +" Vim filetype plugin file +" Language: Apache Thrift +" Maintainer: Yinzuo Jiang +" Last Change: 2024/07/29 + +if exists("b:did_ftplugin") + finish +endif + +let b:did_ftplugin = 1 + +" Thrift supports shell-style, C-style multi-line as well as single-line Java/C++ style comments. +" Reference: https://diwakergupta.github.io/thrift-missing-guide/#_language_reference +setlocal comments=sO:*\ -,mO:*\ \ ,exO:*/,s1:/*,mb:*,ex:*/,:///,://,b:# +setlocal commentstring=//\ %s + +let b:undo_ftplugin = 'setl comments< commentstring<' diff --git a/runtime/indent/testdir/thrift.in b/runtime/indent/testdir/thrift.in new file mode 100644 index 0000000000..7490dc8d30 --- /dev/null +++ b/runtime/indent/testdir/thrift.in @@ -0,0 +1,38 @@ +// vim: set ft=thrift sw=4 et: + +# START_INDENT +namespace cpp foo +namespace java com.foo.thrift + +include "Status.thrift" + +// These are supporting structs for JniFrontend.java, which serves as the glue +// between our C++ execution environment and the Java frontend. + +struct TSetSessionParams { + 1: required string user +} + +struct TAuthenticateParams { + 1: required string user + 2: required string passwd + 3: optional string host +4: optional string db_name + 5: optional list table_names; +} + +/* { + * xxxx + * } + */ +// TColumnDesc +struct TColumnDesc { + // { +4: optional string tableName +5: optional string columnDefault + // Let FE control the type, which makes it easier to modify and display complex types +6: optional string columnTypeStr // deprecated +7: optional string dataType + // } +} +# END_INDENT diff --git a/runtime/indent/testdir/thrift.ok b/runtime/indent/testdir/thrift.ok new file mode 100644 index 0000000000..9e2a48242b --- /dev/null +++ b/runtime/indent/testdir/thrift.ok @@ -0,0 +1,38 @@ +// vim: set ft=thrift sw=4 et: + +# START_INDENT +namespace cpp foo +namespace java com.foo.thrift + +include "Status.thrift" + +// These are supporting structs for JniFrontend.java, which serves as the glue +// between our C++ execution environment and the Java frontend. + +struct TSetSessionParams { + 1: required string user +} + +struct TAuthenticateParams { + 1: required string user + 2: required string passwd + 3: optional string host + 4: optional string db_name + 5: optional list table_names; +} + +/* { + * xxxx + * } + */ +// TColumnDesc +struct TColumnDesc { + // { + 4: optional string tableName + 5: optional string columnDefault + // Let FE control the type, which makes it easier to modify and display complex types + 6: optional string columnTypeStr // deprecated + 7: optional string dataType + // } +} +# END_INDENT diff --git a/runtime/indent/thrift.vim b/runtime/indent/thrift.vim new file mode 100644 index 0000000000..e0860e12a2 --- /dev/null +++ b/runtime/indent/thrift.vim @@ -0,0 +1,74 @@ +" Vim indent file +" Language: Apache Thrift +" Maintainer: Yinzuo Jiang +" Last Change: 2024/07/29 + +" Only load this indent file when no other was loaded. +if exists("b:did_indent") + finish +endif +let b:did_indent = 1 + +setlocal cindent +setlocal indentexpr=GetThriftIndent() + +let b:undo_indent = "set cindent< indentexpr<" + +" Only define the function once. +if exists("*GetThriftIndent") + finish +endif + +let s:keepcpo= &cpo +set cpo&vim + +function! SkipThriftBlanksAndComments(startline) + let lnum = a:startline + while lnum > 1 + let lnum = prevnonblank(lnum) + if getline(lnum) =~ '\*/\s*$' + while getline(lnum) !~ '/\*' && lnum > 1 + let lnum = lnum - 1 + endwhile + if getline(lnum) =~ '^\s*/\*' + let lnum = lnum - 1 + else + break + endif + elseif getline(lnum) =~ '^\s*\(//\|#\)' + let lnum = lnum - 1 + else + break + endif + endwhile + return lnum +endfunction + +function GetThriftIndent() + " Thrift is just like C; use the built-in C indenting and then correct a few + " specific cases. + let theIndent = cindent(v:lnum) + + " If we're in the middle of a comment then just trust cindent + if getline(v:lnum) =~ '^\s*\*' + return theIndent + endif + + let line = substitute(getline(v:lnum), '\(//\|#\).*$', '', '') + let previousNum = SkipThriftBlanksAndComments(v:lnum - 1) + let previous = substitute(getline(previousNum), '\(//\|#\).*$', '', '') + + let l:indent = indent(previousNum) + if previous =~ "{" && previous !~ "}" + let l:indent += shiftwidth() + endif + if line =~ "}" && line !~ "{" + let l:indent -= shiftwidth() + endif + return l:indent +endfunction + +let &cpo = s:keepcpo +unlet s:keepcpo + +" vim: sw=2 sts=2 et diff --git a/runtime/syntax/thrift.vim b/runtime/syntax/thrift.vim new file mode 100644 index 0000000000..502e98852a --- /dev/null +++ b/runtime/syntax/thrift.vim @@ -0,0 +1,74 @@ +" Vim syntax file +" Language: Thrift +" Original Author: Martin Smith +" Maintainer: Yinzuo Jiang +" Last Change: 2024/07/29 +" https://github.com/apache/thrift/blob/master/contrib/thrift.vim +" +" Licensed to the Apache Software Foundation (ASF) under one +" or more contributor license agreements. See the NOTICE file +" distributed with this work for additional information +" regarding copyright ownership. The ASF licenses this file +" to you under the Apache License, Version 2.0 (the +" "License"); you may not use this file except in compliance +" with the License. You may obtain a copy of the License at +" +" http://www.apache.org/licenses/LICENSE-2.0 +" +" Unless required by applicable law or agreed to in writing, +" software distributed under the License is distributed on an +" "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +" KIND, either express or implied. See the License for the +" specific language governing permissions and limitations +" under the License. +" + +if exists("b:current_syntax") + finish +endif + +" Todo +syn keyword thriftTodo TODO todo FIXME fixme XXX xxx contained + +" Comments +syn match thriftComment "#.*" contains=thriftTodo +syn region thriftComment start="/\*" end="\*/" contains=thriftTodo +syn match thriftComment "//.\{-}\(?>\|$\)\@=" + +" String +syn region thriftStringDouble matchgroup=None start=+"+ end=+"+ + +" Number +syn match thriftNumber "-\=\<\d\+\>" contained + +" Keywords +syn keyword thriftKeyword namespace +syn keyword thriftKeyword xsd_all xsd_optional xsd_nillable xsd_attrs +syn keyword thriftKeyword include cpp_include cpp_type const optional required +syn keyword thriftBasicTypes void bool byte i8 i16 i32 i64 double string binary +syn keyword thriftStructure map list set struct typedef exception enum throws union + +" Special +syn match thriftSpecial "\d\+:" + +" Structure +syn keyword thriftStructure service oneway extends +"async" { return tok_async; } +"exception" { return tok_xception; } +"extends" { return tok_extends; } +"throws" { return tok_throws; } +"service" { return tok_service; } +"enum" { return tok_enum; } +"const" { return tok_const; } + +hi def link thriftComment Comment +hi def link thriftKeyword Special +hi def link thriftBasicTypes Type +hi def link thriftStructure StorageClass +hi def link thriftTodo Todo +hi def link thriftString String +hi def link thriftNumber Number +hi def link thriftSpecial Special +hi def link thriftStructure Structure + +let b:current_syntax = "thrift" From baaf6deb957e11227c6ffa5e22b48d9082ae7e77 Mon Sep 17 00:00:00 2001 From: Ken Takata Date: Mon, 29 Jul 2024 20:57:19 +0200 Subject: [PATCH 043/186] patch 9.1.0641: MS-Windows: OLE enabled in console version Problem: MS-Windows: OLE enabled in console version, may cause hang (Linda_pp) Solution: Disable OLE for console version (Ken Takata) If VIMDLL was enabled, a message box for registering OLE might be shown even if Vim was executed in a console. (See #15372) Enabling OLE in a console is not so useful. Disable it. fixes: #15372 closes: #15385 Signed-off-by: Ken Takata Signed-off-by: Christian Brabandt --- src/gui_w32.c | 3 +++ src/version.c | 2 ++ 2 files changed, 5 insertions(+) diff --git a/src/gui_w32.c b/src/gui_w32.c index 721c4480d5..78f252a8b7 100644 --- a/src/gui_w32.c +++ b/src/gui_w32.c @@ -5522,6 +5522,9 @@ gui_mch_prepare(int *argc, char **argv) } #ifdef FEAT_OLE +# ifdef VIMDLL + if (mch_is_gui_executable()) +# endif { int bDoRestart = FALSE; diff --git a/src/version.c b/src/version.c index 53c1118937..8afbd01487 100644 --- a/src/version.c +++ b/src/version.c @@ -704,6 +704,8 @@ static char *(features[]) = static int included_patches[] = { /* Add new patch number below this line */ +/**/ + 641, /**/ 640, /**/ From 9d997addc7bd0fd132a809cf497ed816e61fcd25 Mon Sep 17 00:00:00 2001 From: zeertzjq Date: Mon, 29 Jul 2024 21:10:07 +0200 Subject: [PATCH 044/186] patch 9.1.0642: Check that mapping rhs starts with lhs fails if not simplified Problem: Check that mapping rhs starts with lhs doesn't work if lhs is not simplified. Solution: Keep track of the mapblock containing the alternative lhs and also compare with it (zeertzjq). fixes: #15376 closes: #15384 Signed-off-by: zeertzjq Signed-off-by: Christian Brabandt --- src/getchar.c | 24 +++++++++++++------ src/map.c | 46 ++++++++++++++++++++++++++---------- src/structs.h | 3 +++ src/testdir/test_mapping.vim | 43 +++++++++++++++++++++++++++++++++ src/version.c | 2 ++ 5 files changed, 99 insertions(+), 19 deletions(-) diff --git a/src/getchar.c b/src/getchar.c index 4af176978c..54222ec308 100644 --- a/src/getchar.c +++ b/src/getchar.c @@ -3156,6 +3156,7 @@ handle_mapping( int save_m_noremap; int save_m_silent; char_u *save_m_keys; + char_u *save_alt_m_keys; #else # define save_m_noremap mp->m_noremap # define save_m_silent mp->m_silent @@ -3204,6 +3205,7 @@ handle_mapping( save_m_noremap = mp->m_noremap; save_m_silent = mp->m_silent; save_m_keys = NULL; // only saved when needed + save_alt_m_keys = NULL; // only saved when needed /* * Handle ":map ": evaluate the {rhs} as an expression. Also @@ -3221,6 +3223,8 @@ handle_mapping( may_garbage_collect = FALSE; save_m_keys = vim_strsave(mp->m_keys); + save_alt_m_keys = mp->m_alt != NULL + ? vim_strsave(mp->m_alt->m_keys) : NULL; map_str = eval_map_expr(mp, NUL); // The mapping may do anything, but we expect it to take care of @@ -3278,15 +3282,20 @@ handle_mapping( noremap = save_m_noremap; else if ( #ifdef FEAT_EVAL - STRNCMP(map_str, save_m_keys != NULL ? save_m_keys : mp->m_keys, - (size_t)keylen) -#else - STRNCMP(map_str, mp->m_keys, (size_t)keylen) + save_m_expr ? + (save_m_keys != NULL + && STRNCMP(map_str, save_m_keys, (size_t)keylen) == 0) + || (save_alt_m_keys != NULL + && STRNCMP(map_str, save_alt_m_keys, + STRLEN(save_alt_m_keys)) == 0) : #endif - != 0) - noremap = REMAP_YES; - else + STRNCMP(map_str, mp->m_keys, (size_t)keylen) == 0 + || (mp->m_alt != NULL + && STRNCMP(map_str, mp->m_alt->m_keys, + STRLEN(mp->m_alt->m_keys)) == 0)) noremap = REMAP_SKIP; + else + noremap = REMAP_YES; i = ins_typebuf(map_str, noremap, 0, TRUE, cmd_silent || save_m_silent); #ifdef FEAT_EVAL @@ -3296,6 +3305,7 @@ handle_mapping( } #ifdef FEAT_EVAL vim_free(save_m_keys); + vim_free(save_alt_m_keys); #endif *keylenp = keylen; if (i == FAIL) diff --git a/src/map.c b/src/map.c index c416c0a327..91ab6e3f16 100644 --- a/src/map.c +++ b/src/map.c @@ -85,6 +85,8 @@ map_free(mapblock_T **mpp) mp = *mpp; vim_free(mp->m_keys); + if (mp->m_alt != NULL) + mp->m_alt->m_alt = NULL; vim_free(mp->m_str); vim_free(mp->m_orig_str); *mpp = mp->m_next; @@ -213,7 +215,7 @@ showmap( --map_locked; } - static int + static mapblock_T * map_add( mapblock_T **map_table, mapblock_T **abbr_table, @@ -236,7 +238,7 @@ map_add( mapblock_T *mp = ALLOC_CLEAR_ONE(mapblock_T); if (mp == NULL) - return FAIL; + return NULL; // If CTRL-C has been mapped, don't always use it for Interrupting. if (*keys == Ctrl_C) @@ -256,7 +258,7 @@ map_add( vim_free(mp->m_str); vim_free(mp->m_orig_str); vim_free(mp); - return FAIL; + return NULL; } mp->m_keylen = (int)STRLEN(mp->m_keys); mp->m_noremap = noremap; @@ -292,7 +294,7 @@ map_add( mp->m_next = map_table[n]; map_table[n] = mp; } - return OK; + return mp; } /* @@ -444,6 +446,7 @@ do_map( { char_u *keys; mapblock_T *mp, **mpp; + mapblock_T *mp_result[2] = {NULL, NULL}; char_u *rhs; char_u *p; int n; @@ -844,6 +847,8 @@ do_map( retval = 4; // no mem goto theend; } + if (mp->m_alt != NULL) + mp->m_alt = mp->m_alt->m_alt = NULL; vim_free(mp->m_str); mp->m_str = newstr; vim_free(mp->m_orig_str); @@ -858,6 +863,7 @@ do_map( mp->m_script_ctx = current_sctx; mp->m_script_ctx.sc_lnum += SOURCING_LNUM; #endif + mp_result[keyround - 1] = mp; did_it = TRUE; } } @@ -921,18 +927,25 @@ do_map( continue; // have added the new entry already // Get here when adding a new entry to the maphash[] list or abbrlist. - if (map_add(map_table, abbr_table, keys, rhs, orig_rhs, - noremap, nowait, silent, mode, abbrev, + mp_result[keyround - 1] = map_add(map_table, abbr_table, keys, + rhs, orig_rhs, noremap, nowait, silent, mode, abbrev, #ifdef FEAT_EVAL expr, /* sid */ 0, /* scriptversion */ 0, /* lnum */ 0, #endif - keyround1_simplified) == FAIL) + keyround1_simplified); + if (mp_result[keyround - 1] == NULL) { retval = 4; // no mem goto theend; } } + if (mp_result[0] != NULL && mp_result[1] != NULL) + { + mp_result[0]->m_alt = mp_result[1]; + mp_result[1]->m_alt = mp_result[0]; + } + theend: vim_free(keys_buf); vim_free(alt_keys_buf); @@ -2710,6 +2723,7 @@ f_mapset(typval_T *argvars, typval_T *rettv UNUSED) int nowait; char_u *arg; int dict_only; + mapblock_T *mp_result[2] = {NULL, NULL}; // If first arg is a dict, then that's the only arg permitted. dict_only = argvars[0].v_type == VAR_DICT; @@ -2806,12 +2820,20 @@ f_mapset(typval_T *argvars, typval_T *rettv UNUSED) do_map(MAPTYPE_UNMAP, arg, mode, is_abbr); vim_free(arg); - (void)map_add(map_table, abbr_table, lhsraw, rhs, orig_rhs, noremap, - nowait, silent, mode, is_abbr, expr, sid, scriptversion, lnum, 0); + mp_result[0] = map_add(map_table, abbr_table, lhsraw, rhs, orig_rhs, + noremap, nowait, silent, mode, is_abbr, expr, sid, + scriptversion, lnum, 0); if (lhsrawalt != NULL) - (void)map_add(map_table, abbr_table, lhsrawalt, rhs, orig_rhs, noremap, - nowait, silent, mode, is_abbr, expr, sid, scriptversion, - lnum, 1); + mp_result[1] = map_add(map_table, abbr_table, lhsrawalt, rhs, orig_rhs, + noremap, nowait, silent, mode, is_abbr, expr, sid, + scriptversion, lnum, 1); + + if (mp_result[0] != NULL && mp_result[1] != NULL) + { + mp_result[0]->m_alt = mp_result[1]; + mp_result[1]->m_alt = mp_result[0]; + } + vim_free(arg_buf); } #endif diff --git a/src/structs.h b/src/structs.h index 32c35b7bf5..fe4704a367 100644 --- a/src/structs.h +++ b/src/structs.h @@ -1309,6 +1309,9 @@ typedef struct mapblock mapblock_T; struct mapblock { mapblock_T *m_next; // next mapblock in list + mapblock_T *m_alt; // pointer to mapblock of the same mapping + // with an alternative form of m_keys, or NULL + // if there is no such mapblock char_u *m_keys; // mapped from, lhs char_u *m_str; // mapped to, rhs char_u *m_orig_str; // rhs as entered by the user diff --git a/src/testdir/test_mapping.vim b/src/testdir/test_mapping.vim index 1175310465..654a6734e2 100644 --- a/src/testdir/test_mapping.vim +++ b/src/testdir/test_mapping.vim @@ -1767,6 +1767,49 @@ func Test_unmap_simplifiable() unmap endfunc +" Test that the first byte of rhs is not remapped if rhs starts with lhs. +func Test_map_rhs_starts_with_lhs() + new + func MapExpr() + return "\\" + endfunc + + for expr in [v:false, v:true] + if expr + imap MapExpr() + else + imap + endif + + for restore in [v:false, v:true] + if restore + let saved = maparg('', 'i', v:false, v:true) + iunmap + call mapset(saved) + endif + + let @a = 'foo' + call feedkeys("S\a", 'tx') + call assert_equal('foo', getline('.')) + + let @a = 'bar' + call feedkeys("S\<*C-R>a", 'tx') + call assert_equal('bar', getline('.')) + endfor + endfor + + " When two mappings are used for and , remapping should work. + imap bar + imap foo + call feedkeys("S\", 'xt') + call assert_equal('foo', getline('.')) + call feedkeys("S\<*C-I>", 'xt') + call assert_equal('foobar', getline('.')) + + delfunc MapExpr + bwipe! +endfunc + func Test_expr_map_escape_special() nnoremap … let g:got_ellipsis += 1 func Func() diff --git a/src/version.c b/src/version.c index 8afbd01487..153685953a 100644 --- a/src/version.c +++ b/src/version.c @@ -704,6 +704,8 @@ static char *(features[]) = static int included_patches[] = { /* Add new patch number below this line */ +/**/ + 642, /**/ 641, /**/ From 1254e6db8360fac99561ef0f10ac3cb1bfef30b1 Mon Sep 17 00:00:00 2001 From: Christian Brabandt Date: Mon, 29 Jul 2024 21:19:51 +0200 Subject: [PATCH 045/186] patch 9.1.0643: terminal: cursor may end up on invalid position Problem: terminal: cursor may end up on invalid position after reducing the scrollback lines (user202729) Solution: After reducing the scrollback size, check the cursor position, making sure it does not end up on an invalid line fixes: #15351 Signed-off-by: Christian Brabandt --- src/terminal.c | 4 ++++ src/version.c | 2 ++ 2 files changed, 6 insertions(+) diff --git a/src/terminal.c b/src/terminal.c index c681f3a432..1fc0ef9688 100644 --- a/src/terminal.c +++ b/src/terminal.c @@ -3451,6 +3451,10 @@ limit_scrollback(term_T *term, garray_T *gap, int update_buffer) sizeof(sb_line_T) * gap->ga_len); if (update_buffer) term->tl_scrollback_scrolled -= todo; + + // make sure cursor is on a valid line + if (curbuf == term->tl_buffer) + check_cursor(); } /* diff --git a/src/version.c b/src/version.c index 153685953a..bfcb7bf8e3 100644 --- a/src/version.c +++ b/src/version.c @@ -704,6 +704,8 @@ static char *(features[]) = static int included_patches[] = { /* Add new patch number below this line */ +/**/ + 643, /**/ 642, /**/ From e6471b415b6b56f89624e6e0a6b7a17502109d0c Mon Sep 17 00:00:00 2001 From: Yinzuo Jiang Date: Tue, 30 Jul 2024 18:15:30 +0200 Subject: [PATCH 046/186] runtime(cuda): source c and cpp ftplugins closes: #15383 Signed-off-by: Yinzuo Jiang Signed-off-by: Riley Bruins Signed-off-by: Christian Brabandt --- runtime/ftplugin/cuda.vim | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) diff --git a/runtime/ftplugin/cuda.vim b/runtime/ftplugin/cuda.vim index 8770bdb674..91d722b649 100644 --- a/runtime/ftplugin/cuda.vim +++ b/runtime/ftplugin/cuda.vim @@ -1,16 +1,11 @@ " Vim filetype plugin " Language: CUDA " Maintainer: Riley Bruins -" Last Change: 2024 Jul 06 +" Last Change: 2024 Jul 29 if exists('b:did_ftplugin') finish endif -let b:did_ftplugin = 1 -" Set 'comments' to format dashed lists in comments. -" Also include ///, used for Doxygen. -setlocal comments=sO:*\ -,mO:*\ \ ,exO:*/,s1:/*,mb:*,ex:*/,:///,:// -setlocal commentstring=//\ %s - -let b:undo_ftplugin = 'setl com< cms<' +" Behaves mostly just like C++ +runtime! ftplugin/cpp.vim From c4be066817d560c870f67f1593630cfb5b39dfc8 Mon Sep 17 00:00:00 2001 From: Damien <141588647+xrandomname@users.noreply.github.com> Date: Tue, 30 Jul 2024 19:14:35 +0200 Subject: [PATCH 047/186] runtime(zip): Opening a remote zipfile don't work Problem: Opening a zipfile from HTTP gives an empty buffer. Solution: Ensure that the magic bytes check does not skip protocol processing. Also use readblob() and remove commented out lines. closes: #15396 Signed-off-by: Damien <141588647+xrandomname@users.noreply.github.com> Signed-off-by: Christian Brabandt --- runtime/autoload/zip.vim | 20 ++++++-------------- 1 file changed, 6 insertions(+), 14 deletions(-) diff --git a/runtime/autoload/zip.vim b/runtime/autoload/zip.vim index 79f707fbd8..f77d729f03 100644 --- a/runtime/autoload/zip.vim +++ b/runtime/autoload/zip.vim @@ -1,6 +1,6 @@ " zip.vim: Handles browsing zipfiles " AUTOLOAD PORTION -" Date: Jul 24, 2024 +" Date: Jul 30, 2024 " Version: 33 " Maintainer: This runtime file is looking for a new maintainer. " Former Maintainer: Charles E Campbell @@ -8,6 +8,7 @@ " 2024 Jun 16 by Vim Project: handle whitespace on Windows properly (#14998) " 2024 Jul 23 by Vim Project: fix 'x' command " 2024 Jul 24 by Vim Project: use delete() function +" 2024 Jul 20 by Vim Project: fix opening remote zipfile " License: Vim License (see vim's :help license) " Copyright: Copyright (C) 2005-2019 Charles E. Campbell {{{1 " Permission is hereby granted to use and distribute this code, @@ -73,15 +74,11 @@ endif " --------------------------------------------------------------------- " zip#Browse: {{{2 fun! zip#Browse(zipfile) -" call Dfunc("zip#Browse(zipfile<".a:zipfile.">)") - " sanity check: insure that the zipfile has "PK" as its first two letters - " (zipped files have a leading PK as a "magic cookie") - if !filereadable(a:zipfile) || readfile(a:zipfile, "", 1)[0] !~ '^PK' - exe "noswapfile noautocmd noswapfile e ".fnameescape(a:zipfile) -" call Dret("zip#Browse : not a zipfile<".a:zipfile.">") + " sanity check: ensure that the zipfile has "PK" as its first two letters + " (zip files have a leading PK as a "magic cookie") + if filereadable(a:zipfile) && readblob(a:zipfile, 0, 2) != 0z50.4B + exe "noswapfile noautocmd e " .. fnameescape(a:zipfile) return -" else " Decho -" call Decho("zip#Browse: a:zipfile<".a:zipfile."> passed PK test - it's a zip file") endif let repkeep= &report @@ -97,9 +94,7 @@ fun! zip#Browse(zipfile) if !executable(g:zip_unzipcmd) redraw! echohl Error | echo "***error*** (zip#Browse) unzip not available on your system" -" call inputsave()|call input("Press to continue")|call inputrestore() let &report= repkeep -" call Dret("zip#Browse") return endif if !filereadable(a:zipfile) @@ -107,13 +102,10 @@ fun! zip#Browse(zipfile) " if it's an url, don't complain, let url-handlers such as vim do its thing redraw! echohl Error | echo "***error*** (zip#Browse) File not readable<".a:zipfile.">" | echohl None -" call inputsave()|call input("Press to continue")|call inputrestore() endif let &report= repkeep -" call Dret("zip#Browse : file<".a:zipfile."> not readable") return endif -" call Decho("passed sanity checks") if &ma != 1 set ma endif From 74011dc1fa7bca6c901937173a42e0edce68e080 Mon Sep 17 00:00:00 2001 From: zeertzjq Date: Tue, 30 Jul 2024 19:17:56 +0200 Subject: [PATCH 048/186] patch 9.1.0644: Unnecessary STRLEN() when applying mapping Problem: Unnecessary STRLEN() when applying mapping. (after v9.1.0642) Solution: Use m_keylen and vim_strnsave(). (zeertzjq) closes: #15394 Signed-off-by: zeertzjq Signed-off-by: Christian Brabandt --- src/getchar.c | 11 +++++++---- src/testdir/test_mapping.vim | 4 ++-- src/version.c | 2 ++ 3 files changed, 11 insertions(+), 6 deletions(-) diff --git a/src/getchar.c b/src/getchar.c index 54222ec308..29323fa328 100644 --- a/src/getchar.c +++ b/src/getchar.c @@ -3157,6 +3157,7 @@ handle_mapping( int save_m_silent; char_u *save_m_keys; char_u *save_alt_m_keys; + int save_alt_m_keylen; #else # define save_m_noremap mp->m_noremap # define save_m_silent mp->m_silent @@ -3206,6 +3207,7 @@ handle_mapping( save_m_silent = mp->m_silent; save_m_keys = NULL; // only saved when needed save_alt_m_keys = NULL; // only saved when needed + save_alt_m_keylen = mp->m_alt != NULL ? mp->m_alt->m_keylen : 0; /* * Handle ":map ": evaluate the {rhs} as an expression. Also @@ -3222,9 +3224,10 @@ handle_mapping( vgetc_busy = 0; may_garbage_collect = FALSE; - save_m_keys = vim_strsave(mp->m_keys); + save_m_keys = vim_strnsave(mp->m_keys, (size_t)mp->m_keylen); save_alt_m_keys = mp->m_alt != NULL - ? vim_strsave(mp->m_alt->m_keys) : NULL; + ? vim_strnsave(mp->m_alt->m_keys, + (size_t)save_alt_m_keylen) : NULL; map_str = eval_map_expr(mp, NUL); // The mapping may do anything, but we expect it to take care of @@ -3287,12 +3290,12 @@ handle_mapping( && STRNCMP(map_str, save_m_keys, (size_t)keylen) == 0) || (save_alt_m_keys != NULL && STRNCMP(map_str, save_alt_m_keys, - STRLEN(save_alt_m_keys)) == 0) : + (size_t)save_alt_m_keylen) == 0) : #endif STRNCMP(map_str, mp->m_keys, (size_t)keylen) == 0 || (mp->m_alt != NULL && STRNCMP(map_str, mp->m_alt->m_keys, - STRLEN(mp->m_alt->m_keys)) == 0)) + (size_t)mp->m_alt->m_keylen) == 0)) noremap = REMAP_SKIP; else noremap = REMAP_YES; diff --git a/src/testdir/test_mapping.vim b/src/testdir/test_mapping.vim index 654a6734e2..064f8ac25b 100644 --- a/src/testdir/test_mapping.vim +++ b/src/testdir/test_mapping.vim @@ -1789,11 +1789,11 @@ func Test_map_rhs_starts_with_lhs() endif let @a = 'foo' - call feedkeys("S\a", 'tx') + call assert_nobeep('call feedkeys("S\a", "tx")') call assert_equal('foo', getline('.')) let @a = 'bar' - call feedkeys("S\<*C-R>a", 'tx') + call assert_nobeep('call feedkeys("S\<*C-R>a", "tx")') call assert_equal('bar', getline('.')) endfor endfor diff --git a/src/version.c b/src/version.c index bfcb7bf8e3..a2662861e3 100644 --- a/src/version.c +++ b/src/version.c @@ -704,6 +704,8 @@ static char *(features[]) = static int included_patches[] = { /* Add new patch number below this line */ +/**/ + 644, /**/ 643, /**/ From df9f67e10d214e0124f2141f59593529801307a4 Mon Sep 17 00:00:00 2001 From: Christian Brabandt Date: Tue, 30 Jul 2024 20:19:15 +0200 Subject: [PATCH 049/186] runtime(html): update syntax script to sync by 250 minlines by default closes: #14071 Signed-off-by: Christian Brabandt --- runtime/doc/syntax.txt | 6 +++++- runtime/syntax/html.vim | 3 ++- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/runtime/doc/syntax.txt b/runtime/doc/syntax.txt index 2f8d9505c4..9449b75774 100644 --- a/runtime/doc/syntax.txt +++ b/runtime/doc/syntax.txt @@ -1,4 +1,4 @@ -*syntax.txt* For Vim version 9.1. Last change: 2024 Jul 25 +*syntax.txt* For Vim version 9.1. Last change: 2024 Jul 30 VIM REFERENCE MANUAL by Bram Moolenaar @@ -1908,6 +1908,10 @@ You can also disable this rendering by adding the following line to your vimrc file: > :let html_no_rendering=1 +By default Vim synchronises the syntax to 250 lines before the first displayed +line. This can be configured using: > + :let html_minlines = 500 +< HTML comments are rather special (see an HTML reference document for the details), and the syntax coloring scheme will highlight all errors. However, if you prefer to use the wrong style (starts with