Commit Graph

25816 Commits

Author SHA1 Message Date
zeertzjq
1403779ae0 fix(clipboard): don't pass --foreground to wl-copy
Fix #25466

(cherry picked from commit a1e351b8d7)
2023-10-03 03:24:53 +00:00
zeertzjq
49d7de8f5c
Merge pull request #25431 from zeertzjq/backport
Backport to release-0.9
2023-09-30 07:21:41 +08:00
zeertzjq
d5c16d1bfe vim-patch:9.0.1956: Custom completion skips orig cmdline if it invokes glob()
Problem:  Custom cmdline completion skips original cmdline when pressing
          Ctrl-P at first match if completion function invokes glob().
Solution: Move orig_save into struct expand_T.

closes: vim/vim#13216

28a23602e8
2023-09-30 07:01:41 +08:00
nwounkn
f5b43bf1f3 fix(clang): null pointer dereference in parse_msgpack 2023-09-30 07:01:41 +08:00
nwounkn
e298c01cfb fix(ui): "resize -1" with cmdheight=0
Problem:
Crash from:

    set cmdheight=0 redrawdebug=invalid
    resize -1

Solution:
Do not invalidate first `p_ch` `msg_grid` rows in `update_screen` when
scrolling the screen down after displaying a message, because they may
be used later for drawing cmdline.
Fixes #22154
2023-09-30 07:01:41 +08:00
zeertzjq
ee8948f073
Merge pull request #25408 from neovim/backport-25399-to-release-0.9
[Backport release-0.9] fix(unittests): ignore __s128 and __u128 types in ffi
2023-09-29 13:05:09 +08:00
James McCoy
9efc6f7c4d fix(unittests): ignore __s128 and __u128 types in ffi
Linux added these types to their userspace headers in [6.5], which
causes unit tests to fail like

```
-------- Running tests from test/unit/api/private_helpers_spec.lua
RUN       vim_to_object converts true: 17.00 ms ERR
test/unit/helpers.lua:748: test/unit/helpers.lua:732: (string) '
test/unit/helpers.lua:264: ';' expected near '__s128' at line 194'
exit code: 256

stack traceback:
	test/unit/helpers.lua:748: in function 'itp_parent'
	test/unit/helpers.lua:784: in function <test/unit/helpers.lua:774>
```

Since we don't use these types, they can be ignored to avoid LuaJIT's C
parser choking on them.

[6.5]: 224d80c584

(cherry picked from commit 0df0e1198b)
2023-09-29 02:36:35 +00:00
zeertzjq
b1891c5fea
Merge pull request #25407 from neovim/backport-24769-to-release-0.9
[Backport release-0.9] vim-patch:9.0.1735: Rename completion specific findex var
2023-09-29 07:39:00 +08:00
zeertzjq
0360ceffc9 vim-patch:9.0.1735: Rename completion specific findex var
Problem: Rename completion specific findex var
Solution: Move "findex" static variable to xp_selected in expand_T

closes: vim/vim#12548

e9ef347c13
(cherry picked from commit 69aac643c4)
2023-09-28 23:29:00 +00:00
zeertzjq
166c22f528
Merge pull request #25388 from neovim/backport-25383-to-release-0.9
[Backport release-0.9] vim-patch:8.2.3467: CursorHoldI event interferes with "CTRL-G U"
2023-09-27 19:28:16 +08:00
zeertzjq
2b2a20f4ea vim-patch:8.2.3467: CursorHoldI event interferes with "CTRL-G U"
Problem:    CursorHoldI event interferes with "CTRL-G U". (Naohiro Ono)
Solution:   Restore the flag for "CTRL-G U" after triggering CursorHoldI.
            (closes vim/vim#8937)

5a9357d0bf

Co-authored-by: Bram Moolenaar <Bram@vim.org>
(cherry picked from commit a5445f5435)
2023-09-27 11:01:26 +00:00
zeertzjq
b4f58d6745
Merge pull request #25368 from neovim/backport-25362-to-release-0.9
[Backport release-0.9] fix(runtime): add commentstring for D ftplugin
2023-09-26 06:25:46 +08:00
Axel Ricard
da4d59018d fix(runtime): add commentstring for D ftplugin
Problem: No commentstring is set for D buffers after removing the
default C-style commentstring

Same solution than neovim#23039

(cherry picked from commit 222196824f)
2023-09-25 22:14:18 +00:00
zeertzjq
e5ec72562d
Merge pull request #25355 from neovim/backport-25354-to-release-0.9
[Backport release-0.9] fix(api): handle NUL in nvim_err_write() and nvim_out_write()
2023-09-25 11:16:18 +08:00
zeertzjq
00c3ffdb4b fix(api): handle NUL in nvim_err_write() and nvim_out_write()
(cherry picked from commit 49254ddebe)
2023-09-25 03:06:35 +00:00
zeertzjq
c21ca9b87a
Merge pull request #25353 from neovim/backport-25351-to-release-0.9
[Backport release-0.9] fix(exception): remember whether message is multiline
2023-09-25 08:53:37 +08:00
zeertzjq
792b10d03e fix(exception): remember whether message is multiline
(cherry picked from commit bfd396d986)
2023-09-25 00:23:48 +00:00
zeertzjq
c901472d67
Merge pull request #25343 from neovim/backport-25342-to-release-0.9
[Backport release-0.9] fix(provider/pythonx): import the correct module
2023-09-24 22:19:17 +08:00
zeertzjq
25ac45386c fix(provider/pythonx): import the correct module
(cherry picked from commit aede22caa9)
2023-09-24 14:04:48 +00:00
zeertzjq
5bf0873d86
Merge pull request #25329 from neovim/backport-25328-to-release-0.9
[Backport release-0.9] fix(float): fix some other crashes with :unhide or :all
2023-09-23 22:45:44 +08:00
zeertzjq
fd0ff7665c fix(float): fix some other crashes with :unhide or :all
(cherry picked from commit 462fbcb293)
2023-09-23 14:34:04 +00:00
Jongwook Choi
b49cb1826a fix(provider): fix python3 provider cannot detect python3.12
PROBLEM: The builtin python3 provider cannot auto-detect python3.12
when g:python3_host_prog is not set. As a result, when python3 on $PATH
is currently python 3.12, neovim will fail to load python3 provider
and result in `has("python3") == 0`, e.g.,
"Failed to load python3 host. You can try to see what happened by ..."

ROOT CAUSE: the `system()` call from `provider#pythonx#DetectByModule`
does not ignore python warnings, and `pkgutil.get_loader` will print
a warning message in the very first line:
```
<string>:1: DeprecationWarning: 'pkgutil.get_loader' is deprecated and
slated for removal in Python 3.14; use importlib.util.find_spec() instead
```

SOLUTION:
- Use `importlib.util.find_spec` instead (python >= 3.4)
- Use `-W ignore` option to prevent any potential warning messages

(cherry picked from commit 3da511f1d0)
2023-09-23 15:29:02 +02:00
zeertzjq
aa5b5b434d
Merge pull request #25322 from neovim/backport-25321-to-release-0.9
[Backport release-0.9] fix(lua): show error message when failing to set variable
2023-09-23 16:13:58 +08:00
zeertzjq
8063aa7cf6 fix(lua): show error message when failing to set variable
(cherry picked from commit 2c5d373ede)
2023-09-23 07:59:59 +00:00
zeertzjq
6156d3fdc9
Merge pull request #25320 from neovim/backport-25318-to-release-0.9
[Backport release-0.9] fix(unhide): close floating windows first
2023-09-23 14:53:19 +08:00
zeertzjq
c16af962db fix(unhide): close floating windows first
(cherry picked from commit 61ded79115)
2023-09-23 06:43:18 +00:00
zeertzjq
232a4eaef7
Merge pull request #25319 from neovim/backport-25317-to-release-0.9
[Backport release-0.9] vim-patch:8.2.4609: :unhide does not check for failing to close a window
2023-09-23 14:26:29 +08:00
zeertzjq
b3b30dbaf7 vim-patch:8.2.4609: :unhide does not check for failing to close a window
Problem:    :unhide does not check for failing to close a window.
Solution:   When closing a window fails continue with the next one.  Do not
            try closing the autocmd window. (closes vim/vim#9984)

6f2465d336

Co-authored-by: Bram Moolenaar <Bram@vim.org>
(cherry picked from commit 6c4ef7eca6)
2023-09-23 06:11:03 +00:00
zeertzjq
94246472e3
Merge pull request #25279 from neovim/backport-25277-to-release-0.9
[Backport release-0.9] fix(statuscolumn): update number hl for each screen line
2023-09-21 07:38:19 +08:00
zeertzjq
a89c385f33 fix(statuscolumn): update number hl for each screen line
(cherry picked from commit b2332e0853)
2023-09-20 23:03:47 +00:00
zeertzjq
926b8f9120
Merge pull request #25250 from neovim/backport-25228-to-release-0.9
[Backport release-0.9] test(tui_spec): update cursor_address test for wrap flag
2023-09-20 07:21:31 +08:00
zeertzjq
1b8132880d test(tui_spec): update cursor_address test for wrap flag
(cherry picked from commit 186895bca4)
2023-09-19 22:56:17 +00:00
zeertzjq
3f796c5410
Merge pull request #25249 from neovim/backport-25248-to-release-0.9
[Backport release-0.9] vim-patch:9.0.1915: r_CTRL-C works differently in visual mode
2023-09-20 06:54:46 +08:00
zeertzjq
82e0a6028c vim-patch:9.0.1915: r_CTRL-C works differently in visual mode
Problem:  r_CTRL-C works differently in visual mode
Solution: Make r_CTRL-C behave consistent in visual mode
          in terminal and Windows GUI

in visual mode, r CTRL-C behaves strange in Unix like environments. It
seems to end visual mode, but still is waiting for few more chars,
however it never seems to replace it by any characters and eventually
just returns back into normal mode.

In contrast in Windows GUI mode, r_CTRL-C replaces in the selected area
all characters by a literal CTRL-C.

Not sure why it behaves like this. It seems in the Windows GUI, got_int
is not set and therefore behaves as if any other normal character has
been pressed.

So remove the special casing of what happens when got_int is set and
make it always behave like in Windows GUI mode. Add a test to verify it
always behaves like replacing in the selected area each selected
character by a literal CTRL-C.

closes: vim/vim#13091
closes: vim/vim#13112

476733f3d0

Co-authored-by: Christian Brabandt <cb@256bit.org>
(cherry picked from commit d2678c78dc)
2023-09-19 22:38:39 +00:00
zeertzjq
cb211e5746
Merge pull request #25226 from neovim/backport-25223-to-release-0.9
[Backport release-0.9] fix: fix use after free
2023-09-18 07:22:20 +08:00
sid-6581
28f600337f fix: fix use after free
(cherry picked from commit 8a0eb90e14)
2023-09-17 23:07:30 +00:00
zeertzjq
26c6d78a0c
Merge pull request #25206 from neovim/backport-25204-to-release-0.9
[Backport release-0.9] docs(tutor): clarify the meaning of ✗ and ✓
2023-09-17 09:06:21 +08:00
zeertzjq
249e930eaf docs(tutor): clarify the meaning of ✗ and ✓
Also reformat tutor.tutor.json to use 2-space indent while at it.

(cherry picked from commit f619ea1fc1)
2023-09-17 00:51:46 +00:00
zeertzjq
7fd12dabcc
Merge pull request #25202 from zeertzjq/backport
Backport to release-0.9
2023-09-17 07:12:42 +08:00
Phelipe Teles
3a5b46e6bb fix(lua): not using global value in vim.opt_global 2023-09-17 06:44:43 +08:00
Lewis Russell
68ae7ea529 refactor: rename _meta.lua to _options.lua 2023-09-17 06:44:14 +08:00
zeertzjq
3f5f6d412b
Merge pull request #25200 from neovim/backport-25199-to-release-0.9
[Backport release-0.9] test(plugin/man_spec): use pesc() on actual_file in pattern
2023-09-17 06:18:20 +08:00
zeertzjq
aa04090e92 test(plugin/man_spec): use pesc() on actual_file in pattern
(cherry picked from commit 8f1e344339)
2023-09-16 22:08:11 +00:00
github-actions[bot]
cdb8c46253
[Backport release-0.9] fix: invoke changed_bytes when rewriting tabs (#25174)
fix: invoke changed_bytes when rewriting tabs

When tabstop and shiftwidth are not equal, tabs are inserted as individual
spaces and then rewritten as tab characters in a second pass. That second pass
did not call changed_bytes which resulted in events being omitted.

Fixes #25092

(cherry picked from commit 7476715765)

Co-authored-by: Ilia Choly <ilia.choly@gmail.com>
2023-09-15 04:12:21 -07:00
L Lllvvuu
f0898d438e [Backport release-0.9] fix(treesitter): language.add - only register parser if it exists
Backport of #25151.

Fixes: #24531
2023-09-15 10:10:37 +02:00
zeertzjq
d1813f73b8
Merge pull request #25144 from neovim/backport-24983-to-release-0.9
[Backport release-0.9] fix(rpc): fix race condition
2023-09-14 09:34:53 +08:00
Sergey Slipchenko
9df72d3f9f fix(rpc): fix race condition
(cherry picked from commit d42343146a)
2023-09-14 01:20:49 +00:00
zeertzjq
cd6536c140
Merge pull request #25142 from neovim/backport-25133-to-release-0.9
[Backport release-0.9] fix(float): update position of anchored windows first
2023-09-14 07:54:05 +08:00
zeertzjq
d1cce10702 fix(float): update position of anchored windows first
(cherry picked from commit 4ca0441e14)
2023-09-13 23:42:42 +00:00
Christian Clason
fc8d1f7c7e
Merge pull request #25122 from neovim/backport-25121-to-release-0.9
[Backport release-0.9] fix(treesitter): fixup for InspectTree
2023-09-12 17:36:03 +02:00