Commit Graph

25804 Commits

Author SHA1 Message Date
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
Lewis Russell
f0b1e46f91 fix(treesitter): fixup for InspectTree
Fixes #25120

(cherry picked from commit 040cba1faa)
2023-09-12 14:56:07 +00:00
Christian Clason
57aeacc344
Merge pull request #25117 from neovim/backport-25115-to-release-0.9
[Backport release-0.9] fix(treesitter): remove more double recursion
2023-09-12 13:33:14 +02:00
Lewis Russell
5f8676c268 fix(treesitter): remove more double recursion
Do not call `for_each_child` in functions that are already recursive.

(cherry picked from commit e76ae3d232)
2023-09-12 11:23:31 +00:00
Christian Clason
c7b316f71a
Merge pull request #25111 from llllvvuu/backport/25109
[Backport release-0.9] fix(languagetree): remove double recursion in LanguageTree:parse
2023-09-12 09:22:56 +02:00
L Lllvvuu
64160bac5b
[Backport release-0.9] fix(languagetree): remove double recursion in LanguageTree:parse
`LanguageTree:parse` is recursive, and calls
`LanguageTree:for_each_child`, which is also recursive.

That means that, starting from the third level (child of child of root),
nodes will be parsed twice.

Which then means that if the tree is N layers deep, there will be ~2^N
parses even if the branching factor is 1.

Fixes: #25104
2023-09-12 00:22:30 -07:00
zeertzjq
51edadcaeb
Merge pull request #25091 from neovim/backport-25090-to-release-0.9
[Backport release-0.9] fix(mouse): click on 'statuscolumn' with 'rightleft'
2023-09-11 08:42:24 +08:00
zeertzjq
284c2e0124 fix(mouse): click on 'statuscolumn' with 'rightleft'
(cherry picked from commit 1fc29b920f)
2023-09-11 00:29:52 +00:00
bfredl
e20f3a815a version bump 2023-09-07 12:27:38 +02:00
bfredl
fe869a8ce2 NVIM 0.9.2
This is a maintenance release, focused on bug fixes and improvements.
However, There are included features related to TUI and :terminal.

BRAM

Nvim is a fork of the Vim editor, created and developed by Bram Moolenaar.
On August 3, 2023, he passed away at the age of 62. If Vim or Nvim have
been of use to you in your life, read `:help Bram` and `:help Uganda`
and consider honoring his memory in a way you see fit.

CHANGES SINCE 0.9.1

BREAKING CHANGES

An adjustment was made to the `grid_line` event as part of the exernal
UI protocol the `cells` array might now end with a `[' ', attr, 0]` item
with a repeat count of zero. This is needed by the TUI to disambiguate
final spaces on a line from just clearing the line, which will make a
difference when copying text using the terminal emulators builtin
primary selection support.

External UI:s can safely ignore such an empty item and most UIs already
handle this fine. But it could break some UI:s which has an assert to
validate the cell count to be bigger than zero, or similar checks.

FEATURES

- tui: Support Super and Meta modifiers
- terminal: forward more special keys and modifier-mouse combinations

BUG FIXES

- lua: Always set arg0 to lua scripts
- api: Redundant error when using `nvim_cmd`
- api, lua: Make blank lines in a message work properly
- column: fix bugs related to signs in 'statuscol'
- completion: Don't add backslash in runtime completion
- diff: Filler lines for hunks bigger than linematch limit
- edit: Fix K_EVENT interfering with 'digraph'
- editorconfig: Better validation and error handling
- events: Don't expand non-file as file name
- events: Trigger VimResume on next UI request
- extmarks: Wrong display when changing text with virt_lines
- folds: Update folds in Insert mode with fdm=indent
- helptags: Make multibyte help tags work properly
- highlight: Make CurSearch work properly with 'winhl'
- inccommand: Fix saving of undo info
- keycodes: Recognize <t_xx> as a key
- lsp: Do not assume client capability exists in watchfiles check (#24558)
- mouse: Handle folded lines with virt_lines attached to line above
- remote: Make --remote-expr print to stdout
- remote: Restore previous --remote-expr output formatting
- spell: Splice extmarks on :spellrepall
- startup: Don't truncate when printing with -l
- startup: Run embedded Nvim with real path
- statusline: Redraw when Visual submode changes
- statusline: Fill for double-width char after moving items
- treesitter: updates to queries and injections
- treesitter: Fix TSNode:tree() double free
- ui: Propagate line wrapping state on grid_line events
- ui: Avoid ambiguity about chunk that clears part of line

PERFORMANCE
- extmarks: Avoid unnecessary marktree traversal with folds
- substitute: Don't reallocate new_start every time

BUILD SYSTEM
- deps: Bump libvterm to 0.3.3
- deps: Bump LuaJIT to HEAD - 03c31124c
- deps: Bump libuv to v1.46.0
- deps: Bump Luv to 1.45.0-0
- deps: Bump tree-sitter-c to v0.20.5
- deps: Bump tree-sitter-lua to v0.0.18
2023-09-07 12:26:08 +02:00
zeertzjq
3a13777289
Merge pull request #25022 from neovim/backport-25021-to-release-0.9
[Backport release-0.9] vim-patch:9.0.1866: undo is synced after character find
2023-09-05 06:41:04 +08:00
zeertzjq
4728f2d2f9 vim-patch:9.0.1866: undo is synced after character find
Problem:  Undo is synced after character find.
Solution: Set no_u_sync when calling gotchars_nop().

closes: vim/vim#13022
closes: vim/vim#13024

dccc29c228
(cherry picked from commit 311386c09f)
2023-09-04 22:26:12 +00:00
zeertzjq
6490d937b2
Merge pull request #24999 from neovim/backport-24997-to-release-0.9
[Backport release-0.9] perf(substitute): don't reallocate new_start every time
2023-09-03 12:43:49 +08:00