When toggling anonymous nodes in the :InspectTree window, keep the
cursor fixed relative to the node within the tree. This prevents the
cursor from jumping.
Problem:
"show" is potentially a new verb that we can avoid (there is already
"open" and "echo"). Even if we can't avoid it, the behavior of
`show_tree` fits well in the "inspect" family of functions: a way for
users to introspect/reflect on the state of Nvim.
Existing "inspect" functions:
vim.inspect()
vim.inspect_pos()
vim.treesitter.inspect_language()
nvim__inspect_cell
Solution:
Rename `show_tree` to `inspect_tree`.
Large parts the library weren't being used, and the parts that were was overly
abstracted for our use case. Additionally, part of its use case was to abstract
pkgconfig boilerplate, which is no longer needed as pkgconfig has been removed
in favor of relying on cmake alone in 09118052ce.
Problem:
No easy way to find files under certain directories (ex: grab all files under
`test/`) or exclude the content of certain paths (ex. `build/`, `.git/`)
Solution:
Pass the full `path` as an arg to the predicate.
If the LSP server fails to start then the client never initializes and
thus never calls its on_attach function and an LspAttach event is
never fired. However, the on_exit function still fires a LspDetach
event, so user autocommands that attempt to "clean up" in LspDetach may
run into problems if they assume that the buffer was already attached.
The solution is to only fire an LspDetach event if the buffer was
already attached in the first place.
vim-patch:8.2.2781: add() silently skips when adding to null list or blob
Problem: Add() silently skips when adding to null list or blob.
Solution: Give an error in Vim9 script. Allocate blob when it is NULL like
with list and dict.
b7c21afef1
Do not implicitly change a NULL blob/dict/list to an empty one.
N/A patches for version.c:
vim-patch:8.2.1949: Vim9: using extend() on null dict is silently ignored
Problem: Vim9: using extend() on null dict is silently ignored.
Solution: Give an error message. Initialize a dict variable with an empty
dictionary. (closesvim/vim#7251)
348be7ed07
N/A because Nvim's current behavior is an error message as a locked
list/dict, which is more consistent. Ref #4615.
Co-authored-by: Bram Moolenaar <Bram@vim.org>
Problem:
In a success-failure-success situation, if minimal timeout is reached
between the failure and the second success, the session is stopped
without waiting for the second success, causing the test to fail.
Solution:
Wait for another success if a failure is seen after a success.
Ref #22155#22464
Problem:
If shell-test finishes before the next RPC call, TermClose has already
been triggered, so the test fails.
Solution:
Add INTERACT argument so that shell-test keeps running.
This feature has long been obsolete. The 'keymap' option can be used
to support language keymaps, including hebrew and hebrewp (phonetic
mapping). There is no need to keep the old c code with hardcoded
keymaps for some languages.
redraw! redraws the entire screen instead of just the windows with
the buffer which were actually changed.
I considered trying to calculating the range for the delta
but it looks tricky. Could a follow-up.
Problem: readblob() returns empty when trying to read too much.
Solution: Return what is available.
5b2a3d77d3
Co-authored-by: Bram Moolenaar <Bram@vim.org>
Problem: readblob() cannot read from character device.
Solution: Use S_ISCHR() to not check the size. (Ken Takata, closesvim/vim#11407)
43625762a9
S_ISCHR is always defined in Nvim.
Co-authored-by: K.Takata <kentkt@csc.jp>
Problem: readblob() always reads the whole file.
Solution: Add arguments to read part of the file. (Ken Takata,
closesvim/vim#11402)
11df3aeee5
Remove trailing whitespace in test as done in patch 9.0.1257.
Move the help for rand() before range().
Co-authored-by: K.Takata <kentkt@csc.jp>
Problem: Duplicate code for setting byte in blob, blob test may fail.
Solution: Call blob_set_append(). Test sort failure with "N".
e8209b91b9
Co-authored-by: Bram Moolenaar <Bram@vim.org>
Problem: Vim9: blob operations not fully tested.
Solution: Make more blob tests run in Vim9 script. Fix filter(). Make
insert() give an error for a null blob, like add().
39211cba72
vim-patch:8.2.3284: no error for insert() or remove() changing a locked blob
Problem: No error for insert() or remove() changing a locked blob.
Solution: Check a blob is not locked before changing it. (Sean Dewar,
closesvim/vim#8696)
80d7395dcf
Co-authored-by: Bram Moolenaar <Bram@vim.org>
Co-authored-by: Sean Dewar <seandewar@users.noreply.github.com>
Problem: Vim9: blob operations not tested in all ways.
Solution: Run tests with CheckLegacyAndVim9Success(). Make blob assign with
index work.
51e933261b
Cherry-pick related changes from patches 8.2.{0633,0634}.
N/A patches for version.c:
vim-patch:8.2.2779: memory access error in remove() for blob
Problem: Memory access error in remove() for blob.
Solution: Adjust length for memmove().
f7e92aae15
Co-authored-by: Bram Moolenaar <Bram@vim.org>
Problem: Vim9: strange error for subtracting from a list.
Solution: Check getting a number, not a string. (closesvim/vim#7167)
081db1a66d
Cherry-pick eval_addblob() and eval_addlist() from patch 8.2.0149.
Co-authored-by: Bram Moolenaar <Bram@vim.org>
Problem: Vim9: not all blob operations work.
Solution: Run more tests also with Vim9 script and :def functions. Fix what
doesn't work.
0e3ff19196
Co-authored-by: Bram Moolenaar <Bram@vim.org>
Problem: Vim9: blob tests for legacy and Vim9 script are separate.
Solution: Add CheckLegacyAndVim9Success(). Make blob index assign work.
68452177ca
Co-authored-by: Bram Moolenaar <Bram@vim.org>
Problem: ml_get error when going to another tab. (Daniel J. Perry)
Solution: Do not call update_topline() if "curwin" is invalid.
(closesvim/vim#11907)
99ad3a8bb9
Co-authored-by: Bram Moolenaar <Bram@vim.org>