Commit Graph

34361 Commits

Author SHA1 Message Date
Riley Bruins
a0678a5849 fix(lsp): ignore inline completions after leaving insert mode (#36476)
**Problem:** When quickly entering and leaving insert mode, sometimes
inline completion requests are returned and handled in normal mode. This
causes an extmark to be set, which will not get cleared until the next
time entering & leaving insert mode.

**Solution:** Return early in the inline completion handler if we have
left insert mode.
2025-11-09 14:28:02 -08:00
bfredl
5d3df1c41a Merge pull request #36495 from bfredl/deflate
fix(build): remove .tar.gz workaround for bug fixed in zig 0.15.2
2025-11-09 13:52:30 +01:00
bfredl
f98b5ee619 fix(build): remove .tar.gz workaround for bug fixed in zig 0.15.2
The issue affecting this particular archive was fixed in
https://github.com/ziglang/zig/pull/25512, and this was included in
zig 0.15.2
2025-11-09 11:59:32 +01:00
zeertzjq
f1c7fb551e Merge pull request #36488 from zeertzjq/vim-c28b73d
vim-patch: doc updates
2025-11-09 08:31:43 +08:00
zeertzjq
19a3687f69 vim-patch:185cec2: runtime(doc): Rewrite some overlength lines
closes: vim/vim#18695

185cec2b09

Co-authored-by: Doug Kearns <dougkearns@gmail.com>
2025-11-09 08:01:04 +08:00
zeertzjq
39a2cbbd58 vim-patch:a3063f2: runtime(doc): Wrap some overlength lines in the user manual
closes: vim/vim#18696

a3063f2f90

Co-authored-by: Doug Kearns <dougkearns@gmail.com>
2025-11-09 07:55:15 +08:00
zeertzjq
7ef7f82c5c vim-patch:c28b73d: runtime(doc): Improve :help synconcealed() description
closes: vim/vim#18698

c28b73d349

Co-authored-by: Doug Kearns <dougkearns@gmail.com>
2025-11-09 07:49:48 +08:00
Christian Clason
ded5786252 build(deps): bump luajit to fdf2379cc 2025-11-08 18:53:57 +01:00
luukvbaal
8d6963a6a0 fix(ui): cmdline_show is not fired after clearing the screen (#36451)
Problem:  Resize events during startup may clear an active external
          cmdline, which is then not redrawn.
          UI2 VimResized autocommand does not work.
          UI2 message appearance may be altered by inherited window
          options. The message separator uses the wrong fillchar.

Solution: Unset cmdline_was_last_redrawn when clearing the screen, such
          that cmdline_show is re-emitted.
          Ensure set_pos function is called without arguments.
          Ensure such options are unset. Use 'fillchars'->msgsep.
2025-11-08 11:38:56 +01:00
Shadman
466b2ac192 fix(prompt): wrong cursor position with cursor keys (#36196)
**Problem**:
Currently, whenever user get's on prompt-text area we move the user to
end of user-input area. As a result when left/c-left,home keys are
triggered at start of user-input the cursor get's placed at end of
user-input. But this behavior can be jarring and unintuitive also it's
different from previous behavior where it'd just stay at start of
input-area. Also, previously when insert-mode was triggered in
prompt-text with n_a for example then cursor was placed at start of
user-input area not at the end. So, that behavior was also broken.

**Solution:**
Restore previous behavior. Don't force user to end of user-input when
entering insert-mode from readonly section.
2025-11-08 10:40:37 +08:00
zeertzjq
af5ac171bd vim-patch:84baba3: runtime(compiler): do not override &l:makeprg on :compiler! (#36470)
closes: vim/vim#18686

84baba329a

Co-authored-by: Konfekt <Konfekt@users.noreply.github.com>
2025-11-07 00:22:50 +00:00
Riley Bruins
f2bfde9140 fix(treesitter): reset next_col when performing intermediate highlights
The iterator is meant to be fully reset in this code path, but only the
`next_row` state was being reset. This would only cause highlight
artifacts for very brief periods of time, though.
2025-11-06 09:27:21 +00:00
Christian Clason
39455a4363 build(deps): bump luajit to 68354f444 2025-11-06 10:15:52 +01:00
zeertzjq
16c8152229 vim-patch:7dfdc7f: runtime(sml): add filetype plugin, move options from indent to ftplugin (#36460)
closes: vim/vim#18680

7dfdc7f6cb

Co-authored-by: tocariimaa <tocariimaa@pissmail.com>
2025-11-06 00:09:34 +00:00
Maria Solano
0472119fe6 fix(lsp): don't immediately force shutdown when using a timeout (#36455) 2025-11-05 16:39:02 -05:00
zeertzjq
17bcf86cab vim-patch:461dd9a: runtime(vim): 'iskeyword' setting not correctly restored (#36453)
fixes: vim/vim#18673

461dd9aca6

Co-authored-by: Christian Brabandt <cb@256bit.org>
2025-11-05 08:07:54 +08:00
Folke Lemaitre
20a392fe38 fix(lsp): fix window to set cursor for inline completion (#36444) 2025-11-04 13:51:37 -05:00
zeertzjq
b80d390765 fix(tui): wrong default input key encoding (#36440)
Don't override the default key encoding in tinput_init(), now that it's
called after terminfo_start().
2025-11-03 14:23:45 +08:00
Justin M. Keyes
130ef73e39 fix(scripts): release.sh 2025-11-02 11:57:56 -05:00
zeertzjq
003b429a86 vim-patch:9.1.1892: Not possible to know once Vim is done with sourcing vimrc (#36429)
Problem:   A plugin does not know when startup scripts were already
           triggered. This is useful to determine if a function is
           called inside vimrc or after (like when sourcing 'plugin/'
           files).
Solution:  Add the v:vim_did_init variable (Evgeni Chasnovski)

closes: vim/vim#18668

294bce21ee

Nvim has two more steps between sourcing startup scripts and loading
plugins. Set this variable after these two steps.

Co-authored-by: Evgeni Chasnovski <evgeni.chasnovski@gmail.com>
2025-11-02 18:07:33 +08:00
Maria Solano
02cd564896 feat(lsp): support auto-force escalation in client stop (#36378) 2025-11-01 19:12:29 -07:00
zeertzjq
d847548a1c vim-patch:9.1.1893: ICCF charity will dissolve (#36427)
Problem:  ICCF charity will dissolve
Solution: Update references to Kuwasha

Since the ICCF[1] will be dissolved and handing over to the Kuwasha charity
to continue supporting the Kibaale Children Center in Uganda, update the
uganda.txt help file.

[1]: https://groups.google.com/g/vim_announce/c/pUNbNXBLbKw/m/-zFUd4JjAQAJ

fixes: vim/vim#18584
closes: vim/vim#18667

0405665638

Co-authored-by: Christian Brabandt <cb@256bit.org>
2025-11-02 08:29:00 +08:00
zeertzjq
a4988bb3cd vim-patch:213109a: runtime(doc): clarify W11 warning and possible options (#36426)
fixes: vim/vim#18589

213109a999

Co-authored-by: Christian Brabandt <cb@256bit.org>
2025-11-01 23:11:20 +00:00
zeertzjq
f0571a1855 vim-patch:fe71c56: runtime(netrw): NetrwChgPerm for files not in cwd
Problem:  Changing permissions fail when using `gp` if the file under
          the cursor is not in the current working directory.
Solution: Use the already available `a:curdir` argument and prepend it
          to the `<cfile>`, so that the path of the file is correct.

This commit also refactors some leftover `netrw#ErrorMsg` to
`netrw#msg#Notify` (the main refactoring was done in
f5e3b5c04f85b0f69cd2aae81e4938cfb191a790).

closes: vim/vim#18674

fe71c56d8f

Co-authored-by: Mohammad Reza Karimi <m.r.karimi.j@gmail.com>
2025-11-02 07:03:44 +08:00
zeertzjq
c38365fd8e vim-patch:28f7582: runtime(log): syntax file update
closes: vim/vim#18675

28f7582c16

Co-authored-by: Mao-Yining <mao.yining@outlook.com>
2025-11-02 07:03:44 +08:00
varsidry
b92b95e2c2 vim-patch:9.1.1891: g<End> does not move to last non-blank in visual mode (#36354)
Problem:  In visual mode, g<End> does not move to the last non-blank
          character when the end of a line is on the same line as the
          cursor (after v9.0.1753)
Solution: Move the cursor back by one position if it lands after the
          line (varsidry)

fixes: vim/vim#18657
closes: vim/vim#18658

adc85151f3
2025-11-01 01:37:12 +00:00
zeertzjq
d077a24f5c fix(socket): avoid stack-use-after-return after timeout (#36405)
Problem:
In socket_connect(), if connecting to the given TCP address times out,
libuv is still trying to connect to the address, and connect_cb may be
called when running the libuv event loop after the `status` variable
referenced by `req.data` goes out of scope.

Solution:
Close the uv_tcp_t handle and wait for connect_cb to be called before
retrying or failing in socket_connect(). This also avoid leaking libuv
handles.

The tests added here only check that the non-timeout case still works,
as checking the timeout case is very hard without modifications to the
code. Removing the first LOOP_PROCESS_EVENT_UNTIL() in socket_connect()
(the one with the timeout) is a way to check that manually.

Also add a comment about the cause of the ASAN error in #34586.
2025-11-01 08:20:46 +08:00
zeertzjq
1fddd74da7 vim-patch:9.1.1889: filetype: not all AppleScript files are recognized (#36411)
Problem:  filetype: not all AppleScript files are recognized
Solution: Detect *.applescript files as applescript filetype
          (Samuel Huang)

Reference:
https://en.wikipedia.org/wiki/AppleScript

closes: vim/vim#18672

69dd5906fd

Co-authored-by: Samuel Huang <hi@sgh.ng>
2025-11-01 06:27:11 +08:00
11soda11
b258382176 fix(completion): complete drive-letter filepath on Windows #36353
Problem:
On MSWIN, file completion (CTRL-X CTRL-F) only works for the current
drive (so not for actual absolute paths), since drive letters are never
included in the completion pattern.

e.g. when completing "F:\Hello" Nvim currently completes "\Hello"
which is relative to the current drive/volume.

vim solves this by adding ':' to the default 'isfname' value on mswin,
but that causes issues as ':' is not a valid windows path char anywhere
_except_ after the drive letter.

Solution:
detect drive letters in front of the path when creating the completion
pattern.
2025-10-31 12:33:01 -07:00
zeertzjq
2b83237b0f test(api/server_requests_spec): fix flaky test (#36410)
Wait for the notification to be processed.
2025-10-31 14:06:11 +00:00
zeertzjq
ceeae3a210 Merge pull request #36408 from zeertzjq/vim-9.1.1479
vim-patch:9.1.{1479,1890}
2025-10-31 19:12:14 +08:00
zeertzjq
d4106bade7 vim-patch:9.1.1890: %P in 'statusline' doesn't behave as documented
Problem:  %P in 'statusline' doesn't behave as documented
          (after 9.1.1479).
Solution: Make the percentage 3-chars wide when not translated.
          (zeertzjq)

fixes: vim/vim#18669
closes: vim/vim#18671

73a0de4a04

Co-authored-by: Christ van Willegen <cvwillegen@gmail.com>
2025-10-31 18:46:01 +08:00
zeertzjq
a0f3fdba58 vim-patch:9.1.1479: regression when displaying localized percentage position
Problem:  regression when displaying localized percentage position
          (after v9.1.1291)
Solution: calculate percentage first (Emir SARI)

Cleanups made in ec032de broke the Turkish percent display, failing to
prepend it properly in cases between 0 and 10. In Turkish, the percent
sign is prepended to the number, so it was displaying it as `% 5`
(should have been `%5`), while displaying numbers bigger than 9 properly.

related: vim/vim#17597

8fe9e55a7d

The test was unskipped in Vim in patch 9.1.1479 which added Turkish
translation for "%d%%". However, Nvim has had Turkish translation for
"%d%%" since 2023, so don't skip the test.

Co-authored-by: Emir SARI <emir_sari@icloud.com>
2025-10-31 18:46:01 +08:00
bfredl
d825e51169 Merge pull request #36381 from bfredl/nobilium
feat(build): HAVE_UNIBILIUM
2025-10-31 10:17:02 +01:00
bfredl
e1ffa8d33b feat(build): HAVE_UNIBILIUM
compile time features are hot again.

Note: this changes the &term value for builtin definition from
'builtin_xterm' to just 'xterm'. It's an xterm regardless of we use an
external definition or an internal. Prior to this commit the vast
majority of POSIX users will have used external terminfo, so plugins and
scripts are only going to have checked for &term == 'xterm' or 'tmux' or
whatever.
The status of external loading is still available in "nvim -V3" output.
2025-10-31 08:39:32 +01:00
bfredl
2621066104 Merge pull request #36270 from bfredl/zig0.15.2
build(deps): bump zig to v0.15.2
2025-10-31 08:36:29 +01:00
zeertzjq
accd392f4d Merge pull request #36393 from zeertzjq/rstream-close-cb
fix(channel): closing socket with pending writes leaks memory
2025-10-31 09:14:19 +08:00
bfredl
1df2171f2c build(deps): bump zig to v0.15.2 2025-10-30 21:29:52 +01:00
zeertzjq
5ddabbeba4 Merge pull request #36396 from zeertzjq/vim-9.1.1291
vim-patch:9.1.{1291,1292,partial:1887}
2025-10-30 22:23:57 +08:00
zeertzjq
c70e8ef9b7 vim-patch:partial:9.1.1887: string handling in strings.c can be improved
Problem:  string handling in strings.c can be improved
Solution: Refactor strings.c and remove calls to STRLEN()
          (John Marriott)

This change does:
- In vim_strsave_shellescape() a small cosmetic change.
- In string_count() move the call to STRLEN() outside the while loop.
- In blob_from_string() refactor to remove call to STRLEN().
- In string_from_blob() call vim_strnsave() instead of vim_strsave().
- In vim_snprintf_safelen() call vim_vsnprintf_typval() directly instead
  of vim_vsnprintf() which then calls vim_vsnprintf_typval().
- In copy_first_char_to_tv() change to return -1 on failure or the length
  of resulting v_string. Change string_filter_map() and string_reduce() to
  use the return value of copy_first_char_to_tv().

closes: vim/vim#18617

110656ba60

Co-authored-by: John Marriott <basilisk@internode.on.net>
2025-10-30 22:01:58 +08:00
zeertzjq
f3b38b46eb vim-patch:9.1.1292: statusline not correctly evaluated
Problem:  statusline not correctly evaluated
          (Peter Kenny, after v9.1.1291)
Solution: revert part of patch v9.1.1291
          (Hirohito Higashi)

fixes: vim/vim#17095
closes: vim/vim#17094

c8ce81b0dc

Co-authored-by: Hirohito Higashi <h.east.727@gmail.com>
2025-10-30 22:01:58 +08:00
zeertzjq
aba33c72f0 vim-patch:9.1.1291: too many strlen() calls in buffer.c
Problem:  too many strlen() calls in buffer.c
Solution: refactor buffer.c and remove strlen() calls
          (John Marriott)

closes: vim/vim#17063

ec032de646

Co-authored-by: John Marriott <basilisk@internode.on.net>
2025-10-30 22:01:58 +08:00
zeertzjq
ce9a73625a test(tui_spec): check logfile for --listen error (#36390) 2025-10-30 09:06:30 +00:00
zeertzjq
e87f2d1cf9 test(tui_spec): separate remote client :restart tests (#36388)
:restart changes the terminal under which the server process is run,
which can be confusing when combined with other testing.

Also, use COLORTERM=xterm-256color for tests with 'notermguicolors' to
avoid delay on server exit. Not all these delays are blocking, but they
increase the number of simultaneously existing Nvim processes.
2025-10-30 16:23:22 +08:00
zeertzjq
50a38d9698 fix(tui): heap-use-after-free when resuming (#36387)
Discovered when writing more tests for suspend/resume.
It seems that this isn't always reproducible with ASAN due to the arena.
2025-10-30 05:26:49 +00:00
zeertzjq
69bddc089f fix(tui): don't call tinput_init() twice (#36386) 2025-10-30 03:06:30 +00:00
zeertzjq
c75f547839 vim-patch:9.1.1888: Wrong display with cpo+=$, matchparen and wrapped line (#36385)
Problem:  Wrong display with cpo+=$, matchparen and wrapped line.
Solution: Use old cursor line height when scrolling with cpo+=$. Also
          fix wrong redraw in non-current window. (zeertzjq)

fixes: vim/vim#18647
closes: vim/vim#18662

5c3e762631
2025-10-30 07:29:21 +08:00
zeertzjq
89030f3ac4 vim-patch:8f551a7: runtime: regenerate helptags, update last-change header in tombi compiler
8f551a70ad

Co-authored-by: Christian Brabandt <cb@256bit.org>
2025-10-30 06:47:52 +08:00
zeertzjq
34ddb8b1b8 vim-patch:14e7203: runtime(compiler): Fix escaping in Windows shell command for tombi
As observed by Doug Kearns

related: vim/vim#18590
closes: vim/vim#18661

14e7203713

Co-authored-by: Konfekt <Konfekt@users.noreply.github.com>
2025-10-30 06:47:52 +08:00
Christian Clason
f5762e3e17 build(deps): bump luajit to 8518c0b40 2025-10-29 23:44:45 +01:00