| Commit message (Collapse) | Author | Age |
|
|
|
|
|
|
| |
Problem: Passing cookie to a callback is clumsy.
Solution: Change function() to take arguments and return a partial.
https://github.com/vim/vim/commit/1735bc988c546cc962c5f94792815b4d7cb79710
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
vim-patch:7.4.1758
Problem: Triggering CursorHoldI when in CTRL-X mode causes problems.
Solution: Do not trigger CursorHoldI in CTRL-X mode. Add "!" flag to
feedkeys() (test with that didn't work though).
https://github.com/vim/vim/commit/245c41070c7f37d52be43cce0cb140bd3ade6c7e
vim-patch:7.4.1759
Problem: When using feedkeys() in a timer the inserted characters are not
used right away.
Solution: Break the wait loop when characters have been added to typebuf.
use this for testing CursorHoldI.
https://github.com/vim/vim/commit/40b1b5443c88fab77f1f7c6f9e801f7ffdb7e0a8
vim-patch:7.4.1692
Problem: feedkeys('i', 'x') gets stuck, waits for a character to be typed.
Solution: Behave like ":normal". (Yasuhiro Matsumoto)
|
|
|
|
| |
TODO: Also spec behavior of Press-Enter prompt for these API functions.
|
| |
|
|
|
|
| |
Clarify behavior of v:errmsg and the Error object.
|
|
|
|
| |
remove unused response_id parameter of handle_nvim_... helpers
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
| |
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'
|