Problem: build-error with python3.12 and stable ABI (zdohnal)
Solution: Add type casts, define Py_INCREF for Python3.12 and higher
(Ken Takata)
fixes: #15460
Signed-off-by: Ken Takata <kentkt@csc.jp>
Signed-off-by: Christian Brabandt <cb@256bit.org>
Some auto-generated po files cause differences after building Vim.
Update them.
closes: #15468
Signed-off-by: Ken Takata <kentkt@csc.jp>
Signed-off-by: Christian Brabandt <cb@256bit.org>
According to :h win32-PATH, "the same directory as Vim" means the same
directory as the Vim executable, not Vim's current directory. In patch
8.2.4860 these two concepts were mixed up.
closes: #15451
Signed-off-by: zeertzjq <zeertzjq@outlook.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
Problem: Locked variable can be changed in a :for loop.
Solution: Always do a full permission check on the first loop iteration
where ASSIGN_DECL is not set (zeertzjq).
related: #12470fixes: #15450closes: #15454
Signed-off-by: zeertzjq <zeertzjq@outlook.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
Problem: MS-Windows: console vim did not switch back to main screen on
exit
Solution: switch back to main screen on exit (Ken Takata)
`vim.exe --cmd quit` quitted without switching back to the main screen
buffer and the alternate screen buffer was kept shown.
Restore the main screen buffer even when termcap mode has not been
started.
closes: #15443
Signed-off-by: Ken Takata <kentkt@csc.jp>
Signed-off-by: Christian Brabandt <cb@256bit.org>
Problem: zip plugin does not work with Vim 9.0
because of :defer
Solution: raise minimum Vim version to Vim 9.1
Signed-off-by: Christian Brabandt <cb@256bit.org>
Problem: tests: zip test still resets 'shellslash' option
Solution: Remove resetting the 'shellslash' option, the zip
plugin should now be able to handle this options
closes: #15434
Signed-off-by: Christian Brabandt <cb@256bit.org>
Problem: RestoreOpts() plugin called too often
Solution: use :defer to have the RestoreOpts() function
called when the function returns automatically
Signed-off-by: Christian Brabandt <cb@256bit.org>
Problem: the zip plugin duplicates a lot of code for displaying
warnings/errors
Solution: refactor common code into a generic Mess() function
Signed-off-by: Christian Brabandt <cb@256bit.org>
Problem: the zip plugin uses features of Vim 9.0, but
checks for a Vim version >= 7.2
(interpolated strings and readblob() function)
Solution: raise the minimum Vim version to v9.0
Signed-off-by: Christian Brabandt <cb@256bit.org>
Problem: zip plugin has no way to set/restore option values
Solution: Add the SetSaneOpts() and RestoreOpts() functions,
so options that cause issues are set to sane values
and restored back to their initial values later on.
(this affects the 'shellslash' option on windows, which also
changes how the shellescape() function works)
Signed-off-by: Christian Brabandt <cb@256bit.org>
Problem: zip plugin tests for fnameescape() function
Solution: Remove the check, fnameescape() has been available since
7.1.299, it should nowadays always be available
Signed-off-by: Christian Brabandt <cb@256bit.org>
Problem: zip plugin uses :echo which does not store messages
Solution: use :echomsg instead of :echo so that messages are stored in
the message history
Signed-off-by: Christian Brabandt <cb@256bit.org>
Problem: zip plugin contains a lot of comments from the decho plugin
Solution: Clean up and remove un-used comments
Signed-off-by: Christian Brabandt <cb@256bit.org>
Problem: filecopy() may return wrong value when readlink() fails.
Solution: Set ret to -1 so that 0 is returned when readlink() fails.
(zeertzjq)
closes: #15438
Signed-off-by: zeertzjq <zeertzjq@outlook.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
Problem: Cannot browse zipfiles with the unzip program found
on FreeBSD.
Solution: Adjust command arguments.
Unzip found on FreeBSD complain about missing argument with the
zipinfo modifier '-Z -1'. Joining arguments seems to work
for both implementations.
Also change `:sil!` to `:sil` so that error messages are properly
reported (per review of Christian Brabandt).
related: #15411
Signed-off-by: Damien <141588647+xrandomname@users.noreply.github.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
* do not capitalize after a double colon when introducing a list
* Capitalize a header line
closes: #15433
Signed-off-by: Christian Brabandt <cb@256bit.org>
Problem: MS-Windows: Shift-Insert does not work on old conhost
(Nick Jensen, after 9.0.1146)
Solution: handle Shift-Insert specifically
(Christian Plewright)
fixes: #15326closes: #15430
Signed-off-by: Christopher Plewright <chris@createng.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
Problem:
- Current lua indentexpr does not indent for '(' ')'.
- Missing indent test for lua.
Solution:
- Match '(', ')' in `function GetLuaIndentIntern`.
- Add an indent test for lua.
closes: #15364
Signed-off-by: Yinzuo Jiang <jiangyinzuo@foxmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
Problem: After 6f1cbfc9ab483a09877e153ad130164875c40b1d fnameescape()
is no longer called on the name of the file to be extracted.
However, while spaces indeed don't need to be escaped, unzip
treats '[' as a wildcard character, so it need to be escaped.
Solution: Escape '[' on both MS-Windows and Unix.
From the docs it seems '*' and '?' also need escaping, but they seem to
actually work without escaping.
fixes: neovim/neovim#29977
closes: #15427
Signed-off-by: zeertzjq <zeertzjq@outlook.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
Problem: MS-Windows: MSVC Makefile is a bit hard to read
(after v9.1.0657)
Solution: indent the if/else statements to improve readability
(Ken Takata)
closes: #15428
Signed-off-by: Ken Takata <kentkt@csc.jp>
Signed-off-by: Christian Brabandt <cb@256bit.org>
Magenta background Todo is too bright and might interfere with DiffText.
Make it less strong, without background, bold.
closes: #15423
Signed-off-by: Maxim Kim <habamax@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
Problem: MS-Windows: MSVC build time can be optimized
Solution: Stop using Powershell, show detected version, read _MSC_VER
and _MSC_FULL_VER in a single cl execution. (Ken Takata)
closes: #15421
Signed-off-by: Ken Takata <kentkt@csc.jp>
Signed-off-by: Christian Brabandt <cb@256bit.org>
Problem: MS-Windows: MSVC Makefile CPU handling can be improved
Solution: Update Makefile and also remove some old code
(Ken Takata)
* The variable `ASSEMBLY_ARCHITECTURE` was originally used to generate
the manifest file. However, this was removed in v7.0.198. Remove
`ASSEMBLY_ARCHITECTURE` and use `CPU` instead.
* `/arch:AVX512` is available starting from Visual C++ 2017.
* ARM64 was not considered when validating CPUNR.
Skip the validation for ARM64 for now.
* Remove old code for VC6/7 and Win9x.
closes: #15422
Signed-off-by: Ken Takata <kentkt@csc.jp>
Signed-off-by: Christian Brabandt <cb@256bit.org>
Problem: filetype: goaccess config file not recognized
Solution: detect 'goaccess.conf' as goaccess filetype, also
include a basic syntax and ftplugin (Adam Monsen)
Add syntax highlighting for GoAccess configuration file.
GoAccess is a real-time web log analyzer and interactive viewer that
runs in a terminal in *nix systems or through your browser.
GoAccess home page: https://goaccess.iocloses: #15414
Signed-off-by: Adam Monsen <haircut@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
Make `:Sexplore` / `:Hexplore` / `:Vexplore` commands honor the user
`&split{right,below}` settings (or netrw-specific `g:netrw_alt{o,v}`)
instead of hardcoding a split direction. Similarly, update banged
variants of the two latter commands to follow the inverted preference.
closes: #15417
Signed-off-by: Ivan Shapovalov <intelfx@intelfx.name>
Signed-off-by: Christian Brabandt <cb@256bit.org>
Problem: completion does not respect completeslash with fuzzy
(egesip)
Solution: Change path separator on Windows, depending on 'completeslash'
option value (glepnir)
fixes: #15392closes: #15418
Signed-off-by: glepnir <glephunter@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
Problem: too many strlen() calls in syntax.c
Solution: refactor code to reduce the number or strlen() calls,
get rid of un-used SYN_NAMELEN macro
(John Marriott)
closes: #15368
Signed-off-by: John Marriott <basilisk@internode.on.net>
Signed-off-by: Christian Brabandt <cb@256bit.org>
Problem: ex: trailing dot is optional for :g and :insert/:append
Solution: don't break out early, when the next command is empty.
(Mohamed Akram)
The terminating period is optional for the last command in a global
command list.
closes: #15407
Signed-off-by: Mohamed Akram <mohd.akram@outlook.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
Problem: Coverity warning in cstrncmp()
(after v9.1.0645)
Solution: Change the type of n2 to int.
(zeertzjq)
________________________________________________________________________________________________________
*** CID 1615684: Integer handling issues (INTEGER_OVERFLOW)
/src/regexp.c: 1757 in cstrncmp()
1751 n1 -= mb_ptr2len(s1);
1752 MB_PTR_ADV(p);
1753 n2++;
1754 }
1755 // count the number of bytes to advance the same number of chars for s2
1756 p = s2;
>>> CID 1615684: Integer handling issues (INTEGER_OVERFLOW)
>>> Expression "n2--", which is equal to 18446744073709551615, where "n2" is known to be equal to 0, underflows the type that receives it, an unsigned integer 64 bits wide.
1757 while (n2-- > 0 && *p != NUL)
1758 MB_PTR_ADV(p);
1759
1760 n2 = p - s2;
1761
1762 result = MB_STRNICMP2(s1, s2, *n, n2);
closes: #15409
Signed-off-by: zeertzjq <zeertzjq@outlook.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
Problem: Wrong comment for "len" argument of call_simple_func().
Solution: Remove the "or -1 to use strlen()". Also change its type to
size_t to remove one cast. (zeertzjq)
closes: #15410
Signed-off-by: zeertzjq <zeertzjq@outlook.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
Problem: [security] double-free in dialog_changed()
(SuyueGuo)
Solution: Only clear pointer b_sfname pointer, if it is different
than the b_ffname pointer. Don't try to free b_fname,
set it to NULL instead.
fixes: #15403
Github Advisory:
https://github.com/vim/vim/security/advisories/GHSA-46pw-v7qw-xc2f
Signed-off-by: Christian Brabandt <cb@256bit.org>
Problem: [security] use-after-free in tagstack_clear_entry
(Suyue Guo )
Solution: Instead of manually calling vim_free() on each of the tagstack
entries, let's use tagstack_clear_entry(), which will
also free the stack, but using the VIM_CLEAR macro,
which prevents a use-after-free by setting those pointers
to NULL
This addresses CVE-2024-41957
Github advisory:
https://github.com/vim/vim/security/advisories/GHSA-f9cr-gv85-hcr4
Signed-off-by: Christian Brabandt <cb@256bit.org>
Problem: Vim9: imported function may not be found
Solution: Try to find the function by name (Ernie Rael)
fixes: #15381closes: #15382
Signed-off-by: Ernie Rael <errael@raelity.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
And keep non-optional group links at the end of the file.
related: #15399
Signed-off-by: Aliaksei Budavei <0x000c70@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
- Prefix all global variables with "g:".
- Add spaces around each variable assignment operator.
- Remove extraneous whitespace characters.
- Remove a spurious _serializable_ Java keyword (since v1.1,
java.io.Serializable and java.io.Externalizable interfaces
provide an API for object serialization; see vim-6-0j).
- Normalise the syntax definition argument order by making
_contained_ the first argument of each such definition.
- Normalise the argument tabulation for highlighting group
definitions.
Reference:
https://web.archive.org/web/20010821025330/java.sun.com/docs/books/jls/first_edition/html/1.1Update.html
related: #15399
Signed-off-by: Aliaksei Budavei <0x000c70@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>