Clean up docs for macOS defaults. Simply use "Unix" across the board
instead of being inconsistent and occasionally using "Unix, macOS". Also
remove stale defaults that were erroneously renamed to "macOS" from
"Macintosh" when they were actually referring to Mac OS 9 which is no
longer supported.
closes: #15924
Signed-off-by: Yee Cheng Chin <ychin.git@gmail.com> Signed-off-by: Christian Brabandt <cb@256bit.org>
Milly [Mon, 21 Oct 2024 20:20:51 +0000 (22:20 +0200)]
patch 9.1.0797: testing of options can be further improved
Problem: testing of options can be further improved
Solution: split the generated option test into test_options_all.vim,
add more test cases, save and restore values, fix use-after-free
closes: #15894
Signed-off-by: Milly <milly.ca@gmail.com> Signed-off-by: Christian Brabandt <cb@256bit.org>
Milly [Thu, 17 Oct 2024 19:05:31 +0000 (21:05 +0200)]
patch 9.1.0791: tests: errors in gen_opt_test.vim are not shown
Problem: tests: errors in gen_opt_test.vim are not shown
Solution: update gen_opt_test.vim and write test.log,
let the makefile output test.log (Milly)
closes: #15887
Signed-off-by: Milly <milly.ca@gmail.com> Signed-off-by: Christian Brabandt <cb@256bit.org>
Milly [Wed, 16 Oct 2024 20:11:17 +0000 (22:11 +0200)]
runtime(help): Update help syntax
This commit makaes the following changes to the vim help syntax:
- fix excessive URL detection in help, because `file:{filename}` in
doc/options.txt is determined to be a URL.
- update highlighting N for :resize in help
- split Italian-specific syntax into separate help script
- highlight `Note` in parentheses in help
- update 'titlestring' behaviour in documentation for invalid '%' format
closes: #15883
Signed-off-by: Milly <milly.ca@gmail.com> Signed-off-by: Christian Brabandt <cb@256bit.org>
patch 9.1.0788: <CSI>27;<mod>u is not decoded to literal Escape in kitty/foot
Problem: <CSI>27;<mod>u is not decoded to literal Escape in kitty/foot
Solution: disable XTerm modifyOtherKeys form 1 when the kitty protocol is enabled
(Christian Fillion)
patch 9.1.0786: tests: quickfix update test does not test location list
Problem: tests: quickfix update test does not test location list
(after: v9.1.0.785)
Solution: update Test_quickfix_buffer_contents to test with location
lists (Yegappan Lakshmanan)
closes: #15879
Signed-off-by: Yegappan Lakshmanan <yegappan@yahoo.com> Signed-off-by: Christian Brabandt <cb@256bit.org>
patch 9.1.0785: cannot preserve error position when setting quickfix list
Problem: cannot preserve error position when setting quickfix lists
Solution: Add the 'u' action for setqflist()/setloclist() and try
to keep the closes target position (Jeremy Fleischman)
fixes: #15839
closes: #15841
Signed-off-by: Jeremy Fleischman <jeremyfleischman@gmail.com> Signed-off-by: Christian Brabandt <cb@256bit.org>
Boris Staletic [Mon, 14 Oct 2024 18:28:39 +0000 (20:28 +0200)]
patch 9.1.0784: there are several problems with python 3.13
Problem: there are several problems with python 3.13
Solution: fix the problems in the python3 interface (Boris Staletic)
This commit does the following things:
1) Since python 3.13.0b1, all statically defined objects are "immortal".
Besides never getting garbage collected, this also affects reference
counting:
- Immportal objects have a reference count of 2^32-1.
- Reference counting is a no-op.
All this is considered implementation details by cpython, so
documentation is next to non-existent.
Problem: MS-Windows: incorrect Win32 error checking
Solution: fix wrong order of error handling and perform
some minor refactoring (Nir Lichtman)
In the function that adjusts the process privileges there is a mistake
in which GetLastError is called after CloseHandle, though clearly the
last error check is meant for the privileges related call before hand
and the current state appears like a mistake.
So fix this problem, and also perform the following:
- Remove the static variable done since the PlatformId is only called
during initialization
- Fix incorrect parameter passed to the Win32 API privileges function
closes: #15845
Signed-off-by: Nir Lichtman <nir@lichtman.org> Signed-off-by: Christian Brabandt <cb@256bit.org>
Richard Russon [Sun, 13 Oct 2024 17:40:43 +0000 (19:40 +0200)]
patch 9.1.0779: filetype: neomuttlog files are not recognized
Problem: filetype: neomuttlog files are not recognized
Solution: detect '*.neomuttdebug' file as neomuttlog filetype,
include neomuttlog syntax script (Richard Russon)
closes: #15858
Co-authored-by: AvidSeeker <avidseeker7@protonmail.com> Signed-off-by: Richard Russon <rich@flatcap.org> Signed-off-by: Christian Brabandt <cb@256bit.org>
Andis Spriņķis [Sun, 13 Oct 2024 17:29:56 +0000 (19:29 +0200)]
patch 9.1.0778: filetype: lf config files are not recognized
Problem: filetype: lf config files are not recognized
Solution: detect lfrc files as lf filetype, include a syntax
script for lf files (Andis Spriņķis).
References:
- https://github.com/gokcehan/lf
closes: #15859
Signed-off-by: Andis Spriņķis <spr.andis@protonmail.com> Signed-off-by: Christian Brabandt <cb@256bit.org>
nisbet-hubbard [Sat, 12 Oct 2024 15:19:58 +0000 (17:19 +0200)]
patch 9.1.0777: filetype: Some upstream php files are not recognized
Problem: filetype: Some upstream php files are not recognized
Solution: Detect more config files from the PHP source
distribution as filetype ini (nisbet-hubbard).
closes: #15840
Signed-off-by: nisbet-hubbard <87453615+nisbet-hubbard@users.noreply.github.com> Signed-off-by: Christian Brabandt <cb@256bit.org>
James McCoy [Sat, 12 Oct 2024 09:36:58 +0000 (11:36 +0200)]
patch 9.1.0776: test_strftime may fail because of missing TZ data
Problem: test_strftime may fail because of missing TZ data
Solution: Use GMT offsets to validate timezone differences (James McCoy)
Some systems only provide timezones that follow the geographical region
naming (e.g. America/New_York) by default and require an additional
install for other names (like EST).
The GMT+<offset> format must always be honored, so use that to generate
distinct data for the test.
closes: #15848
Signed-off-by: James McCoy <jamessan@jamessan.com> Signed-off-by: Christian Brabandt <cb@256bit.org>
nisbet-hubbard [Thu, 10 Oct 2024 17:09:28 +0000 (19:09 +0200)]
patch 9.1.0773: filetype: some Apache files are not recognized
Problem: filetype: some Apache files are not recognized
Solution: Detect more config files from the Apache source
distribution as filetype apache (nisbet-hubbard)
closes: #15810
Signed-off-by: nisbet-hubbard <87453615+nisbet-hubbard@users.noreply.github.com> Signed-off-by: Christian Brabandt <cb@256bit.org>
glepnir [Tue, 8 Oct 2024 20:26:44 +0000 (22:26 +0200)]
patch 9.1.0771: completion attribute hl_group is confusing
Problem: Currently completion attribute hl_group is combined with
all items, which is redundant and confusing with kind_hlgroup
Solution: Renamed to abbr_hlgroup and combine it only with the abbr item
(glepnir).
closes: #15818
Signed-off-by: glepnir <glephunter@gmail.com> Signed-off-by: Christian Brabandt <cb@256bit.org>
William Bresler [Tue, 8 Oct 2024 19:30:48 +0000 (21:30 +0200)]
patch 9.1.0768: MS-Windows: incorrect cursor position when restoring screen
Problem: MS-Windows: incorrect cursor position when restoring screen
(after v9.1.0664)
Solution: Restore the VTP command for switching screens back to
termcap_mode_end() (William Bresler)
Patch 9.1.0664 moved the VTP command for switching back to the main
screen buffer from termcap_mode_end() to mch_exit_c(). However, the
saved cursor position from the main screen continued to be restored
in termcap_mode_end(). This failed if the cursor position was beyond
the console window height, since the alternate screen buffer is always
the same size as the console window.
This patch restores the VTP command for switching back to the main
screen buffer to termcap_mode_end(). In order to preserve the effect
of patch 9.1.0664, the VTP command for switching back to the main
screen buffer in mch_exit_c() is issued only if termcap mode was not
active while exiting Vim.
See issue 15775 for a fuller description, with screen shots of the
problem.
fixes: #15775
closes: #15829
Signed-off-by: William Bresler <wbresler@gmail.com> Signed-off-by: Ken Takata <kentkt@csc.jp> Signed-off-by: Christian Brabandt <cb@256bit.org>
zeertzjq [Tue, 8 Oct 2024 19:04:19 +0000 (21:04 +0200)]
patch 9.1.0767: A condition is always true in ex_getln.c
Problem: A cmdlen == 0 condition is always true as ccline.cmdlen == 0
was already checked above (after v9.1.0766).
Solution: Remove the condition and the variable.
(zeertzjq)
closes: #15830
Signed-off-by: zeertzjq <zeertzjq@outlook.com> Signed-off-by: Christian Brabandt <cb@256bit.org>
runtime(skill): Update syntax file to fix string escapes
The syntax script allowed for single backslash escapes like this
"string\""
But did not accommodate for the uncommon case:
"<key>\\"
Let's fix this by also skipping over double backslashes in the
skillString region.
When using heirloom `vi` originally written by Bill Joy (`:version`
gives me "Version 4.0 (gritter) 12/25/06"), its possible to store text into
registers 1-9 and subsequently use the `:edit` or `:next` command to
change files and paste the contents of those numbered registers,
contrary to what Vim documentation states.
POSIX description also does not mention such a restriction:
https://pubs.opengroup.org/onlinepubs/9799919799/utilities/ex.html#tag_20_40_13_10
closes: #15814
Signed-off-by: Frederick Key Abell III <fkabell@localhost.localdomain> Signed-off-by: Christian Brabandt <cb@256bit.org>
zeertzjq [Mon, 7 Oct 2024 19:05:06 +0000 (21:05 +0200)]
patch 9.1.0765: No test for patches 6.2.418 and 7.3.489
Problem: No test for patches 6.2.418 and 7.3.489
Solution: Add a test. Fix some whitespace problems in test_mapping.vim.
Document the behavior (zeertzjq).
closes: #15815
Signed-off-by: zeertzjq <zeertzjq@outlook.com> Signed-off-by: Christian Brabandt <cb@256bit.org>
K.Takata [Mon, 7 Oct 2024 18:37:00 +0000 (20:37 +0200)]
NSIS: Include libgcc_s_sjlj-1.dll again
gettext-iconv-windows v0.22.5a-v1.17 requires libgcc_s_sjlj-1.dll again.
Add a new option ${INCLUDE_LIBGCC} to control whether it should be
included in the package.
patch 9.1.0764: [security]: use-after-free when closing a buffer
Problem: [security]: use-after-free when closing a buffer
Solution: When splitting the window and editing a new buffer,
check whether the newly to be edited buffer has been marked
for deletion and abort in this case
Doug Kearns [Sun, 6 Oct 2024 15:00:48 +0000 (17:00 +0200)]
runtime(vim): Update base-syntax file, improve class, enum and interface highlighting
- Enable folding of class, enum and interface declarations.
- Highlight constructor names with the Function highlight group, like
other special methods.
- Mark function definitions using special method names as errors.
- Highlight :type arguments.
patch 9.1.0763: tests: cannot run single syntax tests
Problem: tests: cannot run single syntax tests
Solution: Support running a subset of syntax tests
(Aliaksei Budavei)
Two methods of assembling a subset of test filenames for
selection are provided:
* Filename and filetype Make targets will be generated, and
multiple such targets can be passed before the mandated
trailing "test" target, e.g. "make html markdown test".
* Filenames and their parts can be specified as a regular
expression that is assigned to a "VIM_SYNTAX_TEST_FILTER"
environment variable, and used with the test Make target,
e.g. "VIM_SYNTAX_TEST_FILTER=html\\\|markdown make test".
(This variable will be ignored and the whole suite will be
run when Make is GNU Make and a parent Makefile is used.)
Methods can be used alone or together, with the Make targets
having the higher precedence. Neither method will influence
the order of test execution.
closes: #15670
Signed-off-by: Aliaksei Budavei <0x000c70@gmail.com> Signed-off-by: Christian Brabandt <cb@256bit.org>
Milly [Sun, 6 Oct 2024 14:47:02 +0000 (16:47 +0200)]
patch 9.1.0762: 'cedit', 'termwinkey' and 'wildchar' may not be parsed correctly
Problem: 'cedit', 'termwinkey' and 'wildchar' may not be parsed
correctly
Solution: improve string_to_key() function in option.c
(Milly)
- Problem: `^@` raises an error.
Solution: Store as `<Nul>`.
- Problem: `<t_xx` does not raise an error.
Solution: Raise an error if closing `>` is missing.
- Problem: Single `<` or `^` raises an error. It is inconvenient for users.
Solution: They are stored as a single character.
closes: #15811
Signed-off-by: Milly <milly.ca@gmail.com> Signed-off-by: Christian Brabandt <cb@256bit.org>
patch 9.1.0761: :cd completion fails on Windows with backslash in path
Problem: :cd completion fails on Windows with backslash in path
Solution: switch no_bslash argument to FALSE in file_pat_to_reg_pat()
Note: only fixes the problem on Windows. For Unix, we still need to
escape backslashes since those are taken as regex atoms (and could be
invalid regex atoms).
patch 9.1.0759: screenpos() may return invalid position
Problem: screenpos() may return invalid position
after switching buffers (Greg Hurrell)
Solution: reset w_leftcol if wrapping has been set
after copying wrap option
is too large if the block of lines to be operated on contains different
whitespace indenting (tab vs. spaces).
Considering using `2gcc` on the first line with 4 spaces as indenting
and on the next line using a single tab character (with &tabstop value
of 8):
Using `strlen(indent_start) = 4` for an initial indent of 4 spaces is
correct for the first line, but wrong for the next line and will
therefore wrongly comment out the tab-indented line (and possibly
deleting some content).
The new check is still too simple because it assumes that as soon as
there's a tab the whole indent is made of tabs; it's a start of entering
the mixed tab and whitespace indent rabbit hole.
fixes: #15797
closes: #15805
Signed-off-by: Konfekt <Konfekt@users.noreply.github.com> Signed-off-by: Christian Brabandt <cb@256bit.org>
runtime(java): Manage circularity for every :syn-included syntax file
With "g:markdown_fenced_languages" defined and "java" added
to its list, a circular dependency between the Markdown and
Java syntax files will be made. To break it, no Markdown
documentation comments will be recognised in fenced blocks
in Markdown files; in order to view Java source files,
"java" must be removed from "g:markdown_fenced_languages",
and this task can be automated as follows.
1) Add to "~/.after/ftplugin/java.vim":
------------------------------------------------------------
if exists("g:markdown_fenced_languages") &&
\ !(exists("g:java_ignore_javadoc") ||
\ exists("g:java_ignore_markdown"))
let s:idx = index(g:markdown_fenced_languages, 'java')
if s:idx > -1
call remove(g:markdown_fenced_languages, s:idx)
endif
unlet s:idx
endif
------------------------------------------------------------
2) Optionally add to "~/.after/ftplugin/markdown.vim":
------------------------------------------------------------
if exists("g:markdown_fenced_languages") &&
\ index(g:markdown_fenced_languages, 'java') < 0
call add(g:markdown_fenced_languages, 'java')
endif
------------------------------------------------------------
(Make sure that the above snippets appear in the files under
the "ftplugin" NOT "syntax" directory.)
Finally, unless the new version of the syntax file is made
available from "$VIMRUNTIME" (and from "~/.vim/syntax" if
necessary), OTHER discoverable file versions will be used
whose behaviour may interfere with this fix.
related: #15740
closes: #15796
Signed-off-by: Aliaksei Budavei <0x000c70@gmail.com> Signed-off-by: Christian Brabandt <cb@256bit.org>
glepnir [Tue, 1 Oct 2024 18:32:12 +0000 (20:32 +0200)]
patch 9.1.0754: fixed order of items in insert-mode completion menu
Problem: fixed order of items in insert-mode completion menu
Solution: Introduce the 'completeitemalign' option with default
value "abbr,kind,menu" (glepnir).
Adding an new option `completeitemalign` abbr is `cia` to custom
the complete-item order in popupmenu.
closes: #14006
closes: #15760
Signed-off-by: glepnir <glephunter@gmail.com> Signed-off-by: Christian Brabandt <cb@256bit.org>
dundargoc [Tue, 1 Oct 2024 17:24:02 +0000 (19:24 +0200)]
runtime(doc): add `usr` tag to usr_toc.txt
When typing `:h usr` it redirects to usr_01.txt, but I'd argue
usr_toc.txt is more useful as you can see an overview of all manuals.
When I usr `:h usr` I personally always intend to go to `usr_toc`.
closes: #15779
Signed-off-by: dundargoc <gocdundar@gmail.com> Signed-off-by: Christian Brabandt <cb@256bit.org>
runtime(java): Recognise the CommonMark form (///) of Javadoc comments
Complement "g:java_ignore_javadoc" with "g:java_ignore_html"
and "g:java_ignore_markdown" to allow selectively disabling
the recognition of HTML and CommonMark respectively.
> Any leading whitespace and the three initial / characters
> are removed from each line.
>
> The lines are shifted left, by removing leading whitespace
> characters, until the non-blank line with the least
> leading whitespace has no remaining leading whitespace.
>
> Additional leading whitespace and any trailing whitespace
> in each line is preserved, because it may be significant.
the following example:
------------------------------------------------------------
/// A summary sentence.
/// A list:
/// - Item A.
/// - Item B.
///
/// Some code span, starting here `
/// 1 + 2 ` and ending at the previous \`.
------------------------------------------------------------
should be interpreted as if it were written thus:
------------------------------------------------------------
///A summary sentence.
/// A list:
/// - Item A.
/// - Item B.
///
/// Some code span, starting here `
/// 1 + 2 ` and ending at the previous \`.
------------------------------------------------------------
Since automatic line rewriting will not be pursued, parts of
such comments having significant whitespace may be ‘wrongly’
highlighted. For convenience, a &fex function is defined to
‘correct’ it: g:javaformat#RemoveCommonMarkdownWhitespace()
(:help ft-java-plugin).