Commit Graph

29713 Commits

Author SHA1 Message Date
luukvbaal
f82d7b8200 fix(mouse): early return when clicking in padded 'statuscolumn' (#29394)
Problem:  Hit assert when clicking inside a padded 'statuscolumn' that
          is padded beyond the length of the allocated click_defs.
Solution: Still consider this a "in_statuscol" click, but return early
          when about to execute the click func.
(cherry picked from commit 102971a396)
2024-06-18 22:03:11 +00:00
zeertzjq
b16fe558ae
Merge pull request #29398 from neovim/backport-29397-to-release-0.10
vim-patch:9.1.0498: getcmdcompltype() interferes with cmdline completion
2024-06-19 06:00:15 +08:00
zeertzjq
34cc49bd72 vim-patch:9.1.0498: getcmdcompltype() interferes with cmdline completion (#29397)
Problem:  getcmdcompltype() interferes with cmdline completion.
Solution: Don't set expand context when it's already set.
          (zeertzjq)

closes: vim/vim#15036

a821b609f9
(cherry picked from commit 4e8ec4900e)
2024-06-18 21:47:42 +00:00
zeertzjq
ad82e11eb7
Merge pull request #29386 from neovim/backport-29014-to-release-0.10
refactor(tests): more global highlight definitions
2024-06-18 10:33:17 +08:00
bfredl
db65017e60 refactor(tests): more global highlight definitions
(cherry picked from commit b90d7c36cf)
2024-06-18 02:18:49 +00:00
zeertzjq
2eafe248c4
Merge pull request #29385 from neovim/backport-29006-to-release-0.10
refactor(tests): use more global highlight definitions
2024-06-18 10:10:39 +08:00
bfredl
3725db69ef refactor(tests): use more global highlight definitions
(cherry picked from commit fb43741f80)
2024-06-18 01:52:58 +00:00
zeertzjq
9f2aec2629
Merge pull request #29383 from neovim/backport-29295-to-release-0.10
docs(lsp): format the handwritten part
2024-06-18 07:25:30 +08:00
Yi Ming
f7d8650616 docs(lsp): format the handwritten part #29295
(cherry picked from commit 7ce261c064)
2024-06-17 23:06:15 +00:00
zeertzjq
446b05f85a
Merge pull request #29362 from neovim/backport-29360-to-release-0.10
docs: document 'list' behavior when 'listchars' excludes "tab"
2024-06-16 06:25:05 +08:00
zeertzjq
891b235df0 docs: document 'list' behavior when 'listchars' excludes "tab" (#29360)
(cherry picked from commit 7e65f3757b)
2024-06-15 22:11:15 +00:00
zeertzjq
1ab52dff9a
Merge pull request #29346 from neovim/backport-29343-to-release-0.10
fix(defaults): default @/Q broken when 'ignorecase' is set
2024-06-15 10:51:36 +08:00
Jerry
0827279ff5 fix(defaults): default @/Q broken when 'ignorecase' is set (#29343)
Problem:
When 'ignorecase' is set, the default keymap Q and Q would exit visual
mode.

This issue was raised in #28287 and a fix was applied in #28289.

However, `==` operator is subject to user `ignorecase` setting.

Solution:
Switching to `==#` operator would guarantee case sensitive comparison
between visual mode and linewise visual mode.

Co-authored-by: Kuanju Chen <kuanju.chen@mksinst.com>
(cherry picked from commit 61aabe0730)
2024-06-15 02:21:35 +00:00
zeertzjq
77b0970cda
Merge pull request #29342 from neovim/backport-29229-to-release-0.10
docs: misc
2024-06-15 07:24:26 +08:00
dundargoc
643d6af451 docs: misc (#29229)
Co-authored-by: Ilia Choly <ilia.choly@gmail.com>
Co-authored-by: Jose Pedro Oliveira <jose.p.oliveira.oss@gmail.com>
Co-authored-by: Maria José Solano <majosolano99@gmail.com>
Co-authored-by: zeertzjq <zeertzjq@outlook.com>
(cherry picked from commit 6e28589e00)
2024-06-14 23:06:11 +00:00
zeertzjq
4d9114d3ab
Merge pull request #29309 from neovim/backport-29096-to-release-0.10
fix(tui): skip TUI in ui_rgb_attached
2024-06-13 11:13:24 +08:00
Gregory Anders
a784b901be fix(tui): skip TUI in ui_rgb_attached (#29096)
The ui_rgb_attached function determines if any UI is attached which
supports RGB (truecolor). We determine if the TUI supports RGB via the
'termguicolors' option which is checked at the beginning of this
function. If the TUI does not support RGB ('termguicolors' is unset), we
check to see if any _other_ UI is attached which supports RGB.

Normally, the TUI's "rgb" flag and the 'termguicolors' option are the
same. However, they may differ during startup when the "rgb" flag is set
by tui/tui.c to indicate to the core that the terminal emulator supports
truecolor. The 'termguicolors' option is not actually set until
_defaults.lua runs.

(cherry picked from commit 0231265c8c)
2024-06-13 01:27:14 +00:00
zeertzjq
0608444447
Merge pull request #29308 from neovim/backport-29103-to-release-0.10
test: do not set termguicolors in test runner
2024-06-13 09:25:42 +08:00
Gregory Anders
981548b7f7 test: remove checks for failed tests on Windows
(cherry picked from commit 5493fcd52f)
2024-06-13 01:09:49 +00:00
Gregory Anders
728f6c7c83 fix(vim.text): remove assert from vim.text.hexdecode
Instead, return nil plus an error message if the input is invalid.

(cherry picked from commit 4cff418564)
2024-06-13 01:09:49 +00:00
Gregory Anders
18a36d3d9f test: do not set termguicolors in test runner
It's not clear why this is needed and it has adverse side effects on
other tests.

(cherry picked from commit d24f3d055a)
2024-06-13 01:09:49 +00:00
zeertzjq
8a8c3ed4dc
Merge pull request #29279 from luukvbaal/backport-29272-to-release-0.10
fix(column): clamp line number for legacy signs
2024-06-12 10:19:20 +08:00
Luuk van Baal
aa1321801d fix(column): clamp line number for legacy signs
Problem:  Legacy :sign API still allows placing signs beyond the end of
          the buffer. This is unaccounted for by the signcolumn tracking
          logic and is disallowed in general for the extmark API which
          implements it now.
Solution: Clamp legacy sign line number to the length of the buffer.
(cherry picked from commit 1dcda86559
extmark_set() namespace scope and screen test reverse sign order conflict)
2024-06-11 11:02:16 +02:00
github-actions[bot]
0ee3147bc7
fix(lsp): do not reset buf version when detaching client (#29273)
(cherry picked from commit 37bf4c572a)

Co-authored-by: Ilia Choly <ilia.choly@gmail.com>
2024-06-10 22:22:26 +02:00
Samuel Born
46c2962b3a fix(runtime): add commentstring for glsl ftplugin
(cherry picked from commit b6c1ce8a95)
2024-06-09 14:56:21 +02:00
github-actions[bot]
b6b2272573
fix(tui): move $COLORTERM check to _defaults.lua (#29206)
fix(tui): move $COLORTERM check to _defaults.lua (#29197)

We currently check $COLORTERM in the TUI process to determine if the
terminal supports 24 bit color (truecolor). If $COLORTERM is "truecolor"
or "24bit" then we automatically assume that the terminal supports
truecolor, but if $COLORTERM is set to any other value we still query
the terminal.

The `rgb` flag of the UI struct is a boolean which only indicates
whether the UI supports truecolor, but does not have a 3rd state that we
can use to represent "we don't know if the UI supports truecolor". We
currently use `rgb=false` to represent this "we don't know" state, and
we use XTGETTCAP and DECRQSS queries to determine at runtime if the
terminal supports truecolor. However, if $COLORTERM is set to a value
besides "truecolor" or "24bit" (e.g. "256" or "16) that is a clear
indication that the terminal _does not_ support truecolor, so it is
incorrect to treat `rgb=false` as "we don't know" in that case.

Instead, in the TUI process we only check for the terminfo capabilities.
This must be done in the TUI process because we do not have access to
this information in the core Neovim process when `_defaults.lua` runs.
If the TUI cannot determine truecolor support from terminfo alone, we
set `rgb=false` to indicate "we don't know if the terminal supports
truecolor yet, keep checking". When we get to `_defaults.lua`, we can
then check $COLORTERM and only query the terminal if it is unset.

This means that users can explicitly opt out of truecolor determination
by setting `COLORTERM=256` (or similar) in their environment.

(cherry picked from commit d7651b27d5)

Co-authored-by: Gregory Anders <8965202+gpanders@users.noreply.github.com>
2024-06-05 08:52:48 -05:00
github-actions[bot]
dfff482efe
fix(lsp): remove superfluous on_detach callback from semantic tokens module (#29188)
LspDetach is now triggered by the main on_detach callback that is added
when an LSP client is attached to a buffer. The semantic_tokens module
already includes a LspDetach handler that does the right thing. When the
LspDetach trigger was added to the main LSP on_detach, it created a race
condition in semantic tokens when a buffer was deleted that would
trigger both its own on_detach and the LspDetach handlers. If the former
came last, an error was thrown trying to delete a non-existent augroup
(destroy() was being called twice).

(cherry picked from commit 43581011e4)

Co-authored-by: jdrouhard <john@drouhard.dev>
2024-06-04 19:00:51 +02:00
zeertzjq
8dece36427
Merge pull request #29187 from neovim/backport-29089-to-release-0.10
fix(ui): superfluous showmode due to unset globals
2024-06-04 21:48:57 +08:00
luukvbaal
7055cd1238 fix(ui): superfluous showmode / excessive grid_cursor_goto #29089
Problem:  Unsetting global variables earlier in #28578 to avoid
          recursiveness, caused superfluous or even unlimited
          showmode().
Solution: Partly revert #28578 so that the globals are unset at the end
          of showmode(), and avoid recursiveness for ext UI by adding a
          recursive function guard to each generated UI call that may
          call a Lua callback.
(cherry picked from commit b66106a46c)
2024-06-04 13:10:45 +00:00
zeertzjq
f1fba12803
Merge pull request #29182 from neovim/backport-29181-to-release-0.10
fix(filetype): fix typos in filetype detection
2024-06-04 17:39:29 +08:00
Evgeni Chasnovski
1fe1f8556e fix(filetype): fix typos in filetype detection
(cherry picked from commit aa9f21ee95)
2024-06-04 09:26:54 +00:00
zeertzjq
94d8f6bde8
Merge pull request #29139 from neovim/backport-29136-to-release-0.10
vim-patch:8.2.{0083,0109}
2024-06-02 15:50:32 +08:00
zeertzjq
f03348472d test: add a test for #29119
(cherry picked from commit 56337310ef)
2024-06-02 07:37:27 +00:00
zeertzjq
571e54e12c vim-patch:8.2.0109: corrupted text properties when expanding spaces
Problem:    Corrupted text properties when expanding spaces.
Solution:   Reallocate the line. (Nobuhiro Takasaki, closes vim/vim#5457)

ac15fd8c67

Co-authored-by: Bram Moolenaar <Bram@vim.org>
(cherry picked from commit 97d9d71bf3)
2024-06-02 07:37:27 +00:00
zeertzjq
704d33634e vim-patch:8.2.0083: text properties wrong when tabs and spaces are exchanged
Problem:    Text properties wrong when tabs and spaces are exchanged.
Solution:   Take text properties into account. (Nobuhiro Takasaki,
            closes vim/vim#5427)

5cb0b93d52

Co-authored-by: Bram Moolenaar <Bram@vim.org>
(cherry picked from commit 4374ec83cd)
2024-06-02 07:37:27 +00:00
zeertzjq
4c53b9c0a1
Merge pull request #29125 from neovim/backport-29003-to-release-0.10
fix(column): crash with 'signcolumn' set to "number"
2024-06-01 18:29:23 +08:00
luukvbaal
df6ce8377f fix(column): crash with 'signcolumn' set to "number" (#29003)
Problem:  Numberwidth may depend on number of signs with text in the
          buffer and is not handled correctly for extmark signs.
Solution: Move legacy sign code for changed numberwidth so that it is
          handled properly for legacy and extmark signs alike.
(cherry picked from commit f2083bd55c)
2024-06-01 10:10:52 +00:00
zeertzjq
58e1ef2f65
Merge pull request #29105 from neovim/backport-29099-to-release-0.10
fix(win-msi): add bin to PATH per-machine after installation
2024-05-31 13:39:38 +08:00
Luis Calle
c3aef56199 fix(win-msi): add bin to PATH per-machine after installation (#29099)
#22856 made it possible for the msi installer to perform per-user
installations, which caused problems for users that already had
per-machine installations trying to update (the Windows Installer does
not support major upgrades across installation context, see #22933 and
https://stackoverflow.com/a/15498911). It was then reverted in #22949,
but the scope of the modification to the PATH environment variable was
not reverted.

(cherry picked from commit a18652ed61)
2024-05-31 04:45:46 +00:00
github-actions[bot]
d8ff216040
fix(lsp): clear lsp client diagnostics (#29091)
Problem: When an lsp client is stopped, the client will
only clear the diagnostics for the attached buffers but
not the unattached buffers.
Solution: Reset the diagnostics for the whole namespace rather than
for only the attached buffers.

(cherry picked from commit 025c874415)

Co-authored-by: crwebb85 <51029315+crwebb85@users.noreply.github.com>
2024-05-30 09:23:04 +02:00
github-actions[bot]
89fa1ee822
fix(ui): flush ext_cmdline events before doing cmdpreview (#29062)
Problem:  Unable to update the screen for external cmdline during cmdpreview.
Solution: Flush the cmdline UI before cmdpreview state.
(cherry picked from commit 5b6477be45)

Co-authored-by: luukvbaal <luukvbaal@gmail.com>
2024-05-28 03:06:20 -07:00
zeertzjq
88cd7a6cdd
Merge pull request #29058 from neovim/backport-29057-to-release-0.10
vim-patch:0b74eec: runtime(stylus): remove remaining css code (vim/vim#14866)
2024-05-28 15:15:24 +08:00
zeertzjq
fdf769fa86 vim-patch:0b74eec: runtime(stylus): remove remaining css code (vim/vim#14866)
This seems to be a forgotten fixup in 2d919d2744 (r141568461)

0b74eeceb8
(cherry picked from commit 4e2c8dc374)
2024-05-28 07:00:03 +00:00
zeertzjq
b36458b363
Merge pull request #29054 from neovim/backport-29053-to-release-0.10
fix(runtime): source c ftplugin properly for cpp on Windows
2024-05-28 06:51:36 +08:00
zeertzjq
b98aa783f3 fix(runtime): source c ftplugin properly for cpp on Windows (#29053)
On Windows, '{' is currently not treated as a wildcard char, so another
wildcard char is needed for the pattern to be treated as a wildcard.

It may be worth trying to make '{' always a wildcard char in the future,
but that'll be a bit harder as it'll be necessary to make sure '{' is
escaped at various places.

(cherry picked from commit 7b16c1fa84)
2024-05-27 22:39:22 +00:00
github-actions[bot]
039121f5a3
fix(snippet): cancel snippet session when leaving the buffer (#29044)
(cherry picked from commit 608543f8a9)

Co-authored-by: Maria José Solano <majosolano99@gmail.com>
2024-05-27 17:56:05 +02:00
github-actions[bot]
e98637e8c0
fix(lsp): do not detach from buffer if there are uninitialized clients (#29043)
Problem: if on_lines is called before the LSP is initialized, the buffer
is detached.
Solution: check for uninitialized clients before detaching.

(cherry picked from commit 292365fa1b)

Co-authored-by: Ilia Choly <ilia.choly@gmail.com>
2024-05-27 17:26:42 +02:00
zeertzjq
b9e540cc70
Merge pull request #29038 from neovim/backport-28983-to-release-0.10
fix: "popcount" name conflict on NetBSD
2024-05-27 19:28:31 +08:00
Malte Dehling
b322c3560b build: "popcount" name conflict on NetBSD #28983
Problem:
    NetBSD's libc already has a function by the same name.

Solution:
    Rename popcount to xpopcount and add #if defined(__NetBSD__) to
prefer NetBSD's own implementation.  This fixes #28983.

(cherry picked from commit 104800ce2e)
2024-05-27 11:15:13 +00:00
zeertzjq
8d1467ce9a
Merge pull request #29036 from neovim/backport-29035-to-release-0.10
fix(drawline): don't draw beyond end of window
2024-05-27 14:51:14 +08:00