| Commit message (Collapse) | Author | Age |
| |
|
| |
|
|
|
|
| |
Fixes #12718.
|
| |
|
| |
|
| |
|
| |
|
| |
|
|
|
| |
On empty buffers, when editing the first line, the line is buffered, causing offset to be < 0. While the buffer is not actually empty, the buffered line has not been flushed (and should not be) yet, so the call is valid but an edge case.
|
|
|
|
|
| |
This fixes an error when fo=ro, when hitting <CR> to insert a new
comment line.
|
| |
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
| |
a bit of test cleanup
ärrår
feeel
SPLIT
fix: sned correct updates on <CR>
|
| |
|
| |
|
|
|
|
|
|
| |
This implements byte-resolution updates of buffer changes.
Note: there is no promise that the buffer state is valid inside
the callback!
|
| |
|
| |
|
| |
|
| |
|
|\
| |
| | |
treesitter: avoid escaping complete query strings
|
| |
| |
| |
| |
| | |
Escape "\\" only for `vim-match?` not for `match?`
Fixes #12595
|
| | |
|
|/ |
|
|
|
|
|
| |
This caused segfaults when calling win_findbuf in an `on_detach`
callback, when the callback was triggered when closing the last window
containing the buffer.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* feat: Add vim.register_keystroke_callback
* fixup: Forgot to remove mention of old option
* fixup: Answer jamessan comments
* fixup: Answer norcalli comments
* fixup: portability
* Update runtime/doc/lua.txt
Co-authored-by: Ashkan Kiani <ashkan.k.kiani@gmail.com>
|
| |
|
| |
|
| |
|
|
|
|
|
| |
Test this using treesitter highlighting, which is based on this
old_byte_size.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Can be reproduced with a script like this:
-- in some lua file
vim.fn.timer_start(10, function() error("uh....") end)
-- will cause neovim to crash with the following error.
PANIC: unprotected error in call to Lua API
(nlua_CFunction_func_call failed.)
After this, it will instead print the error message
from the top of the stack, like so.
tmp/error_nvim.lua:10: uh...
Also added an example test. Previously this test
caused the embedded nvim to panic.
|
|
|
|
|
|
|
|
|
|
|
|
| |
vim-patch:8.2.1054: not so easy to pass a lua function to Vim
vim-patch:8.2.1084: Lua: registering function has useless code
I think I have also opened up the possibility for people to use these
callbacks elsewhere, since I've added a new struct that we should be
able to use.
Also, this should allow us to determine what the state of a list is in
Lua or a dictionary in Lua, since we now can track the luaref as we go.
|
| |
|
| |
|
|
|
|
| |
fixup! treesitter: fix lint
|
| |
|
| |
|
| |
|
|\
| |
| | |
treesitter: update runtime
|
| | |
|
| |
| |
| |
| |
| | |
Since tree-sitter PR 615, predicates are not parsed the same.
"Old" way of writing predicates is still supported.
|
| |
| |
| |
| | |
vim.wait( sthg)
|
| |
| |
| |
| |
| | |
* lua: fix behavior when split empty string
* test: lsp.util.apply_text_edits with an empty edit
|
|/ |
|
| |
|
|
|
|
|
|
|
|
|
| |
* Change uri_to_fname to not convert non-file URIs
A URI with a scheme other than file doesn't have a local file path.
* fixup! Change uri_to_fname to not convert non-file URIs
* fixup! fixup! Change uri_to_fname to not convert non-file URIs
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* add lua function to highlight yanked region
* extract namespace, better naming, default values
* add default for event argument
* free timer
* factor out mark to position calculation
* d'oh
* make sure timer stops before callback (cf. luv example)
* factor out timer, more documentation
* fixup
* validate function argument for schedule
* fix block selection past eol
* correct handling of multibyte characters
* move arguments around, some cleanup
* move utility functions to vim.lua
* use anonymous namespaces, avoid local api
* rename function
* add test for schedule_fn
* fix indent
* turn hl-yank into proper (hightlight) module
* factor out position-to-region function
mark extraction now part of highlight.on_yank
* rename schedule_fn to defer_fn
* add test for vim.region
* todo: handle double-width characters
* remove debug printout
* do not shadow arguments
* defer also callable table
* whitespace change
* move highlight to vim/highlight.lua
* add documentation
* add @return documentation
* test: add check before vim.defer fires
* doc: fixup
|