Phạm Bình An [Thu, 1 May 2025 15:40:15 +0000 (17:40 +0200)]
runtime(doc): update example ctags program and links
- :helptags is also a tags generating program, it deserves mentioning
- JTags seems too dead: its website has been sold, the source, binary
can't be found anywhere.
- update link of ptags
closes: #17233
Signed-off-by: Phạm Bình An <111893501+brianhuster@users.noreply.github.com> Signed-off-by: Christian Brabandt <cb@256bit.org>
Phạm Bình An [Thu, 1 May 2025 15:30:58 +0000 (17:30 +0200)]
patch 9.1.1357: Vim incorrectly escapes tags with "[" in a help buffer
Problem: Vim incorrectly escapes tags containing "[" in a help buffer
Solution: check if the buffer has the "help" filetype set, instead of
already being a help buffer (Phạm Bình An)
fixes: #17224
closes: #17232
Co-authored-by: Christian Brabandt <cb@256bit.org> Co-authored-by: zeertzjq <zeertzjq@outlook.com> Signed-off-by: Phạm Bình An <phambinhanctb2004@gmail.com> Signed-off-by: Christian Brabandt <cb@256bit.org>
patch 9.1.1355: The pum_redraw() function is too complex
Problem: The pum_redraw function is too complex and difficult to
maintain with nested loops and mixed responsibilities handling
both RTL and LTR text rendering.
Solution: Extracted core rendering logic into dedicated helper functions
(pum_display_rtl_text, pum_display_ltr_text, pum_draw_scrollbar,
pum_process_item) while preserving the original behavior. This
improves code readability and maintainability (glepnir).
closes: #17204
Signed-off-by: glepnir <glephunter@gmail.com> Signed-off-by: Christian Brabandt <cb@256bit.org>
patch 9.1.1354: tests: Test_terminalwinscroll_topline() fails on Windows
Problem: tests: Test_terminalwinscroll_topline() fails on Windows
(after v9.1.1348)
Solution: instead of disabling it in Github Actions runners, disable it
for all Windows runs
patch 9.1.1351: Return value of getcmdline() inconsistent in CmdlineLeavePre
Problem: Return value of getcmdline() inconsistent in CmdlineLeavePre
when leaving cmdline in different ways (after v9.1.1329).
Solution: Trigger CmdlineLeavePre before calling abandon_cmdline() so
that getcmdline() can return the command line (zeertzjq).
runtime(java): Consent to HTML tags folding in Javadoc comments
HTML tags in Javadoc comments can additionally be folded
after applying
------------------------------------------------------------
let g:html_syntax_folding = 1
set foldmethod=syntax
------------------------------------------------------------
and giving explicit consent with
------------------------------------------------------------
let g:java_consent_to_html_syntax_folding = 1
------------------------------------------------------------
Do not default to this kind of folding unless ALL start tags
and optional end tags are balanced in Javadoc comments;
otherwise, put up with creating runaway folds that break
syntax highlighting.
resolves: zzzyxwvut/java-vim#8.
closes: #17216
Signed-off-by: Aliaksei Budavei <0x000c70@gmail.com> Signed-off-by: Christian Brabandt <cb@256bit.org>
Problem: CmdlineLeavePre may trigger twice
(after v9.1.1329)
Solution: check that the key was typed, trigger it when it wasn't before
(Girish Palya)
There are two problems:
- CmdlineLeavePre may be triggered twice when a cabbr is present.
- CmdlineLeavePre fails to trigger when exiting the command-line via
<Backspace>.
Check if the Carriage Return (Enter) key was actually typed.
Trigger the event when the command-line is exited using Backspace and
other keys.
closes: #17214
Signed-off-by: Girish Palya <girishji@gmail.com> Signed-off-by: Christian Brabandt <cb@256bit.org>
This commit contains the following changes:
- Fixes Warning 1:
The prototype of `GetMenuState()` says that it returns a UINT, but
returns -1 on failure. Huh?!?
Also, Microsoft says that this function has been superseded (see
https://learn.microsoft.com/en-us/windows/win32/api/winuser/nf-winuser-getmenustate)
and replaced by `GetMenuItemInfo()`. Both of these functions have a
minimum support of Windows 2000.
Therefore in `_OnMenuSelect()`, replace the call to `GetMenuState()`
with `GetMenuItemInfo()`.
- Fixes Warning 2:
Add `UNUSED` to the definition of `_OnGetDpiScaledSize()`.
- Simplify `logfont2name()`.
- Add small optimisations in `_OnNotify()` and `gui_mch_do_spawn()`.
- Add out-of-memory check in `gui_mch_do_spawn()`.
- Code cosmetics (see definitions of `process_message_usual_key_classic()`
and `process_message()`).
closes: #17208
Signed-off-by: John Marriott <basilisk@internode.on.net> Signed-off-by: Christian Brabandt <cb@256bit.org>
runtime(doc): clarify complete_match() and 'isexpand' option
clarify complete_match() documentation to better explain its backward
search behavior, argument handling, and return value format and add an
example of isexpand
closes: #17212
Signed-off-by: glepnir <glephunter@gmail.com> Signed-off-by: Christian Brabandt <cb@256bit.org>
John Marriott [Fri, 25 Apr 2025 17:14:38 +0000 (19:14 +0200)]
patch 9.1.1346: missing out-of-memory check in textformat.c
Problem: missing out-of-memory check in textformat.c
Solution: add out-of-memory check, add small optimizations to
internal_format() and same_leader() (John Marriott)
closes: #17200
Signed-off-by: John Marriott <basilisk@internode.on.net> Signed-off-by: Christian Brabandt <cb@256bit.org>
patch 9.1.1345: tests: Test_xxd_color2() test failure dump diff is misleading
Problem: tests: Test_xxd_color2() test failure dump diff is misleading
Solution: Ensure the reference dump and the test dump are both processed the
same (Drew Vogel).
Background:
Commit b6dc76b6fd23e571d309064b795847ee9ffc7689 sought to make the xxd
screendump tests compatible with non-standard `XXD` overrides. It provides a
vim script that matches a very general `xxd` command pattern but then also
removed the matching line from the reference dump. This second step was
unnecessary because `VerifyScreenDump()` runs the associated vim script against
both the reference dump and the test dump.
Problem Details:
As part of some unrelated work, the GUI tests were failing with a window size 1
column too narrow. The screendumps in `Test_xxd_color2` were failing as a
result. When I loaded the diff using `term_dumpdiff()` the associated vim
scripts are not run. As a result, the test dump contained the `xxd` invocation
on line 1 while reference dump did not. This throws the diff off, obscuring the
true issue of the GUI window being too narrow.
Verification:
In addition to the test suite, locally I've tried to recreate the issue being
fixed in b6dc76b6fd23e571d309064b795847ee9ffc7689. Setting a very non-standard
`XXD` path, this test still passes:
```
XXD=/home/dvogel/opt/vim/bin/xxd TEST_FILTER=Test_xxd_color2 TERM=xterm-color make test_xxd
rm -f test_xxd.res test.log messages starttime
if test -n "${ASAN_OPTIONS}"; then \
XXD=../xxd/xxd; export XXD; ASAN_OPTIONS="${ASAN_OPTIONS}_test_xxd" \
UBSAN_OPTIONS="${UBSAN_OPTIONS}_test_xxd" VIMRUNTIME=../../runtime ../vim -f \
-u unix.vim --gui-dialog-file guidialog -U NONE --noplugin --not-a-term -S \
runtest.vim test_xxd.vim ; \
fi
From test_xxd.vim:
Executed Test_xxd_color2() in 0.066049 seconds
Filtered 17 tests with $TEST_FILTER and $TEST_SKIP_PAT
Executed 1 test in 0.096862 seconds
```
closes: #17202
Signed-off-by: Drew Vogel <dvogel@github> Signed-off-by: Christian Brabandt <cb@256bit.org>
patch 9.1.1344: double free in f_complete_match() (after v9.1.1341)
Problem: double free in f_complete_match() (after v9.1.1341)
Solution: remove additional free of trig pointer, correctly free
regmatch.regprog and before_cursor in the error case
closes: #17203
Signed-off-by: glepnir <glephunter@gmail.com> Signed-off-by: Christian Brabandt <cb@256bit.org>
patch 9.1.1342: Shebang filetype detection can be improved
Problem: Shebang filetype detection can be improved
Solution: Improve detection logic (Eisuke Kawashima)
Vim does not correctly detect filetype from
- `#!/usr/bin/env --split-string=awk -f`
- `#!/usr/bin/env -S -i awk -f`
- `#!/usr/bin/env -S VAR= awk -f`
So update the current detection logic to detect those cases.
closes: #17199
Signed-off-by: Eisuke Kawashima <e-kwsm@users.noreply.github.com> Signed-off-by: Christian Brabandt <cb@256bit.org>
Problem: Cannot define completion triggers and act upon it
Solution: add the new option 'isexpand' and add the complete_match()
function to return the completion matches according to the
'isexpand' setting (glepnir)
Currently, completion trigger position is determined solely by the
'iskeyword' pattern (\k\+$), which causes issues when users need
different completion behaviors - such as triggering after '/' for
comments or '.' for methods. Modifying 'iskeyword' to include these
characters has undesirable side effects on other Vim functionality that
relies on keyword definitions.
Introduce a new buffer-local option 'isexpand' that allows specifying
different completion triggers and add the complete_match() function that
finds the appropriate start column for completion based on these
triggers, scanning backwards from cursor position.
This separation of concerns allows customized completion behavior
without affecting iskeyword-dependent features. The option's
buffer-local nature enables per-filetype completion triggers.
closes: #16716
Signed-off-by: glepnir <glephunter@gmail.com> Signed-off-by: Christian Brabandt <cb@256bit.org>
Problem: cannot complete :filetype arguments (Phạm Bình An)
Solution: add :filetype ex command completion, add "filetypecmd"
completion type for getcompletion()
fixes: #17165
closes: #17167
Co-authored-by: zeertzjq <zeertzjq@outlook.com> Signed-off-by: Christian Brabandt <cb@256bit.org>
John Marriott [Wed, 23 Apr 2025 18:56:08 +0000 (20:56 +0200)]
patch 9.1.1339: missing out-of-memory checks for enc_to_utf16()/utf16_to_enc()
Problem: missing out-of-memory checks for enc_to_utf16() and
utf16_to_enc()
Solution: Add out-of-memory checks and fix a few other minor issues
(John Marriott)
This change does:
- add missing out-of-memory checks for enc_to_utf16() and
utf16_to_enc()
- add a small optimisation in mch_errmsg_c() and mch_msg_c() (in
message.c) to only call STRLEN() if needed.
- fix a memory leak in winpty_term_and_job_init() (in terminal.c).
closes: #17191
Signed-off-by: John Marriott <basilisk@internode.on.net> Signed-off-by: Christian Brabandt <cb@256bit.org>
patch 9.1.1337: Undo corrupted with 'completeopt' "preinsert" when switching buffer
Problem: Undo corrupted with 'completeopt' "preinsert" when switching
buffer or window.
Solution: Do not delete preinsert text when switching buffer or window.
(zeertzjq)
related: neovim/neovim#33581
closes: #17193
Signed-off-by: zeertzjq <zeertzjq@outlook.com> Signed-off-by: glepnir <glephunter@gmail.com> Signed-off-by: Christian Brabandt <cb@256bit.org>
While at it, let's also document the g:yaml_recommended_style variable.
closes: #17179
Co-authored-by: Christian Brabandt <cb@256bit.org> Signed-off-by: Vincent Law <vlaw@users.noreply.github.com> Signed-off-by: Christian Brabandt <cb@256bit.org>
Maxim Kim [Tue, 22 Apr 2025 18:11:05 +0000 (20:11 +0200)]
patch 9.1.1336: comment plugin does not support case-insensitive 'commentstring'
Problem: comment plugin does not support case-insensitive
'commentstring' (char101)
Solution: Use pattern '\c' to make the regex case-insensitive
(Maxim Kim)
fixes: #17184
closes: #17186
Signed-off-by: Maxim Kim <habamax@gmail.com> Signed-off-by: Christian Brabandt <cb@256bit.org>
patch 9.1.1329: cannot get information about command line completion
Problem: cannot get information about command line completion
Solution: add CmdlineLeavePre autocommand and cmdcomplete_info() Vim
script function (Girish Palya)
This commit introduces two features to improve introspection and control
over command-line completion in Vim:
- Add CmdlineLeavePre autocmd event:
A new event triggered just before leaving the command line and before
CmdlineLeave. It allows capturing completion-related state that is
otherwise cleared by the time CmdlineLeave fires.
- Add cmdcomplete_info() Vim script function:
Returns a Dictionary with details about the current command-line
completion state.
These are similar in spirit to InsertLeavePre and complete_info(),
but focused on command-line mode.
**Use case:**
In [[PR #16759](https://github.com/vim/vim/pull/16759)], two examples
demonstrate command-line completion: one for live grep, and another for
fuzzy file finding. However, both examples share two key limitations:
1. **Broken history recall (`<Up>`)**
When selecting a completion item via `<Tab>` or `<C-n>`, the original
pattern used for searching (e.g., a regex or fuzzy string) is
overwritten in the command-line history. This makes it impossible to
recall the original query later.
This is especially problematic for interactive grep workflows, where
it’s useful to recall a previous search and simply select a different
match from the menu.
2. **Lack of default selection on `<CR>`**
Often, it’s helpful to allow `<CR>` (Enter) to accept the first match
in the completion list, even when no item is explicitly selected. This
behavior is particularly useful in fuzzy file finding.
----
Below are the updated examples incorporating these improvements:
```vim
set wim=noselect:lastused,full wop=pum wcm=<C-@> wmnu
autocmd CmdlineChanged : CmdComplete()
def CmdComplete()
var [cmdline, curpos] = [getcmdline(), getcmdpos()]
if getchar(1, {number: true}) == 0 # Typehead is empty (no more pasted input)
&& !pumvisible() && curpos == cmdline->len() + 1
&& cmdline =~ '\%(\w\|[*/:.-]\)$' && cmdline !~ '^\d\+$' # Reduce noise
feedkeys("\<C-@>", "ti")
SkipCmdlineChanged() # Suppress redundant completion attempts
# Remove <C-@> that get inserted when no items are available
timer_start(0, (_) => getcmdline()->substitute('\%x00', '', 'g')->setcmdline())
endif
enddef
cnoremap <expr> <up> SkipCmdlineChanged("\<up>")
cnoremap <expr> <down> SkipCmdlineChanged("\<down>")
autocmd CmdlineEnter : set bo+=error
autocmd CmdlineLeave : set bo-=error
def SkipCmdlineChanged(key = ''): string
set ei+=CmdlineChanged
timer_start(0, (_) => execute('set ei-=CmdlineChanged'))
return key != '' ? ((pumvisible() ? "\<c-e>" : '') .. key) : ''
enddef
```
These customizable snippets can serve as *lightweight* and *native*
alternatives to picker plugins like **FZF** or **Telescope** for common,
everyday workflows. Also, live grep snippet can replace **cscope**
without the overhead of building its database.
closes: #17115
Signed-off-by: Girish Palya <girishji@gmail.com> Signed-off-by: Christian Brabandt <cb@256bit.org>
patch 9.1.1327: filetype: nroff detection can be improved
Problem: filetype: nroff detection can be improved
Solution: improve nroff detection (Eisuke Kawashima)
- explicitly check roff comments and macros typically found in manpages
- do not try to detect alphabetically-sectioned files, except for n, as
nroff
- l: > 'l' happens to be a section for historical reasons
<https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=391977>
- n: e.g. /usr/share/man/mann/Tcl.n.gz
- o: unsure (perhaps fedora-specific)
- p: unsure (perhaps fedora-specific)
closes: #17160
Signed-off-by: Eisuke Kawashima <e-kwsm@users.noreply.github.com> Signed-off-by: Christian Brabandt <cb@256bit.org>
D. Ben Knoble [Mon, 21 Apr 2025 08:19:51 +0000 (10:19 +0200)]
runtime(doc): cross-link :| meaning :p and explain E749
E749 is given when :print (with any range) is issued on an empty buffer,
like the one you get with :new or :enew. Furthermore, due to Vi
compatibility :| is a synonym.
As a result, mappings intended to include a <bar> separator (esp. in the
case of boolean or "||") between commands can generate E749 on startup
when placed in a vimrc if the bars are not properly encoded or escaped.
[1]. Document this failure mode and synonym near the generated error,
and cross link with :help :bar. Note that one must read or scroll quite
a bit to find the mention of :| behaving like :print!
[1]: https://vi.stackexchange.com/q/46625/10604
closes: #17173
Signed-off-by: D. Ben Knoble <ben.knoble+github@gmail.com> Signed-off-by: Christian Brabandt <cb@256bit.org>
patch 9.1.1325: tests: not checking error numbers properly
Problem: tests: not checking error numbers properly.
Solution: Add a trailing comma to avoid matching a different error
number with the same prefix (zeertzjq)
closes: #17159
Signed-off-by: zeertzjq <zeertzjq@outlook.com> Signed-off-by: Christian Brabandt <cb@256bit.org>
This commit changes *.h files to default to C (instead of C++), and
deprecates the existing `g:c_syntax_for_h` and `g:ch_syntax_for_h`
variables in favor of a unified `g:filetype_h`, like is used for other
ambiguous file extensions.
closes: #17135
Signed-off-by: Amelia Clarke <selene@perilune.dev> Signed-off-by: Christian Brabandt <cb@256bit.org>
The offered "tracer.vim" script can be used to measure and
record elapsed time for explicitly annotated "search*()"es,
set off with "VIM_INDENT_TEST_TRACE_(START|END)" comment
markers, in indent plugins.
related: #17116
Signed-off-by: Aliaksei Budavei <0x000c70@gmail.com> Signed-off-by: Christian Brabandt <cb@256bit.org>
patch 9.1.1324: undefined behaviour if X11 connection dies
Problem: undefined behaviour if X11 connection dies
Solution: call setjmp() before the main_loop() and restore x11 state
if the X11 connection dies (Foxe Chen)
fixes: #698
closes: #17142
Signed-off-by: Foxe Chen <chen.foxe@gmail.com> Signed-off-by: Christian Brabandt <cb@256bit.org>
patch 9.1.1323: b:undo_ftplugin not executed when re-using buffer
Problem: b:undo_ftplugin not executed when re-using buffer
(archy3)
Solution: explicitly execute b:undo_ftplugin in buflist_new() when
re-using the current buffer
patch 9.1.1322: small delete register cannot paste multi-line correctly
Problem: small delete register cannot paste multi-line correctly
(after v8.2.2189)
Solution: caused by 032a2d050b82b146d70d6ff714838ee62c07d8ad, so make
this logic handle charwise only (phanium)
closes: #17151
Signed-off-by: phanium <91544758+phanen@users.noreply.github.com> Signed-off-by: Christian Brabandt <cb@256bit.org>
David Mandelberg [Fri, 18 Apr 2025 09:41:44 +0000 (11:41 +0200)]
patch 9.1.1320: filetype: alsoft config files are not recognized
Problem: filetype: alsoft config files are not recognized
Solution: detect alsoft config files as dosini filetype
(David Mandelberg)
References:
* code with paths to config: ReadALConfig() in
https://github.com/kcat/openal-soft/blob/master/alc/alconfig.cpp
* example config:
https://github.com/kcat/openal-soft/blob/master/alsoftrc.sample
closes: #17140
Signed-off-by: David Mandelberg <david@mandelberg.org> Signed-off-by: Christian Brabandt <cb@256bit.org>
patch 9.1.1319: Various typos in the code, issue with test_inst_complete.vim
Problem: Various typos in the code, redundant and strange use of
:execute in test_ins_complete.vim (after 9.1.1315).
Solution: Fix typos in the code and in the documentation, use the
executed command directly (zeertzjq).
closes: #17143
Co-authored-by: Christ van Willegen <cvwillegen@gmail.com> Signed-off-by: zeertzjq <zeertzjq@outlook.com> Signed-off-by: Christian Brabandt <cb@256bit.org>
patch 9.1.1315: completion: issue with fuzzy completion and 'completefuzzycollect'
Problem: chain complete does not work when 'cot' includes fuzzy
and 'completefuzzycollect' collects wrong next word.
(Konfekt)
Solution: compl_startpos is not set correctly, remove next word check
in search_for_fuzzy_match (glepnir).
fixes #17131
fixes #16942
closes: #17136
Signed-off-by: glepnir <glephunter@gmail.com> Signed-off-by: Christian Brabandt <cb@256bit.org>
patch 9.1.1311: completion: not possible to limit number of matches
Problem: completion: not possible to limit number of matches
Solution: allow to limit the matches for 'complete' sources by using the
"{flag}^{limit}" notation (Girish Palya)
This change extends the 'complete' option to support limiting the
number of matches returned from individual completion sources.
**Rationale:** In large files, certain sources (such as the current
buffer) can generate an overwhelming number of matches, which may cause
more relevant results from other sources (e.g., LSP or tags) to be
pushed out of view. By specifying per-source match limits, the
completion menu remains balanced and diverse, improving visibility and
relevance of suggestions.
A caret (`^`) followed by a number can be appended to a source flag to
specify the maximum number of matches for that source. For example:
```
:set complete=.^9,w,u,t^5
```
In this configuration:
- The current buffer (`.`) will return up to 9 matches.
- The tag completion (`t`) will return up to 5 matches.
- Other sources (`w`, `u`) are not limited.
This feature is fully backward-compatible and does not affect behavior
when the `^count` suffix is not used.
The caret (`^`) was chosen as the delimiter because it is least likely
to appear in file names.
closes: #17087
Signed-off-by: Girish Palya <girishji@gmail.com> Signed-off-by: Christian Brabandt <cb@256bit.org>
patch 9.1.1310: completion: redundant check for preinsert effect
Problem: Duplicate check for preinsert effect, particularly for Ctrl_w
and Ctrl_U.
Solution: Remove the specific check for Ctrl_w and Ctrl_U to eliminate
redundancy (glepnir).
closes: #17129
Signed-off-by: glepnir <glephunter@gmail.com> Signed-off-by: Christian Brabandt <cb@256bit.org>
patch 9.1.1308: completion: cannot order matches by distance to cursor
Problem: During insert-mode completion, the most relevant match is often
the one closest to the cursor—frequently just above the current line.
However, both `<C-N>` and `<C-P>` tend to rank candidates from the
current buffer that appear above the cursor near the bottom of the
completion menu, rather than near the top. This ordering can feel
unintuitive, especially when `noselect` is active, as it doesn't
prioritize the most contextually relevant suggestions.
Solution: This change introduces a new sub-option value "nearest" for the
'completeopt' setting. When enabled, matches from the current buffer
are prioritized based on their proximity to the cursor position,
improving the relevance of suggestions during completion
(Girish Palya).
Key Details:
- Option: "nearest" added to 'completeopt'
- Applies to: Matches from the current buffer only
- Effect: Sorts completion candidates by their distance from the cursor
- Interaction with other options:
- Has no effect if the `fuzzy` option is also present
This feature is helpful especially when working within large buffers where
multiple similar matches may exist at different locations.
You can test this feature with auto-completion using the snippet below. Try it
in a large file like `vim/src/insexpand.c`, where you'll encounter many
potential matches. You'll notice that the popup menu now typically surfaces the
most relevant matches—those closest to the cursor—at the top. Sorting by
spatial proximity (i.e., contextual relevance) often produces more useful
matches than sorting purely by lexical distance ("fuzzy").
Another way to sort matches is by recency, using an LRU (Least Recently Used)
cache—essentially ranking candidates based on how recently they were used.
However, this is often overkill in practice, as spatial proximity (as provided
by the "nearest" option) is usually sufficient to surface the most relevant
matches.
```vim
set cot=menuone,popup,noselect,nearest inf
def SkipTextChangedIEvent(): string
# Suppress next event caused by <c-e> (or <c-n> when no matches found)
set eventignore+=TextChangedI
timer_start(1, (_) => {
set eventignore-=TextChangedI
})
return ''
enddef
patch 9.1.1307: make syntax does not reliably detect different flavors
Problem: GNU extensions, such as `ifeq` and `wildcard` function, are
highlighted in BSDmakefile
Solution: detect BSD, GNU, or Microsoft implementation according to
filename, user-defined global variables, or file contents
closes: #17089
Co-authored-by: Roland Hieber <rohieb@users.noreply.github.com> Signed-off-by: Eisuke Kawashima <e-kwsm@users.noreply.github.com> Signed-off-by: Christian Brabandt <cb@256bit.org>
patch 9.1.1306: completion menu rendering can be improved
Problem: Parts of the popup menu were rendered twice when the popup was
at maximum width because the truncation flag was being set too
liberally.
Solution: Make the truncation condition more precise by only setting it
when there's exactly one character of space remaining
(glepnir).
closes: #17108
Signed-off-by: glepnir <glephunter@gmail.com> Signed-off-by: Christian Brabandt <cb@256bit.org>
patch 9.1.1305: completion menu active after switching windows/tabs
Problem: When switching to another window or tab page while the
completion menu is active, the menu stays visible, although it
belongs to the previous window/tab page context (Evgeni
Chasnovski).
Solution: Track the window and tab page where completion started. Detect
changes in the main editing loop and cancel completion mode if
the current window or tab page differs from where completion
started.
fixes: #17090
closes: #17101
Co-authored-by: zeertzjq <zeertzjq@outlook.com> Signed-off-by: glepnir <glephunter@gmail.com> Signed-off-by: Christian Brabandt <cb@256bit.org>
patch 9.1.1304: filetype: some man files are not recognized
Problem: filetype: some man files are not recognized
(e.g. 1p (POSIX commands))
Solution: update the filetype detection pattern and detect more man
files as nroff (Eisuke Kawashima)
- sections are revised referring to
- debian-12:/etc/manpath.config
- fedora-41:/etc/man_db.conf
- detection logic is improved
- detection test is implemented
closes: #17117
Signed-off-by: Eisuke Kawashima <e-kwsm@users.noreply.github.com> Signed-off-by: Christian Brabandt <cb@256bit.org>
John Marriott [Tue, 15 Apr 2025 16:15:24 +0000 (18:15 +0200)]
patch 9.1.1303: missing out-of-memory check in linematch.c
Problem: missing out-of-memory check in linematch.c
Solution: return early in case of memory allocation failure, move the
pow() calculation ouside of the for() loop
(John Marriott)
closes: #17118
Signed-off-by: John Marriott <basilisk@internode.on.net> Signed-off-by: Christian Brabandt <cb@256bit.org>