| Commit message (Collapse) | Author | Age |
... | |
| |
|
|
|
|
| |
Co-Author: Dongdong Zhou <dzhou121@gmail.com>
|
|
|
|
|
|
|
|
|
| |
There is no need to call update_screen() directly in an API function,
mode input processing invokes update_screen() as needed. And if the API
call is done in a context where redraw is disabled, then redraw is
disabled for a reason. A lot of API functions are of equal semantical
strength (nvim_call_function and nvim_execute_lua can also do whatever,
nvim_command is not special), this inconsistency has no purpose.
|
|
|
|
| |
closes #9100
|
|
|
|
| |
This one behaves correctly eg in the presence of unicode
|
|
|
| |
Fixes #8591
|
|
|
|
|
|
| |
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.
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
| |
Also re-word some error messages:
- "Key does not exist: %s"
- "Invalid channel: %<PRIu64>"
- "Request array size must be 4 (request) or 3 (notification)"
- "String cannot contain newlines"
References #6150
|
| |
|
| |
|
|
|
|
| |
Closes #5984
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Reasonings:
1. It is not used for anything, but scope dictionaries currenly. So there is no
need to generalize and split it into dict_set_var (which will contain some
scope-dictionary-specific checks) and dict_set_value (which will work for any
dictionary).
2. Check for key size is no longer valid for non-scope dictionaries: you *can*
use empty keys there. In scope dictionaries also, but you actually are not
supposed to store there anything, but variables.
Note that actually one may still do
let b:[''] = 1
and “bypass” check for variable name. It won’t change what `echo b:` will show,
but it may affect code which iterates over scope dictionary keys and sets them
to something (if there is such code).
|
|
|
|
|
|
|
| |
rv is int64_t but its address is being passed into win_get_tabwin as if
it were an int. This breaks on big-endian systems, since win_get_tabwin
will store the data to the "wrong" half of the int64_t, thus returning
invalid data out of nvim_win_get_number.
|
| |
|
|
|
|
| |
Clarify behavior of v:errmsg and the Error object.
|
|
|
|
|
|
|
|
|
|
|
| |
In order to provide better compatibility with the classic bindings, the
API needs to provide the ability to query the number (really index) of
the window/tabpage.
This is needed for neovim/python-client#87, as discussed in
neovim/neovim#1898.
Signed-off-by: James McCoy <jamessan@jamessan.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
old name: new name:
--------------------------------------------------
nvim_name_to_color nvim_get_color_by_name
nvim_get_current_buffer nvim_get_current_buf
nvim_get_current_window nvim_get_current_win
nvim_get_buffers nvim_list_bufs
nvim_get_tabpages nvim_list_tabpages
nvim_get_windows nvim_list_wins
nvim_set_current_buffer nvim_set_current_buf
nvim_set_current_window nvim_set_current_win
nvim_change_directory nvim_set_current_dir
nvim_tabpage_get_window nvim_tabpage_get_win
nvim_tabpage_get_windows nvim_tabpage_list_wins
nvim_win_get_buffer nvim_win_get_buf
nvim_report_error nvim_err_writeln
Helped-by: Björn Linse <bjorn.linse@gmail.com>
Helped-by: ZyX <kp-pav@yandex.ru>
Helped-by: James McCoy <jamessan@jamessan.com>
|
| |
|
|
|
|
|
|
|
|
|
|
| |
move `call_shell` to misc1.c
Move some fns to state.c
Move some fns to option.c
Move some fns to memline.c
Move `vim_chdir*` fns to file_search.c
Move some fns to new module, bytes.c
Move some fns to fileio.c
|
| |
|
|
|
|
| |
Originally there were 128 new errors, so I thought this is a good idea to fix
all of them. Of course, this commit also fixes many suppressed errors.
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
API functions exposed via msgpack-rpc now fall into two categories:
- async functions, which are executed as soon as the request is parsed
- sync functions, which are invoked in nvim main loop when processing the
`K_EVENT special key
Only a few functions which can be safely executed in any context are marked as
async.
|
| |
|
|
|
|
|
|
| |
- @justinmk: Clarify comments
- Match verbiage used in other api/*.c files
- Fix a few typos/missing words
|
|
|
|
|
| |
Previously, the cursor could be left outside the visible range if window
is not the current window
|
|
|
|
|
| |
Any function that can directly mutate the screen or execute vimscript had the
attribute applied.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
- Add error type information to `Error`
- Rename `set_api_error` to `api_set_error` for consistency with other api_*
functions/macros.
- Refactor the api_set_error macro to accept formatted strings and error types
- Improve error messages
- Wrap error messages with gettext macro
- Refactor msgpack-rpc serialization to transform Error instances into [type,
message] arrays
- Add error type information to API metadata
- Normalize nvim->client and client->nvim error handling(change
channel_send_call to accept an Error pointer instead of the `errored` boolean
pointer)
- Use macro to initialize Error structures
|
|
|
|
|
|
|
|
| |
Adapt gendeclarations.lua/msgpack-gen.lua to allow the `ArrayOf(...)` and
`DictionaryOf(...)` types in function headers. These are simple macros that
expand to Array and Dictionary respectively, but the information is kept in the
metadata object, which is useful for building clients in statically typed
languages.
|
| |
|
| |
|
|
|
|
|
| |
They were renamed to find_{buffer,window,tabpage}_by_handle to avoid conflicts
with existing functions of the same name.
|
|
|
|
| |
Uses a perl script to move it (scripts/movedocs.pl)
|
|
|
|
|
| |
fix #778
thanks @genisaguilar
|
| |
|
|
|
|
|
|
|
| |
- Define specialized arrays for each remote object type
- Implement msgpack_rpc functions for dealing with the new types
- Refactor all functions dealing with buffers, windows and tabpages to
return/accept handles instead of list indexes.
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
|
|
| |
Instead of exposing native C types to a public API that can be consumed by other
platforms, we are now using the following translation:
int64_t -> Integer
double -> Float
bool -> Boolean
|
|
|
|
| |
Prepend 'nvim/' in all project-local (non-system) includes.
|
|
|
|
|
|
|
|
|
|
| |
Problem: Some newly introduced files used includes relative to the
current file, both of the form `include "../XXX.h"` and
`include "XXX.h"`.
Preferred form is relative to include root (src/ in our case).
Solution: Change includes to preferred form.
Note: This is also done to ease next commit (prepend 'nvim/ to all
project-local includes).
|
|
Move files from src/ to src/nvim/.
- src/nvim/ becomes the new root dir for nvim executable sources.
- src/libnvim/ is planned to become root dir of the neovim library.
|