glepnir [Tue, 31 Dec 2024 09:55:22 +0000 (10:55 +0100)]
patch 9.1.0983: not able to get the displayed items in complete_info()
Problem: not able to get the displayed items in complete_info()
(Evgeni Chasnovski)
Solution: return the visible items via the "matches" key for
complete_info() (glepnir)
fixes: #10007
closes: #16307
Signed-off-by: glepnir <glephunter@gmail.com> Signed-off-by: Christian Brabandt <cb@256bit.org>
Andrea Pappacoda [Tue, 31 Dec 2024 09:46:22 +0000 (10:46 +0100)]
runtime(doc): use standard SGR format at :h xterm-true-color
By default, Vim uses the non-standard, but widely supported, legacy
xterm/Konsole format for setting "direct colors" with set setaf and
setbf escape codes, which use semicolons as separators.
The documentation for xterm-true-color mentions that, as an alternative,
users can set alternative sequences that use colons instead of
semicolons. This format, though, isn't standard and it is unclear how
widely supported it is; it was added by xterm patch 282 due to a
misinterpretation of the ISO 8613-6 (ITU T.416) standard, and was later
changed to the format suggested by this patch, which is the one
specified in the standard.
Today, looking at ncurses' [terminfo], it seems that all terminal
emulators use either the standard format (named "xterm+direct" in the
terminfo source) or the legacy format (named "xterm+indirect" in the
terminfo source).
Hence, I believe it makes sense to align the docs with reality.
If you're interested in the story of this escape sequence, I'd recommend
reading
<https://invisible-island.net/ncurses/ncurses.faq.html#xterm_16MegaColors>.
Wu, Zhenyu [Tue, 31 Dec 2024 09:25:44 +0000 (10:25 +0100)]
patch 9.1.0982: TI linker files are not recognized
Problem: TI linker files are not recognized
Solution: inspect '*.cmd' files and detect TI linker files
as 'lnk' filetype, include a lnk ftplugin and syntax
script (Wu, Zhenyu)
closes: #16320
Signed-off-by: Wu, Zhenyu <wuzhenyu@ustc.edu> Signed-off-by: Christian Brabandt <cb@256bit.org>
patch 9.1.0980: no support for base64 en-/decoding functions in Vim Script
Problem: no support for base64 en-/decoding functions in Vim Script
(networkhermit)
Solution: Add the base64_encode() and base64_decode() functions
(Yegappan Lakshmanan)
fixes: #16291
closes: #16330
Signed-off-by: Yegappan Lakshmanan <yegappan@yahoo.com> Signed-off-by: Christian Brabandt <cb@256bit.org>
Aliaksei Budavei [Mon, 30 Dec 2024 09:23:50 +0000 (10:23 +0100)]
syntax(sh): Improve the recognition of bracket expressions
- Define a general non-"contained" "shBracketExpr" group,
and replace with it the "contained" bracket variant of
"shOperator", adjusting the patterns for the competing
conditional commands "[" and "[[".
- Accommodate some unbalanced brackets (e.g. "[!][!]").
- Make the leading "!" (or "^") stand out in NON-matching
bracket expressions.
- Support literal newlines in parametric patterns (along
with pathname globbings and "case" patterns).
- Also match bracket expressions in:
* parametric patterns (e.g. "${1#[ab]_}");
* pathname globbings (e.g. "[ab]*.txt");
* arguments for the "[[", "echo", and "print" commands.
- Recognise collating symbols (e.g. "[.a.]") and equivalence
classes (e.g. "[=a=]").
- Recognise end patterns for a pattern substitution form of
parameter expansion and match bracket expressions in such
patterns (e.g. "${1/%[.!]/;}").
patch 9.1.0978: GUI tests sometimes fail when setting 'scroll' options
Problem: GUI tests sometimes fail when setting 'scroll' options
Solution: decrease the 'scroll' and 'scrolljump' option value from 20 to
15, in case the Gui window is not large enough to handle 20.
tests: decrease the scroll and scrolljump values
the gui tests sometimes fail with:
```
From test_options_all.vim:
Found errors in Test_opt_set_scroll():
Caught exception in Test_opt_set_scroll(): Vim(set):E49: Invalid scroll size: scroll=20 @ command line..script /home/runner/work/vim/vim/src/testdir/runtest.vim[617]..function RunTheTest[57]..Test_opt_set_scroll, line 7
Found errors in Test_opt_set_scrolljump():
Caught exception in Test_opt_set_scrolljump(): Vim(set):E49: Invalid scroll size: scrolljump=20 @ command line..script /home/runner/work/vim/vim/src/testdir/runtest.vim[617]..function RunTheTest[57]..Test_opt_set_scrolljump, line 9
```
patch 9.1.0976: Vim9: missing return statement with throw
Problem: Vim9: missing return statement with throw
(atitcreate)
Solution: Treat a throw statement at the end of an if-else block as a
return statement (Yegappan Lakshmanan)
fixes: #16312
closes: #16338
Signed-off-by: Yegappan Lakshmanan <yegappan@yahoo.com> Signed-off-by: Christian Brabandt <cb@256bit.org>
John Marriott [Sun, 29 Dec 2024 15:14:19 +0000 (16:14 +0100)]
patch 9.1.0973: too many strlen() calls in fileio.c
Problem: too many strlen() calls in fileio.c
Solution: refactor fileio.c and remove calls to STRLEN(),
check for out-of-memory condition in buf_check_timestamp()
(John Marriott)
closes: #16306
Signed-off-by: John Marriott <basilisk@internode.on.net> Signed-off-by: Christian Brabandt <cb@256bit.org>
Wu, Zhenyu [Wed, 25 Dec 2024 09:37:57 +0000 (10:37 +0100)]
patch 9.1.0961: filetype: TI gel files are not recognized
Problem: filetype: TI gel files are not recognized
Solution: detect '*.gel' files as gel filetype, include
get filetype and syntax plugins
(Wu, Zhenyu)
Wu, Zhenyu [Wed, 25 Dec 2024 09:33:57 +0000 (10:33 +0100)]
patch 9.1.0960: filetype: hy history files are not recognized
Problem: filetype: hy history files are not recognized
Solution: detect '*.hy', '.hy-history' files as hy filetype,
detect '.lips_repl_history' files are scheme filetype
(Wu, Zhenyu)
closes: #16298
Signed-off-by: Wu, Zhenyu <wuzhenyu@ustc.edu> Signed-off-by: Christian Brabandt <cb@256bit.org>
Fredrik [Wed, 25 Dec 2024 09:28:29 +0000 (10:28 +0100)]
translation(fi): Fix typoes in Finish menu translation
fixes: #16285
closes: #16286
Signed-off-by: Fredrik <fredrik.oljemark@helsinki.fi> Signed-off-by: Flammie A Pirinen <flammie@iki.fi> Signed-off-by: Christian Brabandt <cb@256bit.org>
glepnir [Tue, 24 Dec 2024 08:44:35 +0000 (09:44 +0100)]
patch 9.1.0956: completion may crash, completion highlight wrong with preview window
Problem: completion may crash, completion highlight wrong with preview
window (after v9.1.0954)
Solution: correctly calculate scroll offset, check for preview window
when adding extra highlighting
(glepnir)
when there have a preview window prepare_tagpreview
will change curwin to preview window and this may cause
ComplMatchIns check condition not correct. check wp is curwin
and also the type of wp is not a preview or poup info
fixes: #16284
closes: #16283
Signed-off-by: glepnir <glephunter@gmail.com> Signed-off-by: Christian Brabandt <cb@256bit.org>
Jon Parise [Mon, 23 Dec 2024 08:57:42 +0000 (09:57 +0100)]
runtime(graphql): contribute vim-graphql to Vim core
Contribute the core of my vim-graphql project (ftplugin, indent, syntax)
to the Vim project. This replaces the basic ftplugin support that was
already in the runtime with a more complete set of filetype settings. I
can assume maintainership for all of these files.
I'll continue to maintain the higher-level embedded filetype support
separately (in vim-graphql) for now, because it's fairly complex, but we
can consider integrating that code directly into vim later.
runtime files use the MIT license.
closes: #16273
Signed-off-by: Jon Parise <jon@indelible.org> Signed-off-by: Christian Brabandt <cb@256bit.org>
patch 9.1.0953: filetype: APKBUILD files not correctly detected
Problem: filetype: APKBUILD files not correctly detected
Solution: detect 'APKBUILD' files as apkbuild filetype,
include a apkbuild syntax script (which basically
just sources the sh.vim syntax file)
(Hugo Osvaldo Barrera)
Vim plugins (e.g.: ALE, nvim-lspconfig, etc) rely on filetype to
determine which integrations/helpers are applicable. They expect
filetype=apkbuild for APKBUILD files.
On the other hand, plugins also enable bash-specific linters and
functionality when filetype=bash, but APKBUILD files are POSIX sh, not
bash, so these often provide bogus results.
Change the filetype for APKBUILD to a 'apkbuild', so that tools and
ftplugin can properly target these files. This filetype will use the
existing `sh` syntax rules, since these are applicable for them.
Signed-off-by: Hugo Osvaldo Barrera' via vim_dev <vim_dev@googlegroups.com> Signed-off-by: Christian Brabandt <cb@256bit.org>
patch 9.1.0952: Vim9: missing type checking for any type assignment
Problem: Vim9: missing type checking for any type assignment
(Ernie Rael)
Solution: when assigning to a list item, if the type of the LHS item is
any, then use the list item type (Yegappan Lakshmanan)
fixes: #15208
closes: #16274
Signed-off-by: Yegappan Lakshmanan <yegappan@yahoo.com> Signed-off-by: Christian Brabandt <cb@256bit.org>
Konfekt [Fri, 20 Dec 2024 18:41:02 +0000 (19:41 +0100)]
runtime(netrw): do not double escape Vim special characters
This double escaping was likely introduced because it was the only way
to make :Open work with hashes/percent signs despite shellescape(..., 1)
supposedly taking care of it, but then breaks the gx mapping
on MSYS2 as reported at [0]
Since special characters in the URL following :Open can be escaped,
whereas gx simply breaks and is more common, no longer double escape
[0]: https://github.com/vim/vim/issues/16252
fixes: #16252
closes: #16265
Signed-off-by: Konfekt <Konfekt@users.noreply.github.com> Signed-off-by: Christian Brabandt <cb@256bit.org>
Boris Staletic [Thu, 19 Dec 2024 19:22:19 +0000 (20:22 +0100)]
patch 9.1.0949: popups inconsistently shifted to the left
Problem: popups inconsistently shifted to the left
Solution: always shift non-fixed popups to the left when the
text would be truncated
(no matter whether 'wrap' is set or not)
(Boris Staletic)
fixes: #16231
closes: #16247
Signed-off-by: Boris Staletic <boris.staletic@protonmail.com> Signed-off-by: Christian Brabandt <cb@256bit.org>
Brandon Maier [Wed, 18 Dec 2024 20:18:01 +0000 (21:18 +0100)]
patch 9.1.0946: cross-compiling fails on osx-arm64
Problem: cross-compiling fails on osx-arm64
Solution: use vim_cv_timer_create_with_lrt() instead of
vim_cv_timer_create_works() (Brandon Maier)
Cross-compiling to osx-arm64 fails with the following
In file included from json.c:17:
In file included from ./vim.h:457:
./macros.h:304:24: error: expected identifier or '('
304 | static inline int isnan(double x)
| ^
.../MacOSX11.0.sdk/usr/include/math.h:165:7: note: expanded from macro 'isnan'
165 | ( sizeof(x) == sizeof(float) ? __inline_isnanf((float)(x))
| ^
This can be traced back to ./configure incorrectly detecting the
compiler support for `isnan()`, from the config.log:
configure:14567: checking for isnan()
configure:14588: arm64-apple-darwin20.0.0-clang <...> -L$PREFIX/lib conftest.c -lncurses -ltinfo -lrt >&5
ld: library not found for -lrt
arm64-apple-darwin20.0: error: linker command failed with exit code 1 (use -v to see invocation)
The `-lrt` linking is added by ./configure script when it detects
compiler support for `timer_create()`. On the osx-arm64 platform
`timer_create()` works but does not link with `-lrt`. This results in
the following settings from config.log:
zeertzjq [Wed, 18 Dec 2024 20:12:25 +0000 (21:12 +0100)]
patch 9.1.0945: ComplMatchIns highlight doesn't end after inserted text
Problem: ComplMatchIns highlight doesn't end after inserted text.
Solution: Handle ComplMatchIns highlight more like search highlight.
Fix off-by-one error. Handle deleting text properly.
(zeertzjq)
closes: #16244
Signed-off-by: zeertzjq <zeertzjq@outlook.com> Signed-off-by: Christian Brabandt <cb@256bit.org>
This partly reverts commit 98874dca6d0b60ccd6fc3a140b3ec1cc3e560f95,
but keeps the added changes from #16240, since the re-generated sv.po
file fails the Vim check.vim script in the CI test suite.
patch 9.1.0938: exclusive selection not respected when re-selecting block mode
Problem: exclusive selection not respected when re-selecting block mode
(Matt Ellis)
Solution: advance selection by another character when using
selection=exclusive and visual block mode
Aliaksei Budavei [Mon, 16 Dec 2024 20:37:54 +0000 (21:37 +0100)]
patch 9.1.0935: SpotBugs compiler can be improved
Problem: SpotBugs compiler can be improved
Solution: runtime(compiler): Improve defaults and error handling for
SpotBugs; update test_compiler.vim (Aliaksei Budavei)
runtime(compiler): Improve defaults and error handling for SpotBugs
* Keep "spotbugs#DefaultPreCompilerTestAction()" defined but
do not assign its Funcref to the "PreCompilerTestAction"
key of "g:spotbugs_properties": there are no default and
there can only be introduced arbitrary "*sourceDirPath"
entries; therefore, this assignment is confusing at best,
given that the function's implementation delegates to
whatever "PreCompilerAction" is.
* Allow for the possibility of relative source pathnames
passed as arguments to Vim for the Javac default actions,
and the necessity to have them properly reconciled when
the current working directory is changed.
* Do not expect users to remember or know that new source
files ‘must be’ ":argadd"'d to be then known to the Javac
default actions; so collect the names of Java-file buffers
and Java-file Vim arguments; and let users providing the
"@sources" file-lists in the "g:javac_makeprg_params"
variable update these file-lists themselves.
* Strive to not leave behind a fire-once Syntax ":autocmd"
for a Java buffer whenever an arbitrary pre-compile action
errors out.
* Only attempt to run a post-compiler action in the absence
of failures for a pre-compiler action. Note that warnings
and failures are treated alike (?!) by the Javac compiler,
so when previews are tried out with "--enable-preview",
remember about passing "-Xlint:-preview" too to also let
SpotBugs have a go.
* Properly group conditional operators when testing for key
entries in a user-defined variable.
* Also test whether "javaExternal" is defined when choosing
an implementation for source-file parsing.
* Two commands are provided to toggle actions for buffer-local
autocommands:
- SpotBugsRemoveBufferAutocmd;
- SpotBugsDefineBufferAutocmd.
For example, try this from "~/.vim/after/ftplugin/java.vim":
------------------------------------------------------------
if exists(':SpotBugsDefineBufferAutocmd') == 2
SpotBugsDefineBufferAutocmd BufWritePost SigUSR1
endif
------------------------------------------------------------
And ":doautocmd java_spotbugs User" can be manually used at will.
closes: #16140
Signed-off-by: Aliaksei Budavei <0x000c70@gmail.com> Signed-off-by: Christian Brabandt <cb@256bit.org>
Problem: new Italian tutor not installed
Solution: add Makefile rule, include it into the Filelist
("Philip H." <47042125+pheiduck@users.noreply.github.com>),
update the tutors help file
closes: #16215
Co-authored-by: Philip H. <47042125+pheiduck@users.noreply.github.com> Signed-off-by: Philip H. <47042125+pheiduck@users.noreply.github.com> Signed-off-by: Christian Brabandt <cb@256bit.org>