| Commit message (Collapse) | Author | Age |
... | |
| | |
|
| | |
|
| |
| |
| |
| |
| | |
To get v:none back just rever this commit. This will not make json*() functions
compatible with Vim though.
|
| | |
|
|/ |
|
| |
|
|
|
|
|
|
|
| |
-1 is index past the end, and -2 is the index of the last element.
This eliminates the need for include_start/include_end.
Allow the handling of out-of-bounds to be configurable.
|
| |
|
| |
|
|
|
|
|
|
|
| |
Also fixes the error: when writing shada files existing history items may be
freed.
Warning: valgrind reports some memory leaks.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
What works:
1. ShaDa file dumping: header, registers, jump list, history, search patterns,
substitute strings, variables.
2. ShaDa file reading: registers, global marks, variables.
Most was not tested.
TODO:
1. Merging.
2. Reading history, local marks, jump and buffer lists.
3. Documentation update.
4. Converting some data from &encoding.
5. Safer variant of dumping viminfo (dump to temporary file then rename).
6. Removing old viminfo code (currently masked with `#if 0` in a ShaDa file for
reference).
|
|
|
|
|
| |
We want to switch include_start/end when the index is positive or
negative.
|
| |
|
|
|
|
|
|
|
|
| |
buffer_insert calls buffer_set_line_slice excluding the start
line number and including the end, but it should be the opposite.
Closes https://github.com/neovim/neovim/issues/3212
Closes https://github.com/neovim/python-client/issues/103
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
| |
|
| |
|
|
|
|
|
|
|
|
| |
Arguments passed to xmemdupz() are sometimes NULL, but xmemdupz() has
FUNC_ATTR_NONNULL_ALL. Check pointers for NULL before calling
xmemdupz().
Resolves #2533.
|
|
|
|
| |
Closes #2816
|
| |
|
|
|
|
|
|
|
|
|
|
| |
Consider: `let vim = rpcstart('nvim', ['--embed'])`
Allows `rpcnotify(vim, ...)` to work like an asynchronous
`rpcrequest(nvim, ...)`.
Helped-by: Michael Reed <m.reed@mykolab.com>
Helped-by: Justin M. Keyes <>
|
| |
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
| |
Most internal functions to modify buffers operate on the current buffer and
require temporary switchs. This macro is a temporary workaround until a cleaner
refactoring of the internal API is performed.
|
| |
|
|
|
|
|
| |
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
|
| |
|
|
|
|
| |
Fixes: #1976
|
| |
|
|
|
|
|
|
| |
- @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
|
| |
|
|
|
|
|
| |
Previously, the cursor could be left outside the visible range if window
is not the current window
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
|
|
|
|
| |
- Expose more logging control from the log.c module(get log stream and omit
newlines)
- Remove logging from the generated functions in msgpack-gen.lua
- Refactor channel.c/helpers.c to log every msgpack-rpc payload using
msgpack_object_print(a helper function from msgpack.h)
- Remove the api_stringify function, it was only useful for logging msgpack-rpc
which is now handled by msgpack_object_print.
|
|
|
|
|
|
| |
- Add the api_stringify function to display API objects
- Use api_stringify to display request arguments and return values in DLOG
statements.
|
|
|
|
|
| |
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
|
|
|
|
| |
possibility of future clashes
|
| |
|