aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/api
Commit message (Collapse)AuthorAge
* Implement API function to call functions #2979Sebastian Witte2015-07-19
| | | | | Remove static modifier from func_call Move MAX_FUNC_ARGS definnition from eval.c to eval.h
* api: return error when starting a slice out of bounds.Nick Hynes2015-07-11
|
* api: return empty array when slicing out of bounds.Nick Hynes2015-07-11
|
* ASan: Fix "null pointer passed for argument declared to never be null". #2925Florian Walch2015-06-30
| | | | | | | | Arguments passed to xmemdupz() are sometimes NULL, but xmemdupz() has FUNC_ATTR_NONNULL_ALL. Check pointers for NULL before calling xmemdupz(). Resolves #2533.
* api: vim_set_var() should return the old value #2899Justin M. Keyes2015-06-25
| | | | Closes #2816
* Remove char_u: ex_docmd:do_cmdline_cmd()Michael Reed2015-05-13
|
* msgpack: Allow notifications to execute commands.Scott Prager2015-04-13
| | | | | | | | | | 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 <>
* object_to_vim: Recognize buffers, windows, tabpages.Scott Prager2015-04-13
|
* memory: Add `free` wrapper and refactor project to use itThiago de Arruda2015-04-13
| | | | | | 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.
* buffer: Add WITH_BUFFER macro to simplify global buffer modificationThiago de Arruda2015-03-25
| | | | | | 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.
* api: Move switch_to_win_for_buf/restore_win_for_buf to api helpersThiago de Arruda2015-03-25
|
* Compiler warns about uninitialized object in vim_eval().oni-link2015-03-08
| | | | | In case of an evaluation error the returned Object is not initialized, so initialize it with OBJECT_INIT.
* illumos requires the use of limits.h for things like INT_MAX #2049Mike Zeller2015-02-26
|
* refactor: Remove term modules and termcap optionsThiago de Arruda2015-02-21
| | | | | | | | | | | | | | | - 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
* Enable -Wconversion: ui.c.Eliseo Martínez2015-02-18
| | | | | | | | | | | | | | | 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
* api: always return empty string as api type StringBjörn Linse2015-02-16
|
* vim-patch:7.4.601 #1950Justin M. Keyes2015-02-12
| | | | | | | 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
* api/vim.c: use FOR_ALL_* sugar #1963Justin M. Keyes2015-02-12
|
* Discard exceptions once they are converted to API errorsJake Kerr2015-02-12
| | | | Fixes: #1976
* api/vim: allow guis and tests to retrieve the entire color tableBjörn Linse2015-02-02
|
* api/*.c: Comment cleanupMichael Reed2015-01-26
| | | | | | - @justinmk: Clarify comments - Match verbiage used in other api/*.c files - Fix a few typos/missing words
* syntax: Use RGB/GUI attribute information for "abstract_ui"Thiago de Arruda2014-12-08
| | | | | | | | 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.
* api: Handle NULs and newlines in buffer_*_line.Scott Prager2014-12-06
|
* Wconversion: Fix warnings in file_search.c.Florian Walch2014-11-27
|
* Add Boolean argument escape_csi to vim_feedkeysRui Abreu Ferreira2014-11-27
| | | | | | | | | - 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
* Remove os/provider.{c,h} and all of its referencesThiago de Arruda2014-11-18
|
* api/window_set_cursor: make sure cursor line is visible.Björn Linse2014-11-01
| | | | | Previously, the cursor could be left outside the visible range if window is not the current window
* api: Add vim_input function and mark vim_feedkeys as deferredThiago de Arruda2014-10-29
| | | | | | | | 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).
* api: Implement vim_command_output functionThiago de Arruda2014-10-28
| | | | | This function can be used by API clients to execute a command and capture the output.
* msgpack-rpc: Improve logging of msgpack-rpc messagesThiago de Arruda2014-10-23
| | | | | | | | | | - 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.
* debug: Improve debugging of msgpack-rpc requestsThiago de Arruda2014-10-22
| | | | | | - Add the api_stringify function to display API objects - Use api_stringify to display request arguments and return values in DLOG statements.
* api: Add FUNC_ATTR_DEFERRED attribute to a number of functionsThiago de Arruda2014-10-21
| | | | | Any function that can directly mutate the screen or execute vimscript had the attribute applied.
* msgpack-rpc: Create subdirectory for msgpack-rpc modulesThiago de Arruda2014-10-21
| | | | | 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
* Use line-specific method names where possible to remove ambiguity and ↵Paul Jolly2014-10-01
| | | | possibility of future clashes
* FOR_ALL_WINDOWS_IN_TAB and local variables in FOR_ALL_TAB_WINDOWSWayne Rowcliffe2014-09-22
|
* api/msgpack-rpc: Improve error infrastructureThiago de Arruda2014-09-18
| | | | | | | | | | | | | | | | - 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
* api metadata: Allow typed container information in api functionsThiago de Arruda2014-09-12
| | | | | | | | 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.
* api/msgpack-rpc: Refactor metadata object constructionThiago de Arruda2014-09-12
| | | | | | | | | 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)
* api: Implement `vim_report_error` functionThiago de Arruda2014-09-12
| | | | | This function is used to report errors caused by remote functions called by channel_send_call
* api: initialize capacity in the array_dict_macroThiago de Arruda2014-09-12
|
* provider: Major refactorThiago de Arruda2014-09-12
| | | | | | | | | | | | | | | | | - 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'
* api/msgpack-rpc: Refactor msgpack_rpc_helpers.{c,h}Thiago de Arruda2014-09-12
| | | | | | - Move helpers that are specific to API types to api/private/helpers.{c,h} - Include headers with generated declarations - Delete unused macros
* api/msgpack-rpc: Remove Position type, using arrays instead.Thiago de Arruda2014-09-12
|
* api/msgpack-rpc: Parse type information from api/private/defs.hThiago de Arruda2014-09-12
| | | | | | | Enhance msgpack-gen.lua to extract custom api type codes from the ObjectType enum in api/private/defs.h. The type information is made available from the api metadata and clients can use to correctly serialize/deserialize these types using msgpack EXT type.
* api/msgpack-rpc: Remove specialized array typesThiago de Arruda2014-09-12
| | | | | | | | | | | | | | | | | 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.
* coverity/62620: fix uninitialized scalar variablePaul Burlumi2014-08-24
|
* Add API vim_replace_termcodesRui Abreu Ferreira2014-08-07
| | | | - Add API function to call replace_termcodes
* Refactor vim_feedkeys and f_feedkeysRui Abreu Ferreira2014-08-07
| | | | | | | | - 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
* Add helper cstr_as_string()Rui Abreu Ferreira2014-08-07
| | | | - Add nocopy helper alternative to cstr_to_string
* Return bool from find_win_for_buf #1023Wayne Rowcliffe2014-08-07
|