Compare commits

...

21 Commits

Author SHA1 Message Date
Muraoka Taro
de37e7430a patch 9.1.2009: tests: "Xm4" test directory may not be deleted
Problem:  tests: "Xm4" test directory may not be deleted
Solution: Use "R" flag with mkdir() call to have the directory
          recursively deleted at the end of function Test_m4_format()
          (Muraoka Taro)

Test_m4_format in test_filetype.vim creates the "Xm4" directory with the
'D' flag. Then it creates two files in the "Xm4" directory. One of them,
"alocal.m4," was created with the 'D' flag, so it will disappear after
the test is complete. However, the other, "configure.ac," was created
without any flags, so it will remain even after the test is complete.
Because the parent directory "Xm4" was created with the 'D' flag, the
latter "configure.ac" remains and is not empty, so it will not be
deleted.

This forces the directory to be deleted regardless of its contents. As a
result, the two files "alocal.m4" and "configure.ac" created in the
directory are no longer needed, so they have been deleted.

closes: #18995

Signed-off-by: Muraoka Taro <koron.kaoriya@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-12-22 18:33:50 +00:00
Ambrus Tóth
9c9982240a patch 9.1.2008: filetype: hylo files are not recognized
Problem:  filetype: hylo files are not recognized
Solution: Detect *.hylo files as hylo filetype (Ambrus Tóth)

References:
- https://hylo-lang.org/

closes: #18994

Signed-off-by: Ambrus Tóth <ping@ambrus.dev>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-12-22 18:26:52 +00:00
Ivan Pešić
b571034a8f translation(sr): Update Serbian message translation
closes: #18993

Signed-off-by: Ivan Pešić <27575106+eevan78@users.noreply.github.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-12-22 18:21:01 +00:00
Stanislaw Gruszka
f2814754c0 patch 9.1.2007: filetype: bpftrace hashbang lines are not recognized
Problem:    bpftrace files are not recognized from the hashbang line.
Solution:   Add a hashbang check (Stanislaw Gruszka)

closes: #18992

Signed-off-by: Stanislaw Gruszka <stf_xl@wp.pl>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-12-22 18:17:36 +00:00
Muraoka Taro
86855ea8ee patch 9.1.2006: MS-Windows: ANSI colors not correct in terminal
Problem:  ANSI escape colors are not displayed correctly in
          non-termguicolors in vim (cli) on Windows. The red and blue
          channels seem to be swapped.
Cause:    When converting VTerm ANSI index colors to cterm colors in
          terminal.c, the Windows case equivalent to NR-16 (:help
          cterm-colors) is ignored.
Solution: Created and used a table to convert ANSI indexed colors to
          cterm's NR-16 representation (Windows only). This table
          corresponds to the inverse conversion of cterm_ansi_idx in
          term.c. The values in both tables are exactly the same, but
          the meanings are opposite, so they are separate tables
          (Muraoka Taro).

closes: #18931

Signed-off-by: Muraoka Taro <koron.kaoriya@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-12-21 19:45:02 +00:00
Doug Kearns
3913f13a7d runtime(doc): Improve :help builtin-function-list table formatting
- Start each field at the correct tabstop - on a new line if required.
- Use "Type1/Type2" for return types rather than "Type1 or Type2",
  matching the dominant style.
- Convert hyperlinked Ex commands to command markup, `:cmd`.
- Wrap overlong lines.

closes: #18438

Signed-off-by: Doug Kearns <dougkearns@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-12-21 19:37:10 +00:00
Mao-Yining
49e0f833dd patch 9.1.2005: MS-Windows: Missing fullscreen support for GUI version
Problem:  MS-Windows: Missing fullscreen support for GUI version
Solution: Add "s" flag to guioptions (Mao-Yining)

- Implement fullscreen mode controlled by the 'go-s' flag in 'guioptions'
- Update documentation with usage examples and platform-specific details

See :help 'go-s' and :help gui-w32-fullscreen for complete documentation.

closes: #18836

Signed-off-by: Mao-Yining <101858210+mao-yining@users.noreply.github.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-12-21 19:33:53 +00:00
Muraoka Taro
bd686d85dc patch 9.1.2004: MS-Windows: executable() cannot find file in directory with single char
Problem:  MS-Windows: If a directory with a single character name is
          included in the PATH environment variable without a trailing
          path separator, executable() will not be able to find the
          executable file under it.
Solution: The second argument of the after_pathsep() function is now
          passed the next pointer where a path separator may exist
          (Muraoka Taro).

As a specific example, the default installation path for PowerShell v7
is "C:\Program Files\PowerShell\7", but if you set this as is in the
PATH environment variable, Vim will not be able to find the pwsh.exe
command. In this case, Vim will try to search for "C:\Program
Files\PowerShell\7pwsh.exe".

Cause: The after_pathsep() function determines whether the location
passed as its second argument immediately follows a path separator.
However, in the code where the problem occurred, the second argument was
passed a location that might contain a path separator. As a result, it
was mistakenly determined that a path separator was present in cases
where the final directory name was a single character and not followed
by a path separator, and the path to search was incorrect.

closes: #18979

Signed-off-by: Muraoka Taro <koron.kaoriya@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-12-21 19:19:39 +00:00
Konfekt
e09ff34129 runtime(ty): include ty compiler plugin
closes: #18960

Signed-off-by: Konfekt <Konfekt@users.noreply.github.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-12-21 19:17:14 +00:00
Muraoka Taro
fa2fca1ebf patch 9.1.2003: tests: Test_glob_symlinks may fail on Window
Problem:  tests: Test_glob_symlinks may fail on Windows with UCRT
          runtime
Solution: Comment out the code, do not use _wstat().
          (author)

For Test_glob_symlinks() to succeed, vim_stat() (which is actually
mswin_stat_impl()) must fail on empty symlinks.  When the dynamically
linked C runtime is linked, _wstat() succeeds even on empty symbolic
links. As a result, Test_glob_symlinks() fails.

For details, see here:
https://github.com/koron/vc-stat-behavior-verification

closes: #18962

Signed-off-by: Muraoka Taro <koron.kaoriya@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-12-21 19:09:20 +00:00
Yegappan Lakshmanan
c1d77520b8 patch 9.1.2002: Vim9: heap-use-after-free when when accessing protect class member
Problem:  Vim9: heap-use-after-free when when accessing protect class
          member (Foxe Chen)
Solution: Set cl->class_type_list and return directly, add tests for
          using protected class method and variable from another class
          (Yegappan Lakshmanan).

closes: #18971

Signed-off-by: Yegappan Lakshmanan <yegappan@yahoo.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-12-21 19:03:31 +00:00
Mao-Yining
8de7fd0c20 refactor(vim9): use 'start' open urls on win32
- Use `:!start` directly, discard the using of `explorer.exe`.
- Update the document in `eval.txt`.

closes: #18985

Signed-off-by: Mao-Yining <mao.yining@outlook.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-12-21 18:59:48 +00:00
Mao-Yining
3255b8a556 runtime(vim9): Reset pwsh and powershell in Open()
relates: #17995
closes:  #18986

Signed-off-by: Mao-Yining <mao.yining@outlook.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-12-21 18:45:26 +00:00
gagik
d57b4a3681 translation(hy): Update Armenian language translation
closes: #18990

Signed-off-by: gagik <hakgagik@yahoo.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-12-21 18:42:18 +00:00
Mateo Gjika
83fd754150 runtime(openPlugin): start :Launch process in the background in GUI mode
fixes:  #18977
closes: #18981

Signed-off-by: Mateo Gjika <104777599+mateoxh@users.noreply.github.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-12-21 09:47:38 +00:00
Mao-Yining
2387c49f6e translation(zh_CN): Add license disclaimer
Added disclaimer to clarify that the Chinese translation is for
reference only and is not legally binding. The original English version
of the license is the sole authoritative text. No liability is accepted
for any ambiguities or errors arising from the translation.

closes: #18980

Signed-off-by: Mao-Yining <mao.yining@outlook.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-12-20 18:29:16 +00:00
Muraoka Taro
6ec7d40b7c runtime(getscript): GLVS plugin fails with wget.exe with PowerShell
Problem:  Only Windows: The GLVS plugin fails in a PowerShell Desktop if
          wget.exe is installed. The PowerShell Desktop has an alias
          called wget which hides wget.exe.
Solution: Force .exe extension if wget.exe is available.

closes: #18987

Signed-off-by: Muraoka Taro <koron.kaoriya@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-12-20 18:13:18 +00:00
Doug Kearns
a820a4540d runtime(doc): Fix "Vim script" formatting at :help clipboard-providers
closes: #18966

Signed-off-by: Doug Kearns <dougkearns@gmail.com>
Signed-off-by: Hirohito Higashi <h.east.727@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-12-20 17:39:32 +00:00
glepnir
b43f9ded7e patch 9.1.2001: cursor may end up in wrong window after :botright copen
Problem:  After :botright copen and closing the quikfix window, the
          cursor ends up in the wrong window. The problem is fr_child
          always points to the first (leftmost for FR_ROW, topmost for
          FR_COL) child frame. When do :vsplit, the new window is
          created on the left, and frame_insert() updates the parent's
          fr_child to point to this new left window.
Solution: Create a snapshot before open the quickfix window and restore
          it when close it (glepnir).

closes: #18961

Signed-off-by: glepnir <glephunter@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-12-20 17:26:39 +00:00
Christian Brabandt
64799a5080 runtime(doc): clarify the behavior of CTRL-Z
fixes: #18975

Co-authored-by: zeertzjq <zeertzjq@outlook.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-12-20 16:54:07 +00:00
zoumi
1a4a1b9fa6 runtime(zip): Use :lcd instead of :cd in zip.vim
closes: #18967

Signed-off-by: zoumi <zoumi@users.noreply.github.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-12-20 16:25:16 +00:00
38 changed files with 890 additions and 313 deletions

View File

@@ -1,52 +1,60 @@
VIM 使用许可协议
注意: 本译文仅供参考。若因译文错漏引发任何问题译者概不承担责任。VIM 许可证的
完整英文版本为唯一法律依据。如有任何疑问,以英文原文为准。
I) 任何人均可不受限制地分发未经修改的 Vim 软件完整副本,但须在该等副本中包含本
许可协议全文。您亦可分发未经修改的 Vim 软件组成部分,该等分发行为同样不受限
制,惟仍须包含本许可协议全文。您还可随附基于未经修改的 Vim 源代码编译而成的
可执行文件、您自行编写的使用范例以及 Vim 脚本文件。
VIM 许可证
II) 在同时满足下列四项条件的前提下,(或扩展)的 Vim 软件版本(包括可执行文件、
源代码或二者兼具):
1) 必须完整包含未经任何改动的本许可协议文本
2) 经修改的 Vim 软件必须通过以下五种方式之一进行分发:
a) 如您对 Vim 软件自行实施修改,必须在分发材料中明确标注有效的联系方式。
当 Vim 维护者以任何形式向您索要您所分发的修改版副本时,您必须无偿向该
维护者提供全部修改内容(含源代码)。维护者保留将您的修改成果纳入 Vim
官方版本的权利。维护者将如何处置您的修改成果以及该等成果遵循何种许可协
议进行分发,均属可协商事项。若双方未达成特别约定,则您的修改内容自动适
用本协议或其后续版本。当前维护团队名单载于https://github.com/orgs/vim/people。
若前述信息发生变更,将通过适当渠道(通常为 vim.sf.net、www.vim.org 及/
或 comp.editors予以公告。当客观上完全无法联系到维护者时您向其提交
修改成果的义务即告终止。维护者确认收到修改成果后,您无需重复提交。
b) 如您获得依据本条第 a) 款方式分发的修改版 Vim可依照 I) 之规定继续分发
其未经改动的版本。若您在该版本基础上实施新的修改,则 a) 款相关规定对该
等新增修改同样适用。
c) 在您分发的每一份修改版 Vim 副本中,均需提供所有修改内容,包括源代码。
可采取上下文差异补丁等形式提供。您可自主选择适用于新增代码的许可协议。
该等修改内容及其所附许可协议不得限制其他使用者对 Vim 官方版本进行自主
修改。
d) 若您持有的修改版 Vim 包含符合本条第 c) 款特征的修改内容,在同时满足下
列三项条件时,可不提供修改部分的源代码进行分发:
- 适用于该修改内容的许可协议明确允许您无偿且无限制地向 Vim 维护者分发
该修改,并允许维护者无偿且无限制地将其纳入 Vim 官方版本;
- 您需自最后一次分发对应修改版 Vim 之日起,将修改内容至少保存三年。在
此期间,若维护者或任何从您处获得该修改版的人员向您索要修改内容,您必
须及时提供;
- 您必须在分发材料中明确标注有效的联系方式。该联系方式自最后一次分发对
应的修改版 Vim 后至少三年内保持有效,并应尽可能长期维持。
e) 若 GNU 通用公共许可证GPL适用于修改内容您可依据 GNU GPL 第二版或
其任何后续版本的规定分发修改后的 Vim 软件。
3) 必须至少在 ":version" 命令输出界面及软件启动画面中添加显著声明,以确保修
改版 Vim 的用户能够知悉该软件已被修改。依据本条第 2 款 e) 项规定进行分发
时,仅在所添加声明不与修改内容所适用许可协议相冲突的前提下,方须履行此项
声明添加义务。
4) 本条第 2 款 a) 项与 d) 项要求的联系方式不得被删除或篡改,但联系人本人可对
其进行修正更新。
I) 可以任意发布没有修改的 Vim 的拷贝,但是必须保证包含本许可证。您也可以发布
未经修改的部分 Vim同样也必须包含这份许可证。发布由未经修改的 Vim 源代码
所编译出的 Vim 可执行文件,外加您自己的应用实例和 Vim 脚本也是允许的
III) 如果您分发修改版的 Vim采用本协议作为其修改内容的许可依据并将其包括源
代码)提供给维护者。首选方式是通过电子邮件或将文件上传至服务器并通过电子邮
件发送 URL 地址。如果修改量较小(例如,修改过的 Makefile通过电子邮件发
送上下文差异补丁即可。应使用的电子邮件地址为 <maintainer@vim.org>。
II) 在满足以下全部四个条件的前提下,您可以发布经过修改 (或扩充) 的 Vim 版本,
包括可执行文件 和/或 源代码:
1) 本许可证必须包含在内,并且不能被修改。
2) 经过修改的 Vim 必须以下述五种方式之一发布:
a) 如果您本人对 Vim 做了改动,您必须在发布版本里清楚地说明如何与您联系。
当 Vim 的维护者 (以任何方式) 向您索取您所发布的 Vim 时,您必须把所做
的改动包括源代码无偿地提供出来。维护者保留把这些改动加入 Vim 正式版本
的权利。至于维护者怎样处理这些改动,以及用什么许可证发布,可以协商。
如果没有协商,那么,本许可证,或者它更新的版本,同样适用于您做出的改
动。Vim 现在的几位维护者可见:
https://github.com/orgs/vim/people
如果维护者发生变动,会在合适的地方 (很可能是 vim.sf.net、www.vim.org
和/或 comp.editors) 公布,当完全不能与维护者联系时,发送变更的约定自
动终止。一旦维护者确认收到了您所做的修改,您就不必再次发送了。
IV) 严禁从 Vim 源代码及其组成部分或任何修改版本的分发材料中移除本许可协议。您有
权选择将本协议适用于既往发布的 Vim 版本,以替代其原始随附的许可协议。
b) 如果您得到的是一个修改过的 Vim并且它是在条件 a) 下发布的,那么您可
以不加改动地在条件 I) 下发布它;如果您又做了额外的改动,则这些改动受
到 a) 款条文的约束。
c) 在您发布的经过修改的 Vim 的每一份拷贝里,提供所有的变更部分,包括源代
码。提供的形式可以采用上下文风格的差异比较记录 (context diff)。您可以
为添加的新代码选择许可证,但是这些更改和为其选择的许可证不能限制他人
对 Vim 正式版本作出自己的改动。
d) 在满足以下全部三个条件的前提下,您可以继续发布带有条件 c) 所提及之变
更的经过修改的 Vim而不必在发布时提供更改部分的源代码:
- 这些变更所附带的许可证允许您把这些变更无偿地并且没有任何限制地提供
给 Vim 的维护者,而且允许 Vim 的维护者无偿地并且没有任何限制地把这
些更改加入到 Vim 的正式版本中。
- 从您最后一次发布更改的 Vim 之日起,您要保存这些改动至少三年时间。在
这期间,维护者或别人 (以任何方式) 向您要求提供这些变更时,您必须提
供给他。
- 您要在发布版本中清楚地说明如何与您联系,这个联系方式必须保证自最后
一次发布相应的经过修改的 Vim 之日起至少三年有效,或尽可能长。
e) 当这些变更以 GPL (GNU General Public LicenseGNU 通用公共许可证) 发
布时,您可以在 GPL 版本 2或更高版本的 GPL 下发布修改过的 Vim。
3) 必须添加一条改动的信息。至少要放在 "version" 命令的输出和启动画面里,好
让用户知道自己用的是一个修改过的 Vim。当以 2)e) 条件发布时,只有不与变
更适用的许可证冲突,这个信息的添加才是必要的。
4) 在 2)a) 和 2)d) 条件里要求的联系方式不能随便更改或删除,除非是作者自己
作出的更正。
III) 如果您发布一个更改过的 Vim强烈建议您对变更部分使用 Vim 的许可证,并且对
维护者提供变更部分并开放源代码。最好的方式是通过电子邮件或者把文件放到服
务器上,通过电子邮件传送 URL。如果只修改了很少的部分 (例如,只是一个修改
过的 Makefile),那么传送一个上下文风格的差异比较记录 (context diff) 就可
以了。电子邮件的地址是 <maintainer@vim.org>
IV) 不允许从 Vim 的源代码的发行版本或其中部分的源代码里删除本许可证,即使来自
更改过的版本也是如此。您可能想用这份许可证代替以前版本的 Vim 里的许可证,
这可以由您自行决定。

View File

@@ -3,7 +3,7 @@ vim9script
# Vim functions for file type detection
#
# Maintainer: The Vim Project <https://github.com/vim/vim>
# Last Change: 2025 Dec 14
# Last Change: 2025 Dec 22
# Former Maintainer: Bram Moolenaar <Bram@vim.org>
# These functions are moved here from runtime/filetype.vim to make startup
@@ -2118,6 +2118,8 @@ const ft_from_ext = {
"tmpl": "template",
# Hurl
"hurl": "hurl",
# Hylo
"hylo": "hylo",
# Hyper Builder
"hb": "hb",
# Httest

View File

@@ -4,7 +4,7 @@ vim9script
# Invoked from "scripts.vim" in 'runtimepath'
#
# Maintainer: The Vim Project <https://github.com/vim/vim>
# Last Change: 2025 Aug 09
# Last Change: 2025 Dec 22
# Former Maintainer: Bram Moolenaar <Bram@vim.org>
export def DetectFiletype()
@@ -233,6 +233,10 @@ export def Exe2filetype(name: string, line1: string): string
elseif name =~ '^execlineb\>'
return 'execline'
# Bpftrace
elseif name =~ '^bpftrace\>'
return 'bpftrace'
# Vim
elseif name =~ '^vim\>'
return 'vim'

View File

@@ -3,7 +3,7 @@ vim9script
# Vim runtime support library
#
# Maintainer: The Vim Project <https://github.com/vim/vim>
# Last Change: 2025 Aug 15
# Last Change: 2025 Dec 21
export def IsSafeExecutable(filetype: string, executable: string): bool
if empty(exepath(executable))
@@ -60,15 +60,19 @@ if has('unix')
enddef
else
export def Launch(args: string)
const fork = has('gui_running') ? '' : '&'
const fork = has('gui_running') ? '&' : ''
execute $':silent ! nohup {args} {Redir()} {fork}' | redraw!
enddef
endif
elseif has('win32')
export def Launch(args: string)
const shell = (&shell =~? '\<cmd\.exe\>') ? '' : 'cmd.exe /c'
const quotes = empty(shell) ? '' : '""'
execute $'silent ! {shell} start {quotes} /b {args} {Redir()}' | redraw!
try
execute ':silent !start' args | redraw!
catch /^Vim(!):E371:/
echohl ErrorMsg
echom "dist#vim9#Launch(): can not start" args
echohl None
endtry
enddef
else
export def Launch(dummy: string)
@@ -81,7 +85,10 @@ var os_viewer = null_string
if has('win32unix')
# (cyg)start suffices
os_viewer = ''
# Windows / WSL
# Windows
elseif has('win32')
os_viewer = '' # Use :!start
# WSL
elseif executable('explorer.exe')
os_viewer = 'explorer.exe'
# Linux / BSD
@@ -126,6 +133,11 @@ export def Open(file: string)
&shellslash = false
defer setbufvar('%', '&shellslash', true)
endif
if &shell == 'pwsh' || &shell == 'powershell'
const shell = &shell
setlocal shell&
defer setbufvar('%', '&shell', shell)
endif
Launch($"{Viewer()} {shellescape(file, 1)}")
enddef

View File

@@ -14,6 +14,7 @@
" 2024 Nov 12 by Vim Project: fix problems on Windows (#16036)
" 2025 Feb 28 by Vim Project: add support for bzip3 (#16755)
" 2025 May 11 by Vim Project: check network connectivity (#17249)
" 2025 Dec 21 by Vim Project: make the wget check more robust (#18987)
" }}}
"
" GetLatestVimScripts: 642 1 :AutoInstall: getscript.vim
@@ -58,7 +59,10 @@ endif
" wget vs curl {{{2
if !exists("g:GetLatestVimScripts_wget")
if executable("wget")
if executable("wget.exe")
" enforce extension: windows powershell desktop version has a wget alias that hides wget.exe
let g:GetLatestVimScripts_wget= "wget.exe"
elseif executable("wget")
let g:GetLatestVimScripts_wget= "wget"
elseif executable("curl.exe")
" enforce extension: windows powershell desktop version has a curl alias that hides curl.exe
@@ -73,7 +77,7 @@ endif
" options that wget and curl require:
if !exists("g:GetLatestVimScripts_options")
if g:GetLatestVimScripts_wget == "wget"
if g:GetLatestVimScripts_wget =~ "wget"
let g:GetLatestVimScripts_options= "-q -O"
elseif g:GetLatestVimScripts_wget =~ "curl"
let g:GetLatestVimScripts_options= "-s -o"

View File

@@ -17,6 +17,7 @@
" 2025 Mar 11 by Vim Project: handle filenames with leading '-' correctly
" 2025 Jul 12 by Vim Project: drop ../ on write to prevent path traversal attacks
" 2025 Sep 22 by Vim Project: support PowerShell Core
" 2025 Dec 20 by Vim Project: use :lcd instead of :cd
" 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,
@@ -371,7 +372,7 @@ fun! zip#Write(fname)
call mkdir(tmpdir,"p")
" attempt to change to the indicated directory
if s:ChgDir(tmpdir,s:ERROR,"(zip#Write) cannot cd to temporary directory")
if s:ChgDir(tmpdir,s:ERROR,"(zip#Write) cannot lcd to temporary directory")
return
endif
@@ -380,7 +381,7 @@ fun! zip#Write(fname)
call delete("_ZIPVIM_", "rf")
endif
call mkdir("_ZIPVIM_")
cd _ZIPVIM_
lcd _ZIPVIM_
if has("unix")
let zipfile = substitute(a:fname,'zipfile://\(.\{-}\)::[^\\].*$','\1','')
@@ -455,7 +456,7 @@ fun! zip#Write(fname)
endif
" cleanup and restore current directory
cd ..
lcd ..
call delete("_ZIPVIM_", "rf")
call s:ChgDir(curdir,s:WARNING,"(zip#Write) unable to return to ".curdir."!")
call delete(tmpdir, "rf")
@@ -536,7 +537,7 @@ endfun
" s:ChgDir: {{{2
fun! s:ChgDir(newdir,errlvl,errmsg)
try
exe "cd ".fnameescape(a:newdir)
exe "lcd ".fnameescape(a:newdir)
catch /^Vim\%((\a\+)\)\=:E344/
redraw!
if a:errlvl == s:NOTE

19
runtime/compiler/ty.vim Normal file
View File

@@ -0,0 +1,19 @@
" Vim compiler file
" Compiler: Ty (Python Type Checker)
" Maintainer: @konfekt
" Last Change: 2024 Dec 18
if exists("current_compiler") | finish | endif
let current_compiler = "ty"
let s:cpo_save = &cpo
set cpo&vim
" CompilerSet makeprg=ty
exe 'CompilerSet makeprg=' .. escape(
\ get(b:, 'ty_makeprg', get(g:, 'ty_makeprg', 'ty --no-progress --color=never'))
\ ..' check --output-format=concise', ' \|"')
CompilerSet errorformat=%f:%l:%c:\ %m,%f:%l:\ %m,%f:%l:%c\ -\ %m,%f:
let &cpo = s:cpo_save
unlet s:cpo_save

View File

@@ -1,4 +1,4 @@
*builtin.txt* For Vim version 9.1. Last change: 2025 Dec 13
*builtin.txt* For Vim version 9.1. Last change: 2025 Dec 21
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -23,9 +23,11 @@ Use CTRL-] on the function name to jump to the full explanation.
USAGE RESULT DESCRIPTION ~
abs({expr}) Float or Number absolute value of {expr}
abs({expr}) Float/Number
absolute value of {expr}
acos({expr}) Float arc cosine of {expr}
add({object}, {item}) List/Blob append {item} to {object}
add({object}, {item}) List/Blob
append {item} to {object}
and({expr}, {expr}) Number bitwise AND
append({lnum}, {text}) Number append {text} below line {lnum}
appendbufline({buf}, {lnum}, {text})
@@ -33,7 +35,8 @@ appendbufline({buf}, {lnum}, {text})
in buffer {buf}
argc([{winid}]) Number number of files in the argument list
argidx() Number current index in the argument list
arglistid([{winnr} [, {tabnr}]]) Number argument list id
arglistid([{winnr} [, {tabnr}]])
Number argument list id
argv({nr} [, {winid}]) String {nr} entry of the argument list
argv([-1, {winid}]) List the argument list
asin({expr}) Float arc sine of {expr}
@@ -43,7 +46,7 @@ assert_equal({exp}, {act} [, {msg}])
assert_equalfile({fname-one}, {fname-two} [, {msg}])
Number assert file contents are equal
assert_exception({error} [, {msg}])
Number assert {error} is in v:exception
Number assert {error} is in |v:exception|
assert_fails({cmd} [, {error} [, {msg} [, {lnum} [, {context}]]]])
Number assert {cmd} fails
assert_false({actual} [, {msg}])
@@ -81,8 +84,8 @@ bufexists({buf}) Number |TRUE| if buffer {buf} exists
buflisted({buf}) Number |TRUE| if buffer {buf} is listed
bufload({buf}) Number load buffer {buf} if not loaded yet
bufloaded({buf}) Number |TRUE| if buffer {buf} is loaded
bufname([{buf}]) String Name of the buffer {buf}
bufnr([{buf} [, {create}]]) Number Number of the buffer {buf}
bufname([{buf}]) String name of the buffer {buf}
bufnr([{buf} [, {create}]]) Number number of the buffer {buf}
bufwinid({buf}) Number window ID of buffer {buf}
bufwinnr({buf}) Number window number of buffer {buf}
byte2line({byte}) Number line number at byte count {byte}
@@ -121,7 +124,8 @@ ch_setoptions({handle}, {options})
ch_status({handle} [, {options}])
String status of channel {handle}
changenr() Number current change number
char2nr({expr} [, {utf8}]) Number ASCII/UTF-8 value of first char in {expr}
char2nr({expr} [, {utf8}]) Number ASCII/UTF-8 value of first char in
{expr}
charclass({string}) Number character class of {string}
charcol({expr} [, {winid}]) Number column number of cursor or mark
charidx({string}, {idx} [, {countcc} [, {utf16}]])
@@ -180,10 +184,12 @@ expand({expr} [, {nosuf} [, {list}]])
expandcmd({string} [, {options}])
String expand {string} like with `:edit`
extend({expr1}, {expr2} [, {expr3}])
List/Dict insert items of {expr2} into {expr1}
List/Dict
insert items of {expr2} into {expr1}
extendnew({expr1}, {expr2} [, {expr3}])
List/Dict like |extend()| but creates a new
List or Dictionary
List/Dict
like |extend()| but creates a new List
or Dictionary
feedkeys({string} [, {mode}]) Number add key sequence to typeahead buffer
filecopy({from}, {to}) Number |TRUE| if copying file {from} to {to}
worked
@@ -194,7 +200,8 @@ filter({expr1}, {expr2}) List/Dict/Blob/String
{expr2} is 0
finddir({name} [, {path} [, {count}]])
findfile({name} [, {path} [, {count}]])
String/List find dir/file {name} in {path}
String/List
find dir/file {name} in {path}
flatten({list} [, {maxdepth}]) List flatten {list} up to {maxdepth} levels
flattennew({list} [, {maxdepth}])
List flatten a copy of {list}
@@ -216,7 +223,8 @@ funcref({name} [, {arglist}] [, {dict}])
Funcref reference to function {name}
function({name} [, {arglist}] [, {dict}])
Funcref named reference to function {name}
garbagecollect([{atexit}]) none free memory, breaking cyclic references
garbagecollect([{atexit}]) none free memory, breaking cyclic
references
get({list}, {idx} [, {def}]) any get item {idx} from {list} or {def}
get({dict}, {key} [, {def}]) any get item {key} from {dict} or {def}
get({func}, {what}) any get property of funcref/partial {func}
@@ -229,7 +237,7 @@ getbufvar({buf}, {varname} [, {def}])
getcellpixels() List get character cell pixel size
getcellwidths() List get character cell width overrides
getchangelist([{buf}]) List list of change list items
getchar([{expr} [, {opts}]]) Number or String
getchar([{expr} [, {opts}]]) Number/String
get one character from the user
getcharmod() Number modifiers for the last typed character
getcharpos({expr}) List position of cursor, mark, etc.
@@ -245,7 +253,8 @@ getcmdprompt() String return the current command-line prompt
getcmdscreenpos() Number return cursor screen position in
command-line
getcmdtype() String return current command-line type
getcmdwintype() String return current command-line window type
getcmdwintype() String return current command-line window
type
getcompletion({pat}, {type} [, {filtered}])
List list of cmdline completion matches
getcompletiontype({pat}) String return the type of the command-line
@@ -263,7 +272,8 @@ getimstatus() Number |TRUE| if the IME status is active
getjumplist([{winnr} [, {tabnr}]])
List list of jump list items
getline({lnum}) String line {lnum} of current buffer
getline({lnum}, {end}) List lines {lnum} to {end} of current buffer
getline({lnum}, {end}) List lines {lnum} to {end} of current
buffer
getloclist({nr}) List list of location list items
getloclist({nr}, {what}) Dict get specific location list properties
getmarklist([{buf}]) List list of global/local marks
@@ -275,7 +285,8 @@ getpos({expr}) List position of cursor, mark, etc.
getqflist() List list of quickfix items
getqflist({what}) Dict get specific quickfix list properties
getreg([{regname} [, 1 [, {list}]]])
String or List contents of a register
String/List
contents of a register
getreginfo([{regname}]) Dict information about a register
getregion({pos1}, {pos2} [, {opts}])
List get the text from {pos1} to {pos2}
@@ -286,7 +297,8 @@ getscriptinfo([{opts}]) List list of sourced scripts
getstacktrace() List get current stack trace of Vim scripts
gettabinfo([{expr}]) List list of tab pages
gettabvar({nr}, {varname} [, {def}])
any variable {varname} in tab {nr} or {def}
any variable {varname} in tab {nr} or
{def}
gettabwinvar({tabnr}, {winnr}, {name} [, {def}])
any {name} in {winnr} in tab page {tabnr}
gettagstack([{nr}]) Dict get the tag stack of window {nr}
@@ -305,8 +317,8 @@ globpath({path}, {expr} [, {nosuf} [, {list} [, {alllinks}]]])
has({feature} [, {check}]) Number |TRUE| if feature {feature} supported
has_key({dict}, {key}) Number |TRUE| if {dict} has entry {key}
haslocaldir([{winnr} [, {tabnr}]])
Number |TRUE| if the window executed |:lcd|
or |:tcd|
Number |TRUE| if the window executed `:lcd` or
`:tcd`
hasmapto({what} [, {mode} [, {abbr}]])
Number |TRUE| if mapping to {what} exists
histadd({history}, {item}) Number add an item to a history
@@ -332,9 +344,13 @@ inputdialog({prompt} [, {text} [, {cancelreturn}]])
inputlist({textlist}) Number let the user pick from a choice list
inputrestore() Number restore typeahead
inputsave() Number save and clear typeahead
inputsecret({prompt} [, {text}]) String like input() but hiding the text
insert({object}, {item} [, {idx}]) List insert {item} in {object} [before {idx}]
instanceof({object}, {class}) Number |TRUE| if {object} is an instance of {class}
inputsecret({prompt} [, {text}])
String like input() but hiding the text
insert({object}, {item} [, {idx}])
List insert {item} in {object}
[before {idx}]
instanceof({object}, {class}) Number |TRUE| if {object} is an instance of
{class}
interrupt() none interrupt script execution
invert({expr}) Number bitwise invert
isabsolutepath({path}) Number |TRUE| if {path} is an absolute path
@@ -346,7 +362,8 @@ isnan({expr}) Number |TRUE| if {expr} is NaN
items({expr}) List key/index-value pairs in {expr}
job_getchannel({job}) Channel get the channel handle for {job}
job_info([{job}]) Dict get information about {job}
job_setoptions({job}, {options}) none set options for {job}
job_setoptions({job}, {options})
none set options for {job}
job_start({command} [, {options}])
Job start a job
job_status({job}) String get the status of {job}
@@ -358,9 +375,10 @@ json_decode({string}) any decode JSON
json_encode({expr}) String encode JSON
keys({dict}) List keys in {dict}
keytrans({string}) String translate internal keycodes to a form
that can be used by |:map|
that can be used by `:map`
len({expr}) Number the length of {expr}
libcall({lib}, {func}, {arg}) String call {func} in library {lib} with {arg}
libcall({lib}, {func}, {arg}) String call {func} in library {lib} with
{arg}
libcallnr({lib}, {func}, {arg}) Number idem, but return a Number
line({expr} [, {winid}]) Number line nr of cursor, last line or mark
line2byte({lnum}) Number byte count of line {lnum}
@@ -379,7 +397,7 @@ luaeval({expr} [, {expr}]) any evaluate |Lua| expression
map({expr1}, {expr2}) List/Dict/Blob/String
change each item in {expr1} to {expr2}
maparg({name} [, {mode} [, {abbr} [, {dict}]]])
String or Dict
String/Dict
rhs of mapping {name} in mode {mode}
mapcheck({name} [, {mode} [, {abbr}]])
String check for mappings matching {name}
@@ -394,7 +412,7 @@ matchadd({group}, {pattern} [, {priority} [, {id} [, {dict}]]])
Number highlight {pattern} with {group}
matchaddpos({group}, {pos} [, {priority} [, {id} [, {dict}]]])
Number highlight positions with {group}
matcharg({nr}) List arguments of |:match|
matcharg({nr}) List arguments of `:match`
matchbufline({buf}, {pat}, {lnum}, {end}, [, {dict})
List all the {pat} matches in buffer {buf}
matchdelete({id} [, {win}]) Number delete match identified by {id}
@@ -405,7 +423,8 @@ matchfuzzy({list}, {str} [, {dict}])
matchfuzzypos({list}, {str} [, {dict}])
List fuzzy match {str} in {list}
matchlist({expr}, {pat} [, {start} [, {count}]])
List match and submatches of {pat} in {expr}
List match and submatches of {pat} in
{expr}
matchstr({expr}, {pat} [, {start} [, {count}]])
String {count}'th match of {pat} in {expr}
matchstrlist({list}, {pat} [, {dict})
@@ -422,11 +441,13 @@ mzeval({expr}) any evaluate |MzScheme| expression
nextnonblank({lnum}) Number line nr of non-blank line >= {lnum}
ngettext({single}, {plural}, {number}[, {domain}])
String translate text based on {number}
nr2char({expr} [, {utf8}]) String single char with ASCII/UTF-8 value {expr}
nr2char({expr} [, {utf8}]) String single char with ASCII/UTF-8 value
{expr}
or({expr}, {expr}) Number bitwise OR
pathshorten({expr} [, {len}]) String shorten directory names in a path
perleval({expr}) any evaluate |Perl| expression
popup_atcursor({what}, {options}) Number create popup window near the cursor
popup_atcursor({what}, {options})
Number create popup window near the cursor
popup_beval({what}, {options}) Number create popup window for 'ballooneval'
popup_clear() none close all popup windows
popup_close({id} [, {result}]) none close popup window {id}
@@ -446,7 +467,8 @@ popup_menu({what}, {options}) Number create a popup window used as a menu
popup_move({id}, {options}) none set position of popup window {id}
popup_notification({what}, {options})
Number create a notification popup window
popup_setbuf({id}, {buf}) Bool set the buffer for the popup window {id}
popup_setbuf({id}, {buf}) Bool set the buffer for the popup window
{id}
popup_setoptions({id}, {options})
none set options for popup window {id}
popup_settext({id}, {text}) none set the text of popup window {id}
@@ -456,10 +478,13 @@ preinserted() Number whether text is inserted after cursor
prevnonblank({lnum}) Number line nr of non-blank line <= {lnum}
printf({fmt}, {expr1}...) String format text
prompt_getprompt({buf}) String get prompt text
prompt_setcallback({buf}, {expr}) none set prompt callback function
prompt_setinterrupt({buf}, {text}) none set prompt interrupt function
prompt_setcallback({buf}, {expr})
none set prompt callback function
prompt_setinterrupt({buf}, {text})
none set prompt interrupt function
prompt_setprompt({buf}, {text}) none set prompt text
prop_add({lnum}, {col}, {props}) none add one text property
prop_add({lnum}, {col}, {props})
none add one text property
prop_add_list({props}, [[{lnum}, {col}, {end-lnum}, {end-col}], ...])
none add multiple text properties
prop_clear({lnum} [, {lnum-end} [, {props}]])
@@ -527,9 +552,10 @@ round({expr}) Float round off {expr}
rubyeval({expr}) any evaluate |Ruby| expression
screenattr({row}, {col}) Number attribute at screen position
screenchar({row}, {col}) Number character at screen position
screenchars({row}, {col}) List List of characters at screen position
screenchars({row}, {col}) List list of characters at screen position
screencol() Number current cursor column
screenpos({winid}, {lnum}, {col}) Dict screen row and col of a text character
screenpos({winid}, {lnum}, {col})
Dict screen row and col of a text character
screenrow() Number current cursor row
screenstring({row}, {col}) String characters at screen position
search({pattern} [, {flags} [, {stopline} [, {timeout} [, {skip}]]]])
@@ -570,7 +596,9 @@ setqflist({list} [, {action}]) Number modify quickfix list using {list}
setqflist({list}, {action}, {what})
Number modify specific quickfix list props
setreg({n}, {v} [, {opt}]) Number set register to value and type
settabvar({nr}, {varname}, {val}) none set {varname} in tab page {nr} to {val}
settabvar({nr}, {varname}, {val})
none set {varname} in tab page {nr} to
{val}
settabwinvar({tabnr}, {winnr}, {varname}, {val})
none set {varname} in window {winnr} in tab
page {tabnr} to {val}
@@ -600,7 +628,8 @@ sign_unplacelist({list}) List unplace a list of signs
simplify({filename}) String simplify filename as much as possible
sin({expr}) Float sine of {expr}
sinh({expr}) Float hyperbolic sine of {expr}
slice({expr}, {start} [, {end}]) String, List or Blob
slice({expr}, {start} [, {end}])
String/List/Blob
slice of a String, List or Blob
sort({list} [, {how} [, {dict}]])
List sort {list}, compare with {how}
@@ -630,7 +659,8 @@ strcharpart({str}, {start} [, {len} [, {skipcc}]])
String {len} characters of {str} at
character {start}
strchars({expr} [, {skipcc}]) Number character count of the String {expr}
strdisplaywidth({expr} [, {col}]) Number display length of the String {expr}
strdisplaywidth({expr} [, {col}])
Number display length of the String {expr}
strftime({format} [, {time}]) String format time with a specified format
strgetchar({str}, {index}) Number get char {index} from {str}
stridx({haystack}, {needle} [, {start}])
@@ -638,20 +668,24 @@ stridx({haystack}, {needle} [, {start}])
string({expr}) String String representation of {expr} value
strlen({expr}) Number length of the String {expr}
strpart({str}, {start} [, {len} [, {chars}]])
String {len} bytes/chars of {str} at
byte {start}
String {len} bytes/chars of {str} at byte
{start}
strptime({format}, {timestring})
Number Convert {timestring} to unix timestamp
Number convert {timestring} to unix timestamp
strridx({haystack}, {needle} [, {start}])
Number last index of {needle} in {haystack}
strtrans({expr}) String translate string to make it printable
strutf16len({string} [, {countcc}])
Number number of UTF-16 code units in {string}
strwidth({expr}) Number display cell length of the String {expr}
submatch({nr} [, {list}]) String or List
specific match in ":s" or substitute()
Number number of UTF-16 code units in
{string}
strwidth({expr}) Number display cell length of the String
{expr}
submatch({nr} [, {list}]) String/List
specific match in `:substitute` or
substitute()
substitute({expr}, {pat}, {sub}, {flags})
String all {pat} in {expr} replaced with {sub}
String all {pat} in {expr} replaced with
{sub}
swapfilelist() List swap files found in 'directory'
swapinfo({fname}) Dict information about swap file {fname}
swapname({buf}) String swap file of buffer {buf}
@@ -660,12 +694,14 @@ synIDattr({synID}, {what} [, {mode}])
String attribute {what} of syntax ID {synID}
synIDtrans({synID}) Number translated syntax ID of {synID}
synconcealed({lnum}, {col}) List info about concealing
synstack({lnum}, {col}) List stack of syntax IDs at {lnum} and {col}
synstack({lnum}, {col}) List stack of syntax IDs at {lnum} and
{col}
system({expr} [, {input}]) String output of shell command/filter {expr}
systemlist({expr} [, {input}]) List output of shell command/filter {expr}
tabpagebuflist([{arg}]) List list of buffer numbers in tab page
tabpagenr([{arg}]) Number number of current or last tab page
tabpagewinnr({tabarg} [, {arg}]) Number number of current window in tab page
tabpagewinnr({tabarg} [, {arg}])
Number number of current window in tab page
tagfiles() List tags files used
taglist({expr} [, {filename}]) List list of tags matching {expr}
tan({expr}) Float tangent of {expr}
@@ -695,7 +731,8 @@ term_setansicolors({buf}, {colors})
none set ANSI palette in GUI color mode
term_setapi({buf}, {expr}) none set |terminal-api| function name prefix
term_setkill({buf}, {how}) none set signal to stop job in terminal
term_setrestore({buf}, {command}) none set command to restore terminal
term_setrestore({buf}, {command})
none set command to restore terminal
term_setsize({buf}, {rows}, {cols})
none set the size of a terminal
term_start({cmd} [, {options}]) Number open a terminal window and run a job
@@ -735,8 +772,10 @@ timer_start({time}, {callback} [, {options}])
Number create a timer
timer_stop({timer}) none stop a timer
timer_stopall() none stop all timers
tolower({expr}) String the String {expr} switched to lowercase
toupper({expr}) String the String {expr} switched to uppercase
tolower({expr}) String the String {expr} switched to
lowercase
toupper({expr}) String the String {expr} switched to
uppercase
tr({src}, {fromstr}, {tostr}) String translate chars of {src} in {fromstr}
to chars in {tostr}
trim({text} [, {mask} [, {dir}]])
@@ -755,7 +794,7 @@ utf16idx({string}, {idx} [, {countcc} [, {charidx}]])
Number UTF-16 index of byte {idx} in {string}
values({dict}) List values in {dict}
virtcol({expr} [, {list} [, {winid}])
Number or List
Number/List
screen column of cursor or mark
virtcol2col({winid}, {lnum}, {col})
Number byte index of a character on screen
@@ -782,7 +821,8 @@ winheight({nr}) Number height of window {nr}
winlayout([{tabnr}]) List layout of windows in tab {tabnr}
winline() Number window line of the cursor
winnr([{expr}]) Number number of current window
winrestcmd() String returns command to restore window sizes
winrestcmd() String returns command to restore window
sizes
winrestview({dict}) none restore view of current window
winsaveview() Dict save view of current window
winwidth({nr}) Number width of window {nr}

View File

@@ -1,4 +1,4 @@
*eval.txt* For Vim version 9.1. Last change: 2025 Dec 18
*eval.txt* For Vim version 9.1. Last change: 2025 Dec 21
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -5231,7 +5231,7 @@ $VIMRUNTIME/plugin/openPlugin.vim
dist#vim9#Open(file: string) ~
Opens `path` with the system default handler (macOS `open`, Windows
`explorer.exe`, Linux `xdg-open`, …). If the variable |g:Openprg| exists the
`start`, Linux `xdg-open`, …). If the variable |g:Openprg| exists the
string specified in the variable is used instead.
The |:Open| user command uses file completion for its argument.
@@ -5284,7 +5284,7 @@ Usage: >vim
15. Clipboard providers *clipboard-providers*
The clipboard provider feature allows the "+" |quoteplus| and "*" |quotestar|
registers to be overridden by custom Vimscript functions. There can be
registers to be overridden by custom Vim script functions. There can be
multiple providers, and Vim chooses which one to use based on 'clipmethod'.
Despite the name, it should be treated separate from the clipboard
@@ -5295,7 +5295,7 @@ clipboard registers.
The clipboard provider feature will respect the "unnamed" and "unnamedplus"
values in the 'clipboard' option. Any other value will be ignored.
*clipboard-providers-no-clipboard*
*clipboard-providers-no-clipboard*
If the |+clipboard| feature is not enabled, then the "+" and "*" registers
will not be enabled/available unless |v:clipmethod| is set to a provider. If
it is set to a provider, then the clipboard registers will be exposed despite

View File

@@ -1,4 +1,4 @@
*gui_w32.txt* For Vim version 9.1. Last change: 2025 Nov 09
*gui_w32.txt* For Vim version 9.1. Last change: 2025 Dec 21
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -504,4 +504,25 @@ To use the system's default title bar colors, set highlighting groups to
hi TitleBar guibg=NONE guifg=NONE
hi TitleBarNC guibg=NONE guifg=NONE
<
Full Screen *gui-w32-fullscreen*
To enable fullscreen mode in the Windows GUI version of Vim, add the 's' flag
to the 'guioptions' setting.
For convenience, you can define a command or mapping to toggle fullscreen mode:
>
command! ToggleFullscreen {
if &guioptions =~# 's'
set guioptions-=s
else
set guioptions+=s
endif
}
map <expr> <F11> &go =~# 's' ? ":se go-=s<CR>" : ":se go+=s<CR>"
The fullscreen mode will occupy the entire screen area while hiding window
decorations such as the title bar and borders.
vim:tw=78:sw=4:ts=8:noet:ft=help:norl:

View File

@@ -1,4 +1,4 @@
*options.txt* For Vim version 9.1. Last change: 2025 Dec 18
*options.txt* For Vim version 9.1. Last change: 2025 Dec 21
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -4572,6 +4572,12 @@ A jump table for the options with a short description can be found at |Q_op|.
*'go-T'*
'T' Include Toolbar. Currently only in Win32, GTK+, Motif and
Photon GUIs.
*'go-s'*
's' Enable fullscreen mode. Currently only supported in the
MS-Windows GUI version. When set, the window will occupy the
entire screen and remove window decorations. Define custom
mappings to toggle this mode conveniently. For detailed usage
instructions, see |gui-w32-fullscreen|.
*'go-r'*
'r' Right-hand scrollbar is always present.
*'go-R'*

View File

@@ -1,4 +1,4 @@
*quickfix.txt* For Vim version 9.1. Last change: 2025 Nov 09
*quickfix.txt* For Vim version 9.1. Last change: 2025 Dec 21
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -1654,6 +1654,15 @@ b/g:mypy_makeprg_params variable. For example: >
The global default is "--strict --ignore-missing-imports".
TY TYPE CHECKER *compiler-ty*
Commonly used compiler options and executable can be set by the
b/g:ty_makeprg variable. For example: >
let b:ty_makeprg = "uv run ty"
The global default is "ty --no-progress --color=never".
RUFF LINTER *compiler-ruff*
Commonly used compiler options can be added to 'makeprg' by setting the

View File

@@ -1,4 +1,4 @@
*starting.txt* For Vim version 9.1. Last change: 2025 Nov 09
*starting.txt* For Vim version 9.1. Last change: 2025 Dec 20
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -1287,7 +1287,7 @@ CTRL-Z Suspend Vim, like ":stop".
Works in Normal and in Visual mode. In Insert and
Command-line mode, the CTRL-Z is inserted as a normal
character. In Visual mode Vim goes back to Normal
mode.
mode before suspending.
Note: if CTRL-Z undoes a change see |mswin.vim|.

View File

@@ -377,6 +377,7 @@ $quote eval.txt /*$quote*
'go-m' options.txt /*'go-m'*
'go-p' options.txt /*'go-p'*
'go-r' options.txt /*'go-r'*
'go-s' options.txt /*'go-s'*
'go-t' options.txt /*'go-t'*
'go-v' options.txt /*'go-v'*
'gp' options.txt /*'gp'*
@@ -6779,6 +6780,7 @@ compiler-spotbugs quickfix.txt /*compiler-spotbugs*
compiler-tex quickfix.txt /*compiler-tex*
compiler-tombi quickfix.txt /*compiler-tombi*
compiler-tsc quickfix.txt /*compiler-tsc*
compiler-ty quickfix.txt /*compiler-ty*
compiler-typst quickfix.txt /*compiler-typst*
compiler-vaxada ft_ada.txt /*compiler-vaxada*
compl-current insert.txt /*compl-current*
@@ -8248,6 +8250,7 @@ gui-vert-scroll gui.txt /*gui-vert-scroll*
gui-w32 gui_w32.txt /*gui-w32*
gui-w32-cmdargs gui_w32.txt /*gui-w32-cmdargs*
gui-w32-dialogs gui_w32.txt /*gui-w32-dialogs*
gui-w32-fullscreen gui_w32.txt /*gui-w32-fullscreen*
gui-w32-printing gui_w32.txt /*gui-w32-printing*
gui-w32-start gui_w32.txt /*gui-w32-start*
gui-w32-title-bar gui_w32.txt /*gui-w32-title-bar*

View File

@@ -1,4 +1,4 @@
*version9.txt* For Vim version 9.1. Last change: 2025 Dec 15
*version9.txt* For Vim version 9.1. Last change: 2025 Dec 21
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -41724,6 +41724,8 @@ Options: ~
(see also the below platform specific change).
- 'guioptions': Support darkmode on MS-Windows for menu and title bar using
|'go-d'| (see also the below platform specific change).
- 'guioptions': New value |'go-s'| to support fullscreen on MS-Windows GUI
(see also the below platform specific change).
- 'completepopup': Add more values to style popup windows.
Ex commands: ~
@@ -41768,6 +41770,7 @@ Platform specific ~
- MS-Windows: Vim no longer searches the current directory for
executables when running external commands; prefix a relative or absolute
path if you want the old behavior |$NoDefaultCurrentDirectoryInExePath|.
- MS-Windows: New value |'go-s'| to support fullscreen on MS-Windows GUI
- macOS: increase default scheduler priority to TASK_DEFAULT_APPLICATION.

View File

@@ -158,6 +158,12 @@ gui_start(char_u *arg UNUSED)
gui_gtk_init_socket_server();
#endif
#ifdef FEAT_GUI_MSWIN
// Enable fullscreen mode
if (vim_strchr(p_go, GO_FULLSCREEN) != NULL)
gui_mch_set_fullscreen(TRUE);
#endif
vim_free(old_term);
// If the GUI started successfully, trigger the GUIEnter event, otherwise
@@ -3498,6 +3504,9 @@ gui_init_which_components(char_u *oldval UNUSED)
#ifdef FEAT_GUI_MSWIN
static int prev_titlebar = FALSE;
int using_titlebar = FALSE;
static int prev_fullscreen = FALSE;
int using_fullscreen = FALSE;
#endif
#if defined(FEAT_MENU)
static int prev_tearoff = -1;
@@ -3572,6 +3581,9 @@ gui_init_which_components(char_u *oldval UNUSED)
case GO_TITLEBAR:
using_titlebar = TRUE;
break;
case GO_FULLSCREEN:
using_fullscreen = TRUE;
break;
#endif
#ifdef FEAT_TOOLBAR
case GO_TOOLBAR:
@@ -3600,6 +3612,12 @@ gui_init_which_components(char_u *oldval UNUSED)
gui_mch_set_titlebar_colors();
prev_titlebar = using_titlebar;
}
if (using_fullscreen != prev_fullscreen)
{
gui_mch_set_fullscreen(using_fullscreen);
prev_fullscreen = using_fullscreen;
}
#endif
#ifdef FEAT_GUI_DARKTHEME

View File

@@ -421,6 +421,8 @@ static HINSTANCE hLibDwm = NULL;
static HRESULT (WINAPI *pDwmSetWindowAttribute)(HWND, DWORD, LPCVOID, DWORD);
static void dyn_dwm_load(void);
static int fullscreen_on = FALSE;
#ifdef FEAT_GUI_DARKTHEME
static HINSTANCE hUxThemeLib = NULL;
@@ -3170,6 +3172,76 @@ dyn_uxtheme_load(void)
#endif // FEAT_GUI_DARKTHEME
/*
* When flag is true, set fullscreen on.
* When flag is false, set fullscreen off.
*/
void
gui_mch_set_fullscreen(int flag)
{
static RECT normal_rect;
static LONG_PTR normal_style, normal_exstyle;
HMONITOR mon;
MONITORINFO moninfo;
RECT rc;
if (!full_screen) // Windows not set yet.
return;
if (flag)
{
if (fullscreen_on)
return;
// Enter fullscreen mode
GetWindowRect(s_hwnd, &rc);
moninfo.cbSize = sizeof(MONITORINFO);
mon = MonitorFromRect(&rc, MONITOR_DEFAULTTONEAREST);
if (mon == NULL || !GetMonitorInfo(mon, &moninfo))
return;
// Save current window state
GetWindowRect(s_hwnd, &normal_rect);
normal_style = GetWindowLongPtr(s_hwnd, GWL_STYLE);
normal_exstyle = GetWindowLongPtr(s_hwnd, GWL_EXSTYLE);
// Set fullscreen styles
SetWindowLongPtr(s_hwnd, GWL_STYLE,
normal_style & ~(WS_CAPTION | WS_THICKFRAME));
SetWindowLongPtr(s_hwnd, GWL_EXSTYLE,
normal_exstyle & ~(WS_EX_DLGMODALFRAME | WS_EX_WINDOWEDGE |
WS_EX_CLIENTEDGE | WS_EX_STATICEDGE));
SetWindowPos(s_hwnd, NULL,
moninfo.rcMonitor.left,
moninfo.rcMonitor.top,
moninfo.rcMonitor.right - moninfo.rcMonitor.left,
moninfo.rcMonitor.bottom - moninfo.rcMonitor.top,
SWP_NOZORDER | SWP_NOACTIVATE | SWP_FRAMECHANGED);
fullscreen_on = TRUE;
}
else
{
if (!fullscreen_on)
return;
// Exit fullscreen mode
SetWindowLongPtr(s_hwnd, GWL_STYLE, normal_style);
SetWindowLongPtr(s_hwnd, GWL_EXSTYLE, normal_exstyle);
// Restore original window position and size
SetWindowPos(s_hwnd, NULL,
normal_rect.left,
normal_rect.top,
normal_rect.right - normal_rect.left,
normal_rect.bottom - normal_rect.top,
SWP_NOZORDER | SWP_NOACTIVATE | SWP_FRAMECHANGED);
fullscreen_on = FALSE;
}
}
/*
* ":simalt" command.
*/

View File

@@ -303,13 +303,14 @@ typedef enum {
#define GO_ASELPLUS 'P' // autoselectPlus
#define GO_RIGHT 'r' // use right scrollbar
#define GO_VRIGHT 'R' // right scrollbar with vert split
#define GO_FULLSCREEN 's' // enter fullscreen
#define GO_TEAROFF 't' // add tear-off menu items
#define GO_TOOLBAR 'T' // add toolbar
#define GO_FOOTER 'F' // add footer
#define GO_VERTICAL 'v' // arrange dialog buttons vertically
#define GO_KEEPWINSIZE 'k' // keep GUI window size
// all possible flags for 'go'
#define GO_ALL "!aAbcCdefFghilLmMpPrRtTvk"
#define GO_ALL "!aAbcCdefFghilLmMpPrRstTvk"
// flags for 'comments' option
#define COM_NEST 'n' // comments strings nest

View File

@@ -407,7 +407,19 @@ mswin_stat_impl(const WCHAR *name, stat_T *stp, const int resolve)
DWORD flag = 0;
WIN32_FIND_DATAW findDataW;
#ifdef _UCRT
#if 0 && defined(_UCRT)
// This code was disabled because the behavior of MSVC's _wstat (actually
// _wstat64) for empty symlinks varies depending on the C runtime you link
// to.
//
// The expected behavior here is for _wstat() to fail for empty symlinks.
// The expected behavior occurs when linking to a static runtime. However,
// the expected behavior does not occur when linking to a dynamic runtime,
// and it succeeds for empty symlinks. This causes Test_glob_symlinks in
// test_functions.vim to fail when linking to a dynamic runtime.
//
// For more details, see:
// https://github.com/koron/vc-stat-behavior-verification
if (resolve)
// Universal CRT can handle symlinks properly.
return _wstat(name, stp);

View File

@@ -2920,7 +2920,7 @@ executable_exists(
(char *)buf,
sizeof(buf),
"%.*s%s%s", (int)(e - p), p,
!after_pathsep(p, e - 1) ? PATHSEPSTR : "",
!after_pathsep(p, e) ? PATHSEPSTR : "",
name);
}

File diff suppressed because it is too large Load Diff

View File

@@ -7811,7 +7811,7 @@ msgid "E1129: Throw with empty string"
msgstr "E1129: Throw са празним стрингом"
msgid "E1130: Cannot add to null list"
msgstr "E1130: null не може да се дода листи"
msgstr "E1130: Не може да се дода у null листу"
msgid "E1131: Cannot add to null blob"
msgstr "E1131: Не може да се дода на null блоб"
@@ -8141,7 +8141,7 @@ msgstr "E1219: За аргумент %d се захтева Покретни и
#, c-format
msgid "E1220: String or Number required for argument %d"
msgstr "E1220: За аргумент %d се се захтева Стринг или Број"
msgstr "E1220: За аргумент %d се захтева Стринг или Број"
#, c-format
msgid "E1221: String or Blob required for argument %d"

View File

@@ -44,6 +44,7 @@ int gui_mch_showing_tabline(void);
void gui_mch_update_tabline(void);
void gui_mch_set_curtab(int nr);
void gui_mch_set_dark_theme(int dark);
void gui_mch_set_fullscreen(int flag);
void ex_simalt(exarg_T *eap);
void gui_mch_find_dialog(exarg_T *eap);
void gui_mch_replace_dialog(exarg_T *eap);

View File

@@ -4612,6 +4612,12 @@ qf_open_new_cwindow(qf_info_T *qi, int height)
if (cmdmod.cmod_split == 0)
flags = WSP_BELOW;
flags |= WSP_NEWLOC;
// Create a snapshot for quickfix window (not for location list)
// so that when closing it, we can restore to the previous window
if (IS_QF_STACK(qi))
flags |= WSP_QUICKFIX;
if (win_split(height, flags) == FAIL)
return FAIL; // not enough room for window
RESET_BINDING(curwin);

View File

@@ -3693,9 +3693,10 @@ typedef void diffline_T;
typedef void diffline_change_T;
#endif
#define SNAP_HELP_IDX 0
#define SNAP_AUCMD_IDX 1
#define SNAP_COUNT 2
#define SNAP_HELP_IDX 0
#define SNAP_AUCMD_IDX 1
#define SNAP_QUICKFIX_IDX 2
#define SNAP_COUNT 3
/*
* Tab pages point to the top frame of each tab page.

View File

@@ -7642,7 +7642,7 @@ static const char_u ansi_table[16][3] = {
# if defined(MSWIN)
// Mapping between cterm indices < 16 and their counterpart in the ANSI palette.
static const char_u cterm_ansi_idx[] = {
const char_u cterm_ansi_idx[] = {
0, 4, 2, 6, 1, 5, 3, 7, 8, 12, 10, 14, 9, 13, 11, 15
};
# endif

View File

@@ -233,3 +233,8 @@ typedef enum {
TMODE_RAW, // terminal mode for Normal and Insert mode
TMODE_UNKNOWN // after executing a shell
} tmode_T;
#if defined(MSWIN)
// Mapping between cterm indices < 16 and their counterpart in the ANSI palette.
extern const char_u cterm_ansi_idx[];
#endif

View File

@@ -3033,7 +3033,20 @@ color2index(VTermColor *color, int fg, int *boldp)
{
// Use the color as-is if possible, give up otherwise.
if (color->index < t_colors)
return color->index + 1;
{
uint8_t index = color->index;
#ifdef MSWIN
// Convert ANSI palette to cterm color index.
// cterm_ansi_idx is a table for the reverse conversion from cterm
// color index to ANSI palette. However, the current table can
// be used for this conversion as well.
// Note: If the contents of cterm_ansi_idx change in the future, a
// different table may be needed for this purpose.
if (index < 16)
index = cterm_ansi_idx[index];
#endif
return index + 1;
}
// 8-color terminals can actually display twice as many colors by
// setting the high-intensity/bold bit.
else if (t_colors == 8 && fg && color->index < 16)

View File

@@ -381,6 +381,7 @@ def s:GetFilenameChecks(): dict<list<string>>
http: ['file.http'],
hurl: ['file.hurl'],
hy: ['file.hy', '.hy-history'],
hylo: ['file.hylo'],
hyprlang: ['hyprlock.conf', 'hyprland.conf', 'hypridle.conf', 'hyprpaper.conf', '/hypr/foo.conf'],
i3config: ['/home/user/.i3/config', '/home/user/.config/i3/config', '/etc/i3/config', '/etc/xdg/i3/config'],
ibasic: ['file.iba', 'file.ibi'],
@@ -1095,6 +1096,7 @@ def s:GetScriptChecks(): dict<list<list<string>>>
['#!/path/regina']],
janet: [['#!/path/janet']],
dart: [['#!/path/dart']],
bpftrace: [['#!/path/bpftrace']],
vim: [['#!/path/vim']],
}
enddef
@@ -3233,9 +3235,9 @@ endfunc
func Test_m4_format()
filetype on
call mkdir('Xm4', 'D')
call mkdir('Xm4', 'R')
cd Xm4
call writefile([''], 'alocal.m4', 'D')
call writefile([''], 'alocal.m4')
split alocal.m4
call assert_equal('m4', &filetype)
bwipe!

View File

@@ -2140,6 +2140,41 @@ func Test_executable_longname()
call delete(fname)
endfunc
func Test_executable_single_character_dir()
call mkdir('Xpath', 'R')
call mkdir('Xpath/a')
call mkdir('Xpath/b')
call mkdir('Xpath/c')
if has('win32')
call writefile([], 'Xpath/a/Xcmd1.bat')
call writefile([], 'Xpath/b/Xcmd2.bat')
call writefile([], 'Xpath/c/Xcmd3.bat')
let sep = ';'
else
call writefile([], 'Xpath/a/Xcmd1')
call writefile([], 'Xpath/b/Xcmd2')
call writefile([], 'Xpath/c/Xcmd3')
call setfperm('Xpath/a/Xcmd1', 'rwxr-xr-x')
call setfperm('Xpath/b/Xcmd2', 'rwxr-xr-x')
call setfperm('Xpath/c/Xcmd3', 'rwxr-xr-x')
let sep = ':'
endif
let save_path = $PATH
" a: single character name without path seperator
" b: single character name with path seperator
" c: single character name without path seperator at last of PATH
let $PATH = [
\ fnamemodify('./Xpath/a', ':p:h'),
\ fnamemodify('./Xpath/b', ':p'),
\ fnamemodify('./Xpath/c', ':p:h')
\ ]->join(sep)
call assert_true(executable('Xcmd1'))
call assert_true(executable('Xcmd2'))
call assert_true(executable('Xcmd3'))
let $PATH = save_path
endfunc
func Test_hostname()
let hostname_vim = hostname()
if has('unix')

View File

@@ -664,10 +664,10 @@ func Test_set_guioptions()
set guioptions&
call assert_equal('egmrLtT', &guioptions)
set guioptions+=C
set guioptions+=s
exec 'sleep' . duration
call assert_equal('egmrLtTC', &guioptions)
set guioptions-=C
call assert_equal('egmrLtTs', &guioptions)
set guioptions-=s
exec 'sleep' . duration
call assert_equal('egmrLtT', &guioptions)

View File

@@ -6958,4 +6958,15 @@ func Test_vimgrep_dummy_buffer_keep()
%bw!
endfunc
func Test_quickfix_restore_current_win()
let curwin = win_getid()
vsplit Xb
wincmd p
botright copen
cclose
call assert_equal(curwin, win_getid())
bw! Xb
endfunc
" vim: shiftwidth=2 sts=2 expandtab

View File

@@ -1037,4 +1037,55 @@ func Test_terminal_visual_empty_listchars()
call StopVimInTerminal(buf)
endfunc
func Test_terminal_ansi_color_windows_cui()
if !has('win32') || has('gui_running')
throw 'Skipped: only for the Windows CUI'
endif
if exists('$APPVEYOR')
throw 'Skipped: this test cannot be performed because AppVeyor does not support ANSI escape sequences'
endif
call assert_equal('dark', &background)
" Outputs 16 ANSI colors as background colors
let ansi = ''
for i in range(16)
let ansi ..= printf("\e[%dm%X", i + (i < 8 ? 40 : 92), i)
endfor
let ansi ..= "\e[40m\n"
call writefile([ansi], 'XANSIcolor', 'D')
let expected_chars = '0123456789ABCDEF'
let expected_colors = [
\ '#000000', '#e00000', '#00e000', '#e0e000',
\ '#0000e0', '#e000e0', '#00e0e0', '#e0e0e0',
\ '#808080', '#ff4040', '#40ff40', '#ffff40',
\ '#4040ff', '#ff40ff', '#40ffff', '#ffffff',
\ ]
" Ideally, 16 colors should be checked. However, in the current CI
" environment, the 16th color is something other than white, and we don't
" know the cause nor solution. After discussion, we decided to check only 15
" colors for the time being.
" FIXME: Check all 16 colors in the future.
let len_to_check = 15
let expected_colors = expected_colors[:len_to_check-1]
" First, make sure vim can display correct ANSI color text in terminal.
let buf = term_start("cmd /C type XANSIcolor")
call WaitForAssert({-> assert_equal(expected_chars, term_scrape(buf, 1)[:15]->map({_, v -> v['chars']})->join(''))})
call assert_equal(expected_colors, term_scrape(buf, 1)[:len_to_check-1]->map({_, v -> v['bg']}))
bwipeout!
" Next, check if vim can do the same thing in the vim terminal in terminal.
let lines = [
\ 'call term_start("cmd /C type XANSIcolor")'
\ ]
call writefile(lines, 'XloadANSI', 'D')
let cmd = GetVimCommandCleanTerm()
let buf = term_start(cmd .. '-S XloadANSI')
call WaitForAssert({-> assert_equal(expected_chars, term_scrape(buf, 1)[:15]->map({_, v -> v['chars']})->join(''))})
call assert_equal(expected_colors, term_scrape(buf, 1)[:len_to_check-1]->map({_, v -> v['bg']}))
endfunc
" vim: shiftwidth=2 sts=2 expandtab

View File

@@ -5245,7 +5245,7 @@ def Test_lockvar_islocked_notfound()
enddef
" Test for a protected object method
def Test_private_object_method()
def Test_protected_object_method()
# Try calling a protected method using an object (at the script level)
var lines =<< trim END
vim9script
@@ -5482,10 +5482,27 @@ def Test_private_object_method()
var a = _Foo()
END
v9.CheckSourceFailure(lines, 'E1267: Function name must start with a capital: _Foo(): number', 2)
# Test for initializing a protected funcref instance variable to a protected
# class method from another class
lines =<< trim END
vim9script
class A
static def _Internal(): string
enddef
endclass
class B
var Fn: func = A._Internal
endclass
var b = B.new()
END
v9.CheckSourceFailure(lines, 'E1366: Cannot access protected method: _Internal', 1)
enddef
" Test for an protected class method
def Test_private_class_method()
def Test_protected_class_method()
# Try calling a class protected method (at the script level)
var lines =<< trim END
vim9script
@@ -5680,6 +5697,22 @@ def Test_private_class_method()
assert_equal(1234, C._Foo())
END
v9.CheckSourceFailure(lines, 'E1325: Method "_Foo" not found in class "C"', 16)
# Test for initializing a protected funcref class variable to a protected
# class method from another class
lines =<< trim END
vim9script
class A
static def _Internal(): string
enddef
endclass
class B
static var Fn: func = A._Internal
endclass
END
v9.CheckSourceFailure(lines, 'E1366: Cannot access protected method: _Internal', 10)
enddef
" Test for using the return value of a class/object method as a function
@@ -5938,15 +5971,12 @@ def Test_dup_member_variable()
enddef
" Test for accessing a protected member outside a class in a def function
def Test_private_member_access_outside_class()
# protected object member variable
def Test_protected_member_access_outside_class()
# try to modify a protected instance variable from a def function
var lines =<< trim END
vim9script
class A
var _val = 10
def GetVal(): number
return this._val
enddef
endclass
def T()
var a = A.new()
@@ -5956,7 +5986,7 @@ def Test_private_member_access_outside_class()
END
v9.CheckSourceFailure(lines, 'E1333: Cannot access protected variable "_val" in class "A"', 2)
# access a non-existing protected object member variable
# access a non-existing protected instance variable from a def function
lines =<< trim END
vim9script
class A
@@ -5970,7 +6000,7 @@ def Test_private_member_access_outside_class()
END
v9.CheckSourceFailure(lines, 'E1326: Variable "_a" not found in object "A"', 2)
# protected static member variable
# try to read a protected class variable from a def function using an instance
lines =<< trim END
vim9script
class A
@@ -5984,7 +6014,8 @@ def Test_private_member_access_outside_class()
END
v9.CheckSourceFailure(lines, 'E1375: Class variable "_val" accessible only using class "A"', 2)
# protected static member variable
# try to modify a protected class variable from a def function using an
# instance
lines =<< trim END
vim9script
class A
@@ -5998,7 +6029,7 @@ def Test_private_member_access_outside_class()
END
v9.CheckSourceFailure(lines, 'E1375: Class variable "_val" accessible only using class "A"', 2)
# protected static class variable
# try to read a protected class variable from a def function using the class
lines =<< trim END
vim9script
class A
@@ -6011,7 +6042,7 @@ def Test_private_member_access_outside_class()
END
v9.CheckSourceFailure(lines, 'E1333: Cannot access protected variable "_val" in class "A"', 1)
# protected static class variable
# try to modify a protected class variable from a def function using the class
lines =<< trim END
vim9script
class A
@@ -6023,6 +6054,33 @@ def Test_private_member_access_outside_class()
T()
END
v9.CheckSourceFailure(lines, 'E1333: Cannot access protected variable "_val" in class "A"', 1)
# initialize a protected class variable using a protected class variable
# from another class
lines =<< trim END
vim9script
class A
static var _aval = 10
endclass
class B
static var _bval = A._aval
endclass
END
v9.CheckSourceFailure(lines, 'E1333: Cannot access protected variable "_aval" in class "A"', 7)
# initialize a protected instance variable using a protected class variable
# from another class
lines =<< trim END
vim9script
class A
static var _aval = 10
endclass
class B
var _bval = A._aval
endclass
var b = B.new()
END
v9.CheckSourceFailure(lines, 'E1333: Cannot access protected variable "_aval" in class "A"', 1)
enddef
" Test for changing the member access of an interface in a implementation class
@@ -7088,7 +7146,7 @@ def Test_extend_empty_class()
v9.CheckSourceSuccess(lines)
enddef
" A interface cannot have a static variable or a static method or a private
" A interface cannot have a static variable or a static method or a protected
" variable or a protected method or a public variable
def Test_interface_with_unsupported_members()
var lines =<< trim END
@@ -11686,7 +11744,7 @@ def Test_any_obj_var_type()
END
v9.CheckScriptSuccess(lines)
# Modifying an object private variable from a method in another class using
# Modifying an object protected variable from a method in another class using
# any type
lines =<< trim END
vim9script
@@ -11756,7 +11814,7 @@ def Test_any_obj_var_type()
END
v9.CheckScriptSuccess(lines)
# Try to modify a private object variable using a variable of type "any"
# Try to modify a protected object variable using a variable of type "any"
lines =<< trim END
vim9script

View File

@@ -734,6 +734,24 @@ static char *(features[]) =
static int included_patches[] =
{ /* Add new patch number below this line */
/**/
2009,
/**/
2008,
/**/
2007,
/**/
2006,
/**/
2005,
/**/
2004,
/**/
2003,
/**/
2002,
/**/
2001,
/**/
2000,
/**/

View File

@@ -1314,6 +1314,7 @@ extern int (*dyn_libintl_wputenv)(const wchar_t *envstring);
#define WSP_ABOVE 0x80 // put new window above/left
#define WSP_NEWLOC 0x100 // don't copy location list
#define WSP_FORCE_ROOM 0x200 // ignore "not enough room" errors
#define WSP_QUICKFIX 0x400 // creating the quickfix window
/*
* arguments for gui_set_shellsize()

View File

@@ -2700,7 +2700,10 @@ early_ret:
// Allocate a typval for each class member and initialize it.
if ((is_class || is_enum) && cl->class_class_member_count > 0)
if (add_class_members(cl, eap, &type_list) == FAIL)
goto cleanup;
{
cl->class_type_list = type_list;
return;
}
cl->class_type_list = type_list;

View File

@@ -959,6 +959,11 @@ win_split(int size, int flags)
else
clear_snapshot(curtab, SNAP_HELP_IDX);
if (flags & WSP_QUICKFIX)
make_snapshot(SNAP_QUICKFIX_IDX);
else
clear_snapshot(curtab, SNAP_QUICKFIX_IDX);
return win_split_ins(size, flags, NULL, 0, NULL);
}
@@ -2688,6 +2693,7 @@ win_close(win_T *win, int free_buf)
int close_curwin = FALSE;
int dir;
int help_window = FALSE;
int quickfix_window = FALSE;
tabpage_T *prev_curtab = curtab;
frame_T *win_frame = win->w_frame->fr_parent;
#ifdef FEAT_DIFF
@@ -2740,6 +2746,11 @@ win_close(win_T *win, int free_buf)
else
clear_snapshot(curtab, SNAP_HELP_IDX);
if (bt_quickfix(win->w_buffer))
quickfix_window = TRUE;
else
clear_snapshot(curtab, SNAP_QUICKFIX_IDX);
if (win == curwin)
{
#ifdef FEAT_JOB_CHANNEL
@@ -2845,11 +2856,11 @@ win_close(win_T *win, int free_buf)
// the screen space.
wp = win_free_mem(win, &dir, NULL);
if (help_window)
if (help_window || quickfix_window)
{
// Closing the help window moves the cursor back to the current window
// of the snapshot.
win_T *prev_win = get_snapshot_curwin(SNAP_HELP_IDX);
win_T *prev_win = get_snapshot_curwin(help_window ? SNAP_HELP_IDX : SNAP_QUICKFIX_IDX);
if (win_valid(prev_win))
wp = prev_win;
@@ -2939,10 +2950,11 @@ win_close(win_T *win, int free_buf)
--dont_parse_messages;
#endif
// After closing the help window, try restoring the window layout from
// before it was opened.
if (help_window)
restore_snapshot(SNAP_HELP_IDX, close_curwin);
// After closing the help or quickfix window, try restoring the window
// layout from before it was opened.
if (help_window || quickfix_window)
restore_snapshot(help_window ? SNAP_HELP_IDX : SNAP_QUICKFIX_IDX,
close_curwin);
#ifdef FEAT_DIFF
// If the window had 'diff' set and now there is only one window left in