| Commit message (Collapse) | Author | Age |
... | |
|
|
|
|
|
| |
Adds API function `nvim_eval_statusline` to allow evaluating a
statusline string and obtaining information regarding it.
Closes https://github.com/neovim/neovim/issues/15849
|
|
|
|
|
|
|
|
| |
For anonymous scripts, defer the creation of script items until an attempt to access a script-local
variable is made. This dramatically reduces the number of script items created when using lots of
vim.cmd and nvim_exec especially.
This will mean <SID> usage fails until a script-local variable access is first made.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Based on #13143 (and #11507) with changes:
- Omit script_type_E. Use sn_name == NULL to determine anon items.
- Keep SID_STR. Used by anon :source for .lua files (no item).
- Show SID in get_scriptname output (:verbose set).
- Factor item creation into new_script_item.
- Leave sc_seq = 0 (anon scripts don't re-use the same item when re-sourced).
- Add tests for anon :source.
Co-authored-by: Vikram Pal <vikrampal659@gmail.com>
Co-authored-by: Justin M. Keyes <justinkz@gmail.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Adds the following API functions.
- nvim_buf_set_mark(buf, name, line, col)
* Set marks in a buffer.
- nvim_buf_del_mark(buf, name)
* Delete a mark that belongs to buffer.
- nvim_del_mark(name)
* Delete a global mark.
- nvim_get_mark(name)
* Get a global mark.
Tests:
- Adds test to all the new api functions, and adds more for the existing
nvim_buf_get_mark.
* Tests include failure cases.
Documentation:
- Adds documentation for all the new functions, and improves the
existing fucntion docs.
|
|\
| |
| | |
refactor(api): Represent option dicts as a structs in C and reduce conversion overhead from lua
|
| |
| |
| |
| |
| |
| |
| | |
Do not copy a lot of lua strings (dict keys) to just strequal() them
Just compare them directly to a dedicated hash function.
feat(generators): HASHY McHASHFACE
|
|/
|
|
| |
This makes `globpath(&rtp, ...)` work again for start packages
|
|
|
|
|
|
|
|
| |
Now remove the addition of "start/*" packages in 'packpath' as
explicit items in 'runtimepath'. This avoids 'runtimepath' from becoming
very long when using a lot of plugins as packages.
To get the effective search path as a list, use |nvim_list_runtime_paths()|
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
Problem:
Anonymous :source (no args) and nvim_exec() don't support Vimscript line continuations.
Solution:
Factor out the concat logic into concat_continued_line() and a
CONCAT_CONTINUED_LINES macro for simple concatenations where lines are
fetched individually.
Closes #14807
|
| |
|
|
|
| |
ref #15440
|
| |
|
|
|
|
|
|
| |
Iterating over PARAM_COUNT is wrong as PARAM_COUNT also counts the last
element of the options array, which has a NULL fullname in order to
signal the end of the array.
|
|
|
|
|
| |
Previously nvim_exec would silent output no matter whether output
is true or false.
Now output is only silent and captured when output is true.
|
|
|
|
| |
vim.api.nvim_chan_send(vim.api.nvim_open_term(0), io.open("/path/to/smile.cat", "r"):read("*a"))
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
|
|
| |
* improve error message to make it actionable
|
|\
| |
| | |
A Mudholland Dr. Recast
|
| |
| |
| |
| |
| | |
The commit summary maybe does not make sense, but calling a function
that does not wait on anything `wait()` makes even less sense.
|
|/
|
|
|
|
|
| |
- The previous commit lost information in the tests. Instead, add some
more "normalization" substitutions in pcall_err(), so that the general
shape of the stacktrace is included in the asserted text.
- Eliminate contains(), it is redundant with matches()
|
|\
| |
| | |
input: fix stack overflow
|
| | |
|
|/
|
|
| |
Although 'nomodeline' is not strictly part of the definition of
a "scratch-buffer" it is obviously the right default.
|
|
|
|
|
|
| |
* paste: support replace mode
* Clean up
Co-authored-by: Jesse Bakker <git@jessebakker.com>
|
| |
|
|
|
|
|
|
| |
- We already find ourselves renaming nvim_execute_lua in tests and
scripts, which suggests "exec" is the verb we actually want.
- Add "exec" verb to `:help dev-api`.
|
| |
|
|
|
|
|
| |
- Eliminate nvim_source_output(): add boolean `output` param to
nvim_exec() instead.
|
|
|
|
|
|
|
| |
- Similar to nvim_source but will capture the output
- Add meaningful VimL tracebacks for nvim_source
- Handle got_int
- Add error reporting
|
|
|
|
|
|
|
| |
- DOCMD_REPEAT is needed to source all lines of input.
- Fix ":verbose set {option}?" by handling SID_STR in get_scriptname().
closes #8722
|
| |
|
|
|
|
|
| |
Given the other type names "jumps", "vars", etc., the name "buflist"
is somewhat unintuitive.
|
|
|
|
|
| |
Since the parameter is already non-primitive, make it an `opts` map
instead of just a list, in case we want to extend it later.
|
|
|
|
| |
Eliminate `expect_err` in favor of `pcall_err` + `eq` or `matches`.
|
|
|
|
|
|
|
| |
- Rename `meth_pcall`.
- Make `pcall_err` raise an error if the function does not fail.
- Add `vim.pesc()` to treat a string as literal where a Lua pattern is
expected.
|
|
|
|
|
| |
- Move os_name() up to "global helpers".
- Rename it to is_os().
- Make it depend on uname() instead of a running Nvim instance.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
- Always load files when cleaning up jumplist.
- For Shada: avoids writing duplicate entries, which happens when you read
from a shada file with duplicate entries (merging the jumplist while
writing sometimes produces duplicate entries, bug?) and then write right
away (i.e.: without any `:jumps`, `getjumplist()`, or any jump movement,
that is: nothing that calls `cleanup_jumplist` with `loadfiles == true`).
- For Context: avoids non-idempotent behavior for the same reason (i.e.:
first call to `shada_encode_jumps` does not remove duplicate entries).
- Do not set pcmark when dumping jumplist for Context.
- Retrieving current Context shouldn't add an entry to the jumplist
(which will be removed by a subsequent `cleanup_jumplist` anyway, i.e.:
tail entry matching current position), just act like `getjumplist` for
instance.
|
|
|
|
|
|
| |
luassert uses 3 by default, which is often not enough.
Instead of documenting how to increase it, let's use a more fitting
(sane) default of 100 levels.
|
|
|
|
|
|
| |
- All "chunks" in a paste-stream should form a single undo-block. Side
effect of 7a8579288424 was to create an undo-block for each chunk.
- Also: remove old :redraw force logic, irrelevant after 7a8579288424.
|
| |
|
| |
|
|
|
|
|
|
| |
Some terminals helpfully translate \n to \r.
fix #10872
ref #10223
|