| Commit message (Collapse) | Author | Age |
... | |
| |
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
| |
Problem: The feedkeys test has a one second delay.
Solution: Avoid need_wait_return() to delay. (Hirohito Higashi)
https://github.com/vim/vim/commit/9e496854a9fe56699687a4f86003fad115b3b375
|
|
|
|
|
|
|
|
|
|
| |
Problem: Using feedkeys() with an empty string disregards 'x' option.
Solution: Make 'x' work with an empty string. (Thinca)
When integrating the patch to nvim, used same logic but different code
based on nvim codebase. New test passed.
https://github.com/vim/vim/commit/74c5bbf13435a7ab1e3461078bbcb1200f0451e1
|
| |
|
|
|
|
| |
Blacklist deprecated functions and functions depending on channel_id
|
|
|
|
| |
also allow handle==0 meaning curbuf/curwin/curtab
|
| |
|
|
|
|
|
|
|
| |
Problem: Missing change to eval.c
Solution: Also change feedkeys().
https://github.com/vim/vim/commit/5f8a14b9dea094b8bbab94cfc1e8da8e633fbc01
|
| |
|
|\
| |
| | |
Make some function accept strings with length in place of just strings
|
| |
| |
| |
| |
| |
| |
| | |
Reasons:
- One does not have to do `s[len] = NUL` to work with these functions if they do
not need to replace the whole string: thus `s` may be const.
- One does not have to save/restore p_cpo to work with them.
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
New ex commands: 'tcd', 'tchdir'
Changed Vimscript functions: 'haslocaldir', 'getcwd'
The ex-commands ':tcd' and ':tchdir' are the tab-local equivalents of
':lcd' and ':lchdir'. There are no new Vimscript functions introduced,
instead the functions 'haslocaldir' and 'getcwd' take in optional
arguments. See the documentation for details
Since there is now different levels of local directory a simple boolean
at source level is no longer sufficient; a new enumeration type is used
for the scope-level from now on.
The documentation has been accommodated for these new commands and
functional tests have been written to test the feature.
|
| | |
|
| | |
|
|/ |
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
| |
Remove static modifier from func_call
Move MAX_FUNC_ARGS definnition from eval.c to eval.h
|
| |
|
|
|
|
|
|
| |
We already use wrappers for allocation, the new `xfree` function is the
equivalent for deallocation and provides a way to fully replace the malloc
implementation used by Neovim.
|
|
|
|
|
| |
In case of an evaluation error the returned Object is not initialized,
so initialize it with OBJECT_INIT.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
- Removed term.c, term.h and term_defs.h
- Tests for T_* values were removed. screen.c was simplified as a
consequence(the best strategy for drawing is implemented in the UI layer)
- Redraw functions now call ui.c functions directly. Updates are flushed with
`ui_flush()`
- Removed all termcap options(they now return empty strings for compatibility)
- &term/&ttybuiltin options return a constant value(nvim)
- &t_Co is still available, but it mirrors t_colors directly
- Remove cursor tracking from screen.c and the `screen_start` function. Now the
UI is expected to maintain cursor state across any call, and reset it when
resized.
- Remove unused code
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Refactoring summary:
- ui_write(): len: int --> size_t
* parse_abstract_ui_codes(): len: int --> size_t
* string_convert(): lenp: int * --> size_t *
- string_convert_ext(): lenp : int * --> size_t *
unconvlenp: int * --> size_t *
* utf8len_tab_zero: char[] --> uint8_t[]
* iconv_string(): slen : int --> size_t
unconvlenp: int * --> size_t *
resultlenp: int * --> size_t *
- mch_print_text_out(): len: int --> size_t
* out_pos: int --> size_t
|
|
|
|
|
|
|
| |
Problem: It is not possible to have feedkeys() insert characters.
Solution: Add the 'i' flag.
https://code.google.com/p/vim/source/detail?r=v7-4-601
|
| |
|
| |
|
|
|
|
|
|
| |
- @justinmk: Clarify comments
- Match verbiage used in other api/*.c files
- Fix a few typos/missing words
|
|
|
|
|
|
|
|
| |
Instead of using classic cterm color numbers and attributes, treat "abstract_ui"
as a GUI: Pass rgb color numbers and gui attributes when the "highlight_set" UI
method is called. The terminal UI will have to translate RGB color information
to an appropriate color number, and the "term"/"cterm" :highlight keys will
eventually be deprecated.
|
| |
|
|
|
|
|
|
|
|
|
| |
- By default vim_feedkeys escaped all input for CSI/K_SPECIAL bytes
before using it. However since vim_replace_termcodes() also escapes
the input string chaining these functions together escapes input twice
- vim_feedkeys() now takes a third Boolean argument to enable/disable
escaping
- Breaks API compatibility
|
| |
|
|
|
|
|
|
|
|
| |
The `vim_feedkeys` must be deferred because it can potentially free the buffer
passed to `os_inchar`(which in turns calls `vim_feedkeys` indirectly).
The new `vim_input` function can be used to emulate user input(Since it does not
mess with the typeahead, it is safe to execute without deferring).
|
|
|
|
|
| |
This function can be used by API clients to execute a command and capture the
output.
|
|
|
|
|
| |
Any function that can directly mutate the screen or execute vimscript had the
attribute applied.
|
|
|
|
|
| |
Create the msgpack_rpc subdirectory and move all modules that deal with
msgpack-rpc to it. Also merge msgpack_rpc.c into msgpack_rpc/helpers.c
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
- 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.
|
|
|
|
|
|
|
|
|
| |
Instead of building all metadata from msgpack-gen.lua, we now merge the
generated part with manual information(such as types and features). The metadata
is accessible through the api method `vim_get_api_info`.
This was done to simplify the generator while also increasing flexibility(by
being able to add more metadata)
|
|
|
|
|
| |
This function is used to report errors caused by remote functions called by
channel_send_call
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
- Providers for features are now registered as a unit. For example, instead of
calling `register_provider("clipboard_get")` and
`register_provider("clipboard_set")`, clients call
`register_provider("clipboard")` and nvim will assume it implements all
methods of the "clipboard" feature
- Bootstrapping code was removed. With the `api_spawn` function exposed to
vimscript, it's no longer necessary and will be handled by plugins
distributed with nvim.
- Now the `has` function will return true if there's a live channel that
has registered as a provider for the feature.
- 'initpython'/'initclipboard' options were removed
- A new API function was exposed: `vim_discover_features` which returns an
object with information about pluggable features such as 'python' or
'clipboard'
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Specialized array types(BufferArray, WindowArray, etc) were added to the API for
two main reasons:
- msgpack used to lack a way of serializing appliaction-specific types and there
was no obvious way of making an API function accept/return arrays of custom
objects such as buffers(which are represented as integers, so clients didn't
have a way to distinguish from normal numbers)
- Let clients in statically-typed languages that support generics have a better
typed API
With msgpack 2.0 EXT type the first item is no longer a factor and this commit
starts by removing the specialized array types. The second item will be
addressed in the future by making the API metadata return extra useful
information for statically-typed languages.
|
|
|
|
| |
- Add API function to call replace_termcodes
|
|
|
|
|
|
|
|
| |
- To clean up the mix between feedkeys and replace_termcodes
the vim_feedkeys API function now does the same thing as the
vimscript feedkeys() function
- The original f_feedkeys() function now calls the vim_feedkeys()
function from the API
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Introducing the concept of providers: co-processes that talk with the editor
through the remote API and provide implementation for one or more core
services.
The `provider_register` function and it's API wrapper can be used by channels
that want to self-register as a service provider.
Some old builtin vim features will be re-implemented as providers. The
`provider_has_feature` function is used to check if a provider
implementing a certain feature is available(It will be called by the `has`
vimscript function to check for features in a vim-compatible way)
This implements the provider module without exposing any extension points, which
will be done in future commits.
|
| |
|
| |
|
| |
|