| Commit message (Collapse) | Author | Age |
... | |
|
|
|
|
|
|
|
| |
- 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.
|
| |
|
| |
|
|
|
|
|
| |
Fire autocmd when channel opens or its info changes.
Add a way for API clients can describe themselves.
|
|\ |
|
| |
| |
| |
| |
| |
| | |
Make `:verbose set ...` show when an option was last modified by an
API client or Lua script/chunk. In the case of an API client, the
channel ID is displayed.
|
| |
| |
| |
| | |
Use the same pattern as nvim_call_function (_call_function).
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
- Return VimL errors instead of generic errors for:
- nvim_call_function
- nvim_call_dict_function
- Fix tests which were silently broken before this change.
This violates #6150 where we agreed not to translate API errors. But
that can be fixed later.
|
| | |
|
| |
| |
| |
| |
| |
| | |
The `internal` param is difficult to explain, and will rarely be
anything but `true`. To avoid it, use a hack: check if the resolved
dict value starts with "function(".
|
| |
| |
| |
| |
| | |
- Add test coverage for errors.
- Rename, rearrange.
|
| | |
|
|/ |
|
|
|
| |
ref https://github.com/neovim/python-client/pull/290
|
| |
|
|
|
|
|
| |
ref #7438
closes #4842
|