| Commit message (Collapse) | Author | Age |
... | |
|
|
|
|
|
|
| |
- 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).
|
| |
|
|
|
| |
Fixes #10838
|
|
|
| |
Fixes https://github.com/neovim/neovim/issues/10829.
|
|
|
|
|
|
| |
Only "API nvim_parse_expression works with &opt" is flaky, but easier to
skip all of "API nvim_parse_expression".
Ref: https://github.com/neovim/neovim/issues/10241
|
| |
|
|
|
|
|
|
|
|
|
|
| |
Rationale: the purpose of nvim_execute_lua is to simply call lua code with lua
values. If a lua function expects a floating point value, it should be enough
to specify a float as argument to nvim_execute_lua.
However, make sure to preserve the existing roundtripping behavior of
API values when using `vim.api` functions. This is covered by existing
lua/api_spec.lua tests.
|
|
|
|
|
|
|
| |
Otherwise vim will think that ml_append() needs to "enter" the buffer,
which emits unexpected autocommands.
ref https://github.com/vim-airline/vim-airline/issues/1930
|
| |
|
|
|
|
|
|
| |
The test.functional.helpers and test.unit.helpers modules now include
all of the public functions from test.helpers, so there is no need to
separately require('test.helpers').
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Before now, Nvim always degrades UI capabilities to the lowest-common
denominator. For example, if any connected UI has `ext_messages=false`
then `ext_messages=true` requested by any other connected UI is ignored.
Now `nvim_ui_attach()` supports `override=true`, which flips the
behavior: if any UI requests an `ext_*` UI capability then the
capability is enabled (and the legacy behavior is disabled).
Legacy UIs will be broken while a `override=true` UI is connected, but
it's useful for debugging: you can type into the TUI and observe the UI
events from another connected (UI) client. And the legacy UI will
"recover" after the `override=true` UI disconnects.
Example using pynvim:
>>> n.ui_attach(2048, 2048, rgb=True, override=True, ext_multigrid=True, ext_messages=True, ext_popupmenu=True)
>>> while True: n.next_message();
|
|
|
|
|
| |
We already do this for _invalid_ async requests #9300.
Now we also do it for failed invocation of valid requests.
|
|
|
|
|
|
|
|
| |
CA_COMMAND_BUSY in nv_event() was carried over from Vim nv_cursorhold()
(ref: e5165bae1139). It prevents :startinsert from working during a RPC
call, so remove it.
Helped-by: glacambre <me@r4>
closes #7254
|
| |
|
|
|
|
|
| |
Creating a scratch buffer is a chore/ritual, and would be more
useful/common if formally exposed.
|
|
|
|
| |
Co-Author: Dongdong Zhou <dzhou121@gmail.com>
|
|
|
|
|
|
|
|
|
|
|
|
| |
Loading existing files into a buffer is non-trivial and requires a window.
Creating an unnamed emtpy buffer is trivial and safe though, thus worth a
special case.
Change nvim_buf_set_option to use aucmd_prepbuf. This is necessary
to allow some options to be set on a not yet displayed buffer, such
as 'buftype' option.
vim-patch:7.4.1858: Add BLN_NEW to enforce buflist_new creating new buffer
|
|
|
|
|
| |
But add an escape hatch needed for external TUI, so it still can use
terminal emulator defaults.
|
| |
|
| |
|
|
|
|
| |
make Screen explicitly tied to its session
|
|
|
|
|
| |
Previously, nvim sent a response with invalid request id (UINT64_MAX).
In functionaltests, catch unexpected error notifications in after_each().
|
|
|
|
|
|
|
|
|
|
| |
- develop.txt is for design/guidelines; architecture/concepts should
live elsewhere (currently src/nvim/README.md)
- move dev-jargon to intro.txt
- replace https://neovim.io/community (deprecated) with
https://neovim.io/#chat
- <Cmd> avoids CmdlineEnter/Leave
https://github.com/vim/vim/issues/2889
|
|
|
|
|
|
|
|
|
| |
Namespaces is a lightweight concept that should be used to group
objects for purposes of bulk operations and introspection. This is
initially used for highlights and virtual text in buffers, and is
planned to also be used for extended marks. There is no plan use them
for privileges or isolation, neither to introduce nanespace-level
options.
|
| |
|
| |
|
|
|
|
|
|
|
| |
expect_err() matches against a pattern. Terminate the pattern with "$"
to check against buffer overrun.
ref #8931
|
|
|
|
|
|
|
| |
msgpack_rpc_to_object (called by handle_request .. msgpack_rpc_to_array)
always NUL-terminates API Strings.
But handle_request .. msgpack_rpc_get_handler_for operates on a raw
msgpack_object, before preparation.
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Add ext_newgrid and ext_hlstate extensions. These use predefined
highlights and line-segment based updates, for efficiency and
simplicity.. The ext_hlstate extension in addition allows semantic
identification of builtin and syntax highlights.
Reimplement the old char-based updates in the remote UI layer, for
compatibility. For the moment, this is still the default. The bulitin
TUI uses the new line-based protocol.
cmdline uses curwin cursor position when ext_cmdline is active.
|
| |
|
| |
|