aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/api/vim.c
Commit message (Collapse)AuthorAge
...
* api: implement FUNC_API_SINCEBjörn Linse2017-03-15
|
* api: Rename dict_set_value to dict_set_varZyX2017-02-23
| | | | | | | | | | | | | | | | | | Reasonings: 1. It is not used for anything, but scope dictionaries currenly. So there is no need to generalize and split it into dict_set_var (which will contain some scope-dictionary-specific checks) and dict_set_value (which will work for any dictionary). 2. Check for key size is no longer valid for non-scope dictionaries: you *can* use empty keys there. In scope dictionaries also, but you actually are not supposed to store there anything, but variables. Note that actually one may still do let b:[''] = 1 and “bypass” check for variable name. It won’t change what `echo b:` will show, but it may affect code which iterates over scope dictionary keys and sets them to something (if there is such code).
* vim-patch:7.4.2090Michael Ennen2017-02-14
| | | | | | | | Problem: Using submatch() in a lambda passed to substitute() is verbose. Solution: Use a static list and pass it as an optional argument to the function. Fix memory leak. https://github.com/vim/vim/commit/df48fb456fb6bf63d94cad9b302ff01d8ee8d311
* refactor: Remove strncpy/STRNCPY. (#6008)Justin M. Keyes2017-01-26
| | | | | | | | | | | | | | | Closes #731 References #851 Note: This does not remove some intentional legacy usages of strncpy. - memcpy isn't equivalent because it doesn't check the string length of `src`, and doesn't zero-out the remainder of `dst`. - xstrlcpy isn't equivalent because it doesn't zero-out the remainder of `dst`. Some Vim logic depends on that (e.g. ex_append which calls vim_strnsave). Helped-by: Douglas Schneider <ds3@ualberta.ca> Helped-by: oni-link <knil.ino@gmail.com> Helped-by: James McCoy <jamessan@jamessan.com>
* Move apply_autocmd_dirchanged() to vim_chdir()Marco Hinz2017-01-13
|
* vim-patch:7.4.1559Michael Ennen2016-12-12
| | | | | | | 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, 7.4.1759, 7.4.1692 #5640Shougo Matsushita2016-12-09
| | | | | | | | | | | | | | | | | | | | | | | 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)
* test/api: Specify handling of VimL errors, v:errmsg.Justin M. Keyes2016-10-24
| | | | TODO: Also spec behavior of Press-Enter prompt for these API functions.
* test: system(): Avoid indeterminism.Justin M. Keyes2016-10-23
|
* api: documentationJustin M. Keyes2016-10-23
| | | | Clarify behavior of v:errmsg and the Error object.
* api: call multiple methods atomically (useful in async contexts)Björn Linse2016-10-22
| | | | remove unused response_id parameter of handle_nvim_... helpers
* api: Establish API naming convention. (#5344)Justin M. Keyes2016-09-17
| | | | | | | | | | | | | | | | | | | | | 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>
* 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
|