Commit Graph

19422 Commits

Author SHA1 Message Date
Maria Solano
8a76129d9f fix(docs): include ? in list items #35945 2025-09-28 17:13:35 -07:00
zeertzjq
0fa0717d4e vim-patch:9.1.1802: 'nowrap' in a modeline may hide malicious code (#35946)
Problem:  'nowrap' in a modeline may hide malicious code.
Solution: Forcibly use '>' as 'listchars' "extends" if 'nowrap' was set
          from a modeline (zeertzjq).

Manual `:setlocal nowrap` disables this behavior.  There is a separate
problem with `:set nowrap` that also applies to some other options.

related: vim/vim#18214
related: vim/vim#18399
closes: vim/vim#18425

9d5208a931

Cherry-pick some test_modeline.vim changes from patches 9.0.{0363,0626}.
2025-09-29 07:48:46 +08:00
glepnir
fcf752476a fix(cmd): :update writes new file buffers only for real files #35939
Problem: :update should write new file buffers, but previous fix
affected special buffer types (acwrite, nofile, etc.).

Solution: Add bt_nofilename() check to only write new files for
buffers representing real filesystem paths.
2025-09-27 20:28:05 -07:00
Maria Solano
c5c6ddba91 feat(lsp): document method types (#35934) 2025-09-27 14:52:30 -07:00
glepnir
69cae6259e fix(cmd): :update does not write new, unmodified buffer #35929
Problem: update command does not write new buffers that have
filenames but no corresponding file on disk, even when using ++p flag.

Solution: allow update to write when buffer has filename but file
doesn't exist.
2025-09-27 10:24:24 -07:00
zeertzjq
2aab242a01 vim-patch:9.1.1798: Wrong display with 'sms' and long wrapped virt text at EOL (#35930)
Problem:  Wrong display with 'smoothscroll' and long wrapped virtual
          text at EOL.
Solution: Handle w_skipcol inside long wrapped virtual text at EOL
          (zeertzjq).

closes: vim/vim#18408

d9318acc02
2025-09-27 13:28:40 +00:00
skewb1k
e3c36f31e3 fix(highlight): ensure extmark range is within buffer bounds #35928
Adds an additional check for the case when end_col = 0, addressing
https://github.com/neovim/neovim/issues/35814#issuecomment-3340709532.

Validation is now localized to the highlighter without affecting the C API.
2025-09-26 19:32:28 -07:00
zeertzjq
a0c60e819d Merge pull request #35790 from janlazo/vim-8.1.1989
vim-patch:8.1.{2021,2077}
2025-09-26 13:10:24 +08:00
Jan Edmund Lazo
406f9e3c8c vim-patch:8.1.2077: the ops.c file is too big
Problem:    The ops.c file is too big.
Solution:   Move code for dealing with registers to a new file. (Yegappan
            Lakshmanan, closes vim/vim#4982)

4aea03eb87

Co-authored-by: Bram Moolenaar <Bram@vim.org>
2025-09-26 00:29:40 -04:00
zeertzjq
42aae632be fix(plines): count 'showbreak' in EOL inline virt_text in line size (#35921) 2025-09-26 04:08:38 +00:00
zeertzjq
d9fa495608 vim-patch:9.1.1790: completion: Enter does not insert match with "noinsert" (#35917)
Problem:  completion: Enter does not insert match with "noinsert".
          (Sergey Vlasov)
Solution: Check for compl_shown_match instead of compl_selected_item
          (zeertzjq).

fixes: vim/vim#18386
related: vim/vim#1653
closes: vim/vim#18395

ef818ae444
2025-09-25 23:37:02 +00:00
skewb1k
64966ba52c fix(highlight): allow ephemeral extmarks past final newline #35888
Fixes #35814

Note: this is a temporary workaround; proper concurrency-safe handling
of highlighting should be investigated.
2025-09-24 15:30:54 -07:00
Justin M. Keyes
b986fd96bc fix(lua): coverity "unreachable" warning #35874
Problem:

    CID 584865:         Control flow issues  (UNREACHABLE)
    /src/nvim/lua/executor.c: 550             in nlua_wait()
    >>>     CID 584865:         Control flow issues  (UNREACHABLE)
    >>>     This code cannot be reached: "abort();".
    550       abort();
    551     }

Solution:
The abort() was intended to encourage explicit handling of all cases, to
avoid fallthrough to a possible `return x` added at the end. However,
this is unlikely so just drop it.
2025-09-23 16:29:02 -07:00
luukvbaal
3d5ef97a98 fix(message): no wait return for delayed exception error #35881
Problem:  Wait return for delayed exception error message.
Solution: Check that error was actually shown.
2025-09-23 13:35:08 -07:00
Jan Edmund Lazo
860a7e4d21 vim-patch:8.1.2021: some global functions can be local to the file
Problem:    Some global functions can be local to the file.
Solution:   Add "static". (Yegappan Lakshmanan, closes vim/vim#4917)

840d16fd36

Partial port because patch 8.2.0256 moves the timer functions to time.c.

Co-authored-by: Bram Moolenaar <Bram@vim.org>
2025-09-23 01:36:40 -04:00
zeertzjq
4b4d58a2f9 vim-patch:224f8ca: runtime(doc): clarify 'fileignorecase' option setting (#35879)
fixes: vim/vim#18360

224f8ca769

Co-authored-by: Christian Brabandt <cb@256bit.org>
2025-09-23 07:10:00 +08:00
zeertzjq
7cdf3bb68a vim-patch:9.1.1783: ins_compl_leader() too far away from ins_compl_leader_len()
Problem:  ins_compl_leader() defined too far away from
          ins_compl_leader_len() (after 9.1.1781).
Solution: Move ins_compl_leader() just before ins_compl_leader_len().
          Add missing "static" to eval0_simple_funccal() definition.
          (zeertzjq).

closes: vim/vim#18364

94c128184f
2025-09-23 06:16:26 +08:00
zeertzjq
0f01cc85bd vim-patch:9.1.1781: some functions could be defined static
Problem:  some functions could be defined static
Solution: Change function definitions and make them static
          (Yegappan Lakshmanan)

closes: vim/vim#18354

3a6cf6d53b

Co-authored-by: Yegappan Lakshmanan <yegappan@yahoo.com>
2025-09-23 06:16:25 +08:00
Justin M. Keyes
4adfc4b7bc perf(events): skip Progress prep if there are no subscribers #35871
Problem:
`do_autocmd_progress` does unnecessary work even if there is no Progress
event handler defined.

Solution:
Check `has_event`.
2025-09-21 18:13:46 -07:00
zeertzjq
e887602eb5 vim-patch:9.1.1780: mbyte contains overlapping list of utf_classes table (#35869)
Problem:  mbyte contains overlapping list of utf_classes table
Solution: Update table to contain non-overlapping list (Yuta Yamamoto)

closes: vim/vim#18362

9fa8a114b2

Co-authored-by: Yuta Yamamoto <jichael.y.yuta1995@gmail.com>
2025-09-22 07:30:00 +08:00
Justin M. Keyes
c947b8da10 refactor: remove unused fn au_event_is_empty #35862
Redundant with `has_event`.
2025-09-21 08:14:51 +00:00
zeertzjq
c2136e3590 fix(options): increase t_Co buffer size (#35859) 2025-09-21 04:12:37 +00:00
zeertzjq
a70997442e vim-patch:9.1.1779: completion: 'autocomplete' cannot be enabled per buffer (#35853)
Problem:  completion: 'autocomplete' cannot be enabled per buffer
          (Tomasz N)
Solution: Make 'autocomplete' global or local to buffer (Girish Palya)

fixes: vim/vim#18320
closes: vim/vim#18333

0208b3e80a

Co-authored-by: Girish Palya <girishji@gmail.com>
2025-09-21 00:56:38 +00:00
zeertzjq
f91d416403 vim-patch:9.1.1776: completion: "adding" expansion doesn't work with cfc=keyword (#35850)
Problem:  "adding" expansion doesn't work with cfc=keyword.
Solution: Remove incorrect assignment to compl_cont_status. Don't use
          fuzzy collection in "adding" status (zeertzjq).

related: neovim/neovim#35842
closes: vim/vim#18351

e19a882ffc
2025-09-21 07:35:14 +08:00
zeertzjq
a5955e5cc5 vim-patch:9.1.1778: sha256() treats empty blob and null blob differently
Problem:  sha256() treats empty blob and null blob differently
          (after 9.1.1774).
Solution: Handle null blob the same as empty blob (zeertzjq).

closes: vim/vim#18341

2f3b7ea19a
2025-09-21 06:31:27 +08:00
zeertzjq
39a21d749d vim-patch:9.1.1774: cannot calculate sha256 of a Blob
Problem:  cannot calculate sha256() of a Blob
Solution: Change sha256() to accept a Blob or String argument
          (thinca).

closes: vim/vim#18336

4150283b83

Co-authored-by: thinca <thinca@gmail.com>
2025-09-21 06:31:27 +08:00
zeertzjq
e2166661d4 vim-patch:9.1.1772: completion: inconsistent selection of first item with 'autocomplete' (#35835)
Problem:  completion: inconsistent selection of first item with
          'autocomplete' (Tomasz N)
Solution: Check for 'autocomplete' option in ins_compl_new_leader()
          (Girish Palya).

fixes: vim/vim#18326
closes: vim/vim#18329

86e8e909f2

Co-authored-by: Girish Palya <girishji@gmail.com>
2025-09-19 10:47:53 +08:00
zeertzjq
95267b664c vim-patch:9.1.1769: completion: "preinsert" insert wrong word with 'smartcase' and 'autocomplete' (#35834)
Problem:  completion: "preinsert" insert wrong word with 'smartcase' and
          'autocomplete'
Solution: Add compare completed item with the leader (Girish Palya)

closes: vim/vim#18313

a8f7957d0b

Co-authored-by: Girish Palya <girishji@gmail.com>
2025-09-19 10:47:27 +08:00
zeertzjq
0763a85f43 vim-patch:9.1.1771: complete: some redraw issues with 'autocomplete'
Problem:  complete: some redraw issues with 'autocomplete'
Solution: Fix the issues (Girish Palya)

This commit contains the following changes:
* Fix that wildtrigger() might leave opened popupmenu around vim/vim#18298
* Remove blinking message on the command line when a menu item from a loaded
  buffer is selected during 'autocomplete'
* Add a test for PR vim/vim#18265 to demonstrate why the PR is required for correct
  'autocomplete' behavior

fixes: vim/vim#18298
closes: vim/vim#18328

ee9a2f0512

Co-authored-by: Girish Palya <girishji@gmail.com>
2025-09-19 09:58:24 +08:00
zeertzjq
dd306bd48a vim-patch:9.1.1621: flicker in popup menu during cmdline autocompletion
Problem:  When the popup menu (PUM) occupies more than half the screen
          height, it flickers whenever a character is typed or erased.
          This happens because the PUM is cleared and the screen is
          redrawn before a new PUM is rendered. The extra redraw between
          menu updates causes visible flicker.
Solution: A complete, non-hacky fix would require removing the
          CmdlineChanged event from the loop and letting autocompletion
          manage the process end-to-end. This is because screen redraws
          after any cmdline change are necessary for other features to
          work.
          This change modifies wildtrigger() so that the next typed
          character defers the screen update instead of redrawing
          immediately. This removes the intermediate redraw, eliminating
          flicker and making cmdline autocompletion feel smooth
          (Girish Palya).

Trade-offs:
This behavior change in wildtrigger() is tailored specifically for
:h cmdline-autocompletion. wildtrigger() now has no general-purpose use
outside this scenario.

closes: vim/vim#17932

da9c966893

Use pum_check_clear() instead of update_screen().
Cherry-pick Test_wildtrigger_update_screen() change from patch 9.1.1682.

Co-authored-by: Girish Palya <girishji@gmail.com>
2025-09-19 09:58:24 +08:00
zeertzjq
c9f6267402 vim-patch:9.1.1773: Crash in BufLeave after BufUnload closes other windows (#35830)
Problem:  Crash in BufLeave/WinLeave/TabLeave when closing window after
          BufUnload closes all other windows in the tab page.
Solution: Avoid duplicate BufLeave/WinLeave events. Trigger TabLeave
          before removing the buffer (zeertzjq).

related: vim/vim#14166
related: neovim/neovim#33603
closes: vim/vim#18330

0c70820015
2025-09-19 07:40:12 +08:00
zeertzjq
63ece2b151 fix(swapfile): don't use uninitialized memory (#35813)
Also add a test for #35802.
2025-09-17 11:36:27 +08:00
luukvbaal
cbfa7f0d7b fix(swapfile): handle newlines in swapfile list message #35802 2025-09-16 11:28:34 -07:00
zeertzjq
051b8b88c8 vim-patch:9.1.1762: completion: selected item not cleared on <BS> with 'ac'
Problem:  completion: selected item not cleared on backspace when
          'autocomplete' is set
Solution: Clear the selected item (Girish Palya)

closes: vim/vim#18260

5c9b71d63c

Co-authored-by: Girish Palya <girishji@gmail.com>
2025-09-16 20:58:27 +08:00
zeertzjq
ff777f9a85 docs: small fixes (#35791)
Close #34938
Close #35030
Close #35233
Close #35259
Close #35290
Close #35433
Close #35541
Close #35766
Close #35792

Co-authored-by: huylg <45591413+huylg@users.noreply.github.com>
Co-authored-by: Jason Del Ponte <961963+jasdel@users.noreply.github.com>
Co-authored-by: sooriya <74165167+thuvasooriya@users.noreply.github.com>
Co-authored-by: Andrew Braxton <andrewcbraxton@gmail.com>
Co-authored-by: Enric Calabuig <enric.calabuig@gmail.com>
Co-authored-by: Augusto César Dias <augusto.c.dias@gmail.com>
Co-authored-by: David Sierra DiazGranados <davidsierradz@gmail.com>
Co-authored-by: Stepan Nikitin <90522882+vectravox@users.noreply.github.com>
Co-authored-by: Emilien Breton <bricktech2000@gmail.com>
2025-09-16 11:41:36 +08:00
Yochem van Rosmalen
566e8c66f9 docs: optionlinks don't need the bars #35777
Problem:
Options links work even without vertical bars around them due to their
single quotes: the bars are unnecessary.

Solution:
Remove them.
2025-09-15 12:36:44 -07:00
bfredl
0458a1e694 build(ci): bump zig to 0.15.1 and add more platforms
- Bump zig version to 0.15.1 and workaround zig fetch hang (ziglang/zig#24916)
- add mac os zig build (currently without luajit, linker failure)
- Add windows zig build, currently with very limited testing
2025-09-15 12:10:23 +02:00
zeertzjq
1264d1156c fix(lua): don't leak timer when vim._watch.watch() fails (#35768)
This fixes the following warning in tests with ASAN or TSAN:

    -------- Running tests from test/functional/lua/watch_spec.lua
    RUN      T4253 vim._watch watch() ignores nonexistent paths: 29.00 ms OK
    nvim took 2006 milliseconds to exit after last test
    This indicates a likely problem with the test even if it passed!
2025-09-15 11:15:25 +08:00
zeertzjq
ca9cc98298 vim-patch:partial:235e77a: runtime(doc): Tweak documentation style more in options and ft_hare (#35761)
closes: 18289

235e77a3a3

Skip ft_hare.txt.

Co-authored-by: Hirohito Higashi <h.east.727@gmail.com>
2025-09-15 08:00:43 +08:00
zeertzjq
7b8b9d270f vim-patch:9.1.1758: Diff mode crashes when adding text property in autocommand (#35760)
Problem:  Diff mode crashes when adding text property in autocommand
          (after 9.1.1557).
Solution: Only restore ML_EMPTY memline flag, ignore the others
          (zeertzjq).

fixes: vim/vim#18288
closes: vim/vim#18291

46e22fd2f7
2025-09-15 07:17:37 +08:00
zeertzjq
fbb1caf5f8 vim-patch:97e0f95: runtime(doc): tweak documentation style a bit more in options.txt (#35755)
related: vim/vim#18284

97e0f955da
2025-09-14 16:45:18 +08:00
skewb1k
a897cc17a5 feat(json): vim.json.encode() sort_keys #35574
Problem: There is no way to ensure a stable key order when encoding a JSON string,
which can be useful for comparisons and producing cleaner diffs.

Solution: Introduce a `sort_keys` option for `vim.json.encode()`,which
is disabled by default. When enabled, object keys are sorted in
alphabetical order.
2025-09-13 21:17:07 -07:00
Justin M. Keyes
a30a947593 docs: move editorconfig.txt into plugins.txt
It helps to have plugins living in one common area, because it signals
to users the mechanisms for controlling them, which are typically driven
by keymaps and autocmds rather than builtin options.

We can always revisit if plugins.txt gets "too big" (for example, we may
want to introduce "project.txt" for the project concept, where
editorconfig and 'exrc' are relevant), but for now it's rather unusual
for editorconfig.txt to have its own dedicated helpfile.
2025-09-13 23:23:24 -04:00
Justin M. Keyes
db67607201 docs: manpage, keycodes, json 2025-09-13 22:49:50 -04:00
zeertzjq
5ef567d130 build(gen_helptags): update check for example (#35750)
Follow-up to ae588c183f.
2025-09-14 08:38:06 +08:00
zeertzjq
68f40386ed vim-patch:partial:450d591: runtime(doc): tweak documentation style (#35748)
closes: vim/vim#18284

450d59145e

Skip ft_hare.txt.

Co-authored-by: Hirohito Higashi <h.east.727@gmail.com>
2025-09-13 23:33:06 +00:00
fredizzimo
8ae9a44d38 feat(ui): support grid=0 in nvim_input_mouse #32535
Problem:
Multigrid UIs have to find out which window to send the input by using
the Nvim focus rules, which are not fully documented.

Furthermore,`getmousepos()` has several problems when multigrid is
enabled, with the main one being that screenrow and screencol are window
relative instead of screen relative, due to the fact that the UI don't
send any absolute coordinates.

Solution:
Allow passing 0 as grid to `nvim_input_mouse`, with absolute
coordinates, which lets nvim determine the actual window to send the
mouse input to. This works as long as nvim is in charge of the window
positioning. If the UI repositions or resizes the windows, it can still
pass the grid it determines like before.
2025-09-13 14:57:04 -07:00
luukvbaal
c1648cf820 fix(ui): forward 'rulerformat' to msg_ruler event #35707
Problem:  A 'rulerformat' not part of the statusline is not emitted through
          msg_ruler events.
Solution: Build the message chunks to emit as a msg_ruler event.
2025-09-13 13:34:58 -07:00
github-actions[bot]
ec89c5b261 docs: update version.c #35670
vim-patch:8.1.0000: release
vim-patch:8.1.0058: display problem with margins and scrolling
vim-patch:8.1.0065: balloon displayed at the wrong position
vim-patch:8.1.0158: GUI: input() fails if CTRL-C was pressed before
vim-patch:8.1.0328: inputlist() doesn't work with a timer

vim-patch:8.1.1560: popup window hidden option not implemented yet
vim-patch:8.1.1600: cannot specify highlighting for popup window scrollbar
vim-patch:8.1.1810: popup_getoptions() is missing an entry for "mapping"
vim-patch:8.1.1811: popup window color cannot be set to "Normal"
vim-patch:8.1.1943: more code can be moved to evalvars.c
vim-patch:8.1.2265: when popup with "botleft" does not fit it flips incorrectly
vim-patch:8.1.2266: position unknown for a mouse click in a popup window

vim-patch:8.2.1190: Vim9: checking for Vim9 syntax is spread out
vim-patch:8.2.1405: Vim9: vim9compile.c is getting too big
vim-patch:8.2.2227: Vim9: recognizing lambda is too complicated
vim-patch:8.2.4036: Vim9: script test file is getting too long
vim-patch:8.2.4159: MS-Windows: _WndProc() is very long
vim-patch:8.2.4189: MS-Windows: code for "old look" is obsolete
vim-patch:8.2.4194: MS-Windows: code for calculating font size is duplicated
vim-patch:8.2.4198: Vim9: the switch for executing instructions is too long
vim-patch:8.2.4213: too much code for supporting old MSVC versions
vim-patch:8.2.4294: MS-Windows: #ifdefs for Cygwin are too complicated

vim-patch:9.0.1757: ex_class() function is too long

vim-patch:9.1.0361: Vim9: vim9type.c is too complicated
vim-patch:9.1.0367: compile_def_function is too long
vim-patch:9.1.0371: Vim9: compile_def_function() still too long
vim-patch:9.1.0517: MS-Windows: too long lines in Make_mvc.mak
vim-patch:9.1.0914: Vim9: compile_assignment() is too long
vim-patch:9.1.0920: Vim9: compile_assignment() too long
vim-patch:9.1.1278: Vim9: too long functions in vim9type.c
vim-patch:9.1.1092: tests: fix expected return code for python 3.13 on Windows
2025-09-13 13:06:40 -07:00
zeertzjq
4a69847df4 fix(tui): don't wait for DA1 response when stdin is closed (#35745) 2025-09-13 20:53:17 +08:00