| Commit message (Collapse) | Author | Age |
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
| |
- Introduce TRY_WRAP() until we have an *architectural* solution.
- TODO: bfredl idea: prepare error-handling at "top level" (nv_event).
- nvim_paste(): Revert luaeval() hack (see parent commit).
- With TRY_WRAP() in nvim_put(), 'nomodifiable' error now correctly
"bubbles up".
|
|
|
|
|
|
|
|
| |
- nvim_paste(): Marshal through luaeval() instead of nvim_execute_lua()
because the latter seems to hide some errors.
- Handle 'nomodifiable' in `nvim_put()` explicitly.
- Require explicit `false` from `vim.paste()` in order to "cancel",
otherwise assume true ("continue").
|
| |
|
|
|
|
|
|
|
|
| |
- Show error only once per "paste stream".
- Drain remaining chunks until phase=3.
- Lay groundwork for "cancel".
- Constrain semantics of "cancel" to mean "client must stop"; it is
unrelated to presence of error(s).
|
| |
|
| |
|
|
|
|
|
|
|
|
|
| |
Fixes strange behavior where sometimes the buffer contents of a series
of paste chunks (vim._paste) would be out-of-order.
Now the tui_spec.lua screen-tests are much more reliable. But they still
sometimes fail because of off-by-one cursor (caused by "typeahead race"
resulting in wrong mode; fixed later in this patch-series).
|