A file containing only async functions (`async def func()`) wouldn't
previously match the pythonSync pattern.
Also, this pattern only matches at the beginning of the line, so it
won't ever match method definitions (which are indented within class
scopes). Update the comment accordingly.
closes: vim/vim#17963dba9eb46e6
Co-authored-by: Jon Parise <jon@indelible.org>
Problem:
During preview, the `input` still prompts the user to enter something
that won't be used later, which could be a bit confusing.
e.g., `:s/a/\=input("")`.
Solution:
Make the input() return early during 'inccommand' preview.
Problem: `vim.diagnostic.get_prev()` / `vim.diagnostic.get_next()` use
logical diagnostic positions and consider extmark validity.
`vim.diagnostic.get()` only uses original positions and doesn't care
about extmark validity. This results in inconsistency between these
APIs.
Solution: use original positions in `vim.diagnostic.get_prev()` and
`vim.diagnostic.get_next()` and don't consider extmark validity to match
previous behavior, which is consistent with `vim.diagnostic.get`.
Problem:
gen_help_html.lua script misinterprets parts of ASCII diagrams as help tags
(e.g., `|_________|` in `usr_28.txt`). This incorrectly triggered
special alignment-fixing logic that is meant for columnar text.
Signed-off-by: Shashwat Agrawal <shashwatagrawal473@gmail.com>
Problem: Temporary cmdline config is saved to be restored later.
Solution: Close the cmdline window so that it is recreated with the appropriate config.
Problem: Byte2line() does not work correctly with text properties. (Billie
Cleek)
Solution: Take the bytes of the text properties into account.
(closesvim/vim#5334)
9df53b62de
Co-authored-by: Bram Moolenaar <Bram@vim.org>
Problem: Listener callback called at the wrong moment
Solution: Invoke listeners before calling ml_delete_int(). (closesvim/vim#4657)
acf7544cf6
Co-authored-by: Bram Moolenaar <Bram@vim.org>
Problem: Listener callback called for the wrong buffer.
Solution: Invoke listeners before calling ml_append_int().
250e3112c6
Co-authored-by: Bram Moolenaar <Bram@vim.org>
Highlight f-string replacement fields, including
- Comments
- Debugging flags
- Conversion fields
- Format specifications
- Delimiters
Syntax inside fields will be addressed in a separate commit.
related: vim/vim#10734
related: vim/vim#14033closes: vim/vim#17784a94a0555d9
Co-authored-by: Rob B <github@0x7e.net>
Class and function definitions previously shared a single highlight
group (pythonFunction). This change gives classes their own highlight
group (pythonClass) that's linked to Structure.
closes: vim/vim#1785648b7eb1ceb
Co-authored-by: Jon Parise <jon@indelible.org>
This brings the upstream files to commit 9dc3bd3 (ftplugin: escape Vim
special characters when opening docs, 2025-08-09). Note that not all
upstream files are included.
closes: vim/vim#179567270a5a843
Co-authored-by: D. Ben Knoble <ben.knoble+github@gmail.com>
Problem: Patch v9.1.1432 causes performance regressions
Solution: Revert "patch 9.1.1432: GTK GUI: Buffer menu does not handle
unicode correctly" (Yee Cheng Chin).
This reverts commit 08896dd330c6dc8324618fde482db968e6f71088.
The previous change to support Unicode characters properly in the
buffers menu resorted to removing all buffer menus and re-add the
buffers after doing a sort, per each buffer addition. This was quite
slow because if Vim is trying to load in multiple buffers at once (e.g.
when loading a session) this scales in O(n^2) and Vim can freeze for
dozens of seconds when adding a few hundred buffers.
related: vim/vim#17405
related: vim/vim#17928fixes: vim/vim#17897cda0d17f59
Co-authored-by: Yee Cheng Chin <ychin.git@gmail.com>
Problem: Incorrect E535 error message (after 9.1.1603).
Solution: Don't use transchar(), as the character is always printable
(zeertzjq).
closes: vim/vim#17948b362995430
Problem: completion: incorrect selected index returned from
complete_info()
Solution: Return the index into "items" and restore the previous
behaviour (Robert Muir).
complete_info() returned an incorrect selected index after
0ac1eb3555445f4c458c06cef7c411de1c8d1020 (Patch v9.1.1311). Effectively
it became an index into "matches" instead of "items". Return the index
into "items" by default to restore the previous behavior, unless
"matches" was requested.
closes: vim/vim#179528e2a229189
Co-authored-by: Robert Muir <rmuir@apache.org>
Co-authored-by: Hirohito Higashi <h.east.727@gmail.com>
Problem: tests: test_search leaves a few swapfiles behind
Solution: Use :bw! instead of :close to close the swapfile at the end of
the test.
related: vim/vim#17933a2bb21a895
Co-authored-by: Christian Brabandt <cb@256bit.org>
Problem: Ctrl-G/Ctrl-T does not ignore the end search delimiter
(irisjae)
Solution: Check if the pattern ends with a search delimiter and ignore
it, unless it is part of the pattern.
fixes: vim/vim#17895closes: vim/vim#17933c03990d30f
Co-authored-by: Christian Brabandt <cb@256bit.org>
Problem: diff format erroneously detected
(Tomáš Janoušek)
Solution: Make the regex to detect normal diff format a bit stricter,
while at it, fix wrong test content from patch v9.1.1606
fixes: vim/vim#17946887b4981e7
Co-authored-by: Christian Brabandt <cb@256bit.org>
Problem: possible undefined behaviour in mb_decompose(), when using the
same pointer as argument several times
Solution: use separate assignments to avoid reading and writing the same
object at the same time (Áron Hárnási)
closes: vim/vim#17953c43a0614d4
Co-authored-by: Áron Hárnási <aron.harnasi@gmail.com>
Problem: No way to skip install confirmation in `add()`. Having install
confirmation by default is a more secure design. However, users are
usually aware of the fact that plugin will be installed and there is
currently no way to skip confirmation.
Plus it can introduce inconvenience on the clean config initialization
if it is modularized with many `vim.pack.add()` calls (leads to
confirming installation many times in a row).
Solution: Add `opts.confirm` option that can skip install confirmation.
Problem: No way to have full control over how plugin is loaded.
Although `:packadd!` has small side effects (only adds plugin
directory to 'runtimepath'; and maybe its 'after/' subdirectory), it
still has side effects. For example, 'plugin/' directories are still
loaded during startup (as part of `:h load-plugins`).
Solution: Allow function `opts.load` that has full control over how
plugin is loaded.
Problem: the `load=true` in `vim.pack.add()` means that `:packadd` is
executed even during startup. This leads to force source of 'plugin/',
which breaks the intended loading order (`:h load-plugins`) and
results into sourcing them twice. This also makes it ignore
`--noplugin` argument.
Using `:packadd!` during startup is more appropriate, while `:packadd`
afterwards is still more favorable to actually force 'plugin/' source
(as there is no pre-defined mechanism that will load them later).
Solution: have `load=false` default during startup, `true` - afterwards.
Problem: filetype: a few more files are not recognized
Solution: guess Mail, Info and Terminfo files by its content
(lacygoill)
closes: vim/vim#17880eb2aebeb79
Co-authored-by: lacygoill <lacygoill@lacygoill.me>
Problem: When the parameter debug=msg is set and the command :option is
entered, error E94 will be displayed.
Solution: Add a check for the existence of the buffer before getting the
buffer number “option-window”.
Reproduce:
vim --clean -c "set debug=msg" -c "option"
Error detected while processing command line..script D:\Programs\Vim\vim91\optwin.vim:
line 9: E94: No matching buffer for option-window
closes: vim/vim#179273be4ad76df
Co-authored-by: RestorerZ <restorer@mail2k.ru>
Problem: completion: cannot use autoloaded funcs in 'complete' F{func}
(Maxim Kim)
Solution: Make it work (Girish Palya)
fixes: vim/vim#17869closes: vim/vim#178851bfe86a7d3
Cherry-pick Test_omni_autoload() from patch 8.2.3223.
Co-authored-by: Girish Palya <girishji@gmail.com>
Using a snippet like:
${1:name} :: ${2}\n${1:name} ${3}= ${4:undefined}${0}
The text for `${1:name}` stopped syncing if the completion popup menu
showed up. E.g. typing `par` where the `a` triggered completion resulted
in:
pat ::
pa = undefined
Instead of:
pat ::
pat = undefined
Problem: The :keep{alt,jumps,marks,patterns} commmands are sometimes
misidentified as :k.
Solution: Make sure one_letter_cmd() only returns true for :k and not
other :keep* commands (Doug Kearns).
This currently manifests as missing completion for :keep* commands and
incorrect results from fullcommand().
E.g., fullcommand("keepmarks") returns "k" rather than "keepmarks".
The correct command, however, is executed as command modifiers are
handled specially in do_one_cmd() rather than using find_ex_command().
Fix exists(':k') so that it returns 2 for a full match.
closes: vim/vim#15742ea84202372
Cherry-pick Test_ex_command_completion() from patch 9.1.0624.
Co-authored-by: Doug Kearns <dougkearns@gmail.com>