aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/api/vim.c
Commit message (Collapse)AuthorAge
...
* api: make nvim[_obj]_set_var and _del_var not return the old valueBjörn Linse2016-09-15
|
* refactor: eliminate misc2.cJustin M. Keyes2016-09-13
| | | | | | | | | | 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
* vim-patch:7.4.1535 (#5327)davix2016-09-11
| | | | | | 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
* vim-patch:7.4.1533 #5320Wei Huang2016-09-11
| | | | | | | | | | 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
* api: consistently use nvim_ prefix and update documentationBjörn Linse2016-08-31
|
* api: Allow blacklist functions that shouldn't be accesible from evalBjörn Linse2016-08-31
| | | | Blacklist deprecated functions and functions depending on channel_id
* api: unify buffer numbers and window ids with handlesBjörn Linse2016-08-31
| | | | also allow handle==0 meaning curbuf/curwin/curtab
* *: Fix errors from new linter checksZyX2016-06-11
|
* vim-patch:7.4.1151Michael Ennen2016-06-07
| | | | | | | Problem: Missing change to eval.c Solution: Also change feedkeys(). https://github.com/vim/vim/commit/5f8a14b9dea094b8bbab94cfc1e8da8e633fbc01
* api: refactor remote ui to use API dispatch generationBjörn Linse2016-05-27
|
* Merge pull request #4593 from ZyX-I/length-functionsJustin M. Keyes2016-04-26
|\ | | | | Make some function accept strings with length in place of just strings
| * keymap: Make replace_termcodes and friends accept length and cpo_flagsZyX2016-04-18
| | | | | | | | | | | | | | 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.
* | Implement tab-local working directory feature.HiPhish2016-04-20
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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: Add warnings about the returned value to \*del_var functionsZyX2016-04-18
| |
* | api/documentation: Add a warning that nil may mean v:nullZyX2016-04-18
| |
* | api: Replace set_var(name, NIL) with del_var(name)ZyX2016-04-18
|/
* api: vim_err_write: don't wait for return in the middle of a messageBjörn Linse2015-09-16
|
* msgpack: Replace FUNC_ATTR_DEFERRED by FUNC_ATTR_ASYNCThiago de Arruda2015-08-13
| | | | | | | | | | | 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.
* 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
* Remove char_u: ex_docmd:do_cmdline_cmd()Michael Reed2015-05-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.
* 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
* 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
|
* 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.
* 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: 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.
* 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
* 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
* 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: 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.
* 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
* provider: New module used to expose extension points for core servicesThiago de Arruda2014-07-17
| | | | | | | | | | | | | | | | | 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.
* api: Refactor write_msg to use separate out/err buffersThiago de Arruda2014-07-17
|
* move assert.h include out of vim.hBrandon Coleman2014-07-09
|
* move ascii.h include out of vim.hBrandon Coleman2014-07-09
|