aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/eval.h
Commit message (Collapse)AuthorAge
* Add v:exitingMarco Hinz2016-12-01
| | | | | | | | | Contains the exit value nvim will use. Before exiting, it is v:null. That way jobs or autocmds (in VimLeavePre or VimLeave) can check if Neovim is about to quit and with what exit value. Closes #4666.
* vim-patch:7.4.2071Michael Ennen2016-11-29
| | | | | | | Problem: The return value of type() is difficult to use. Solution: Define v:t_ constants. (Ken Takata) https://github.com/vim/vim/commit/f562e72df726c6191fa305e1c0a113f1cfb87f76
* vim-patch:7.4.1894James McCoy2016-11-15
| | | | | | | Problem: Cannot get the window ID for a mouse click. Solution: Add v:mouse_winid. https://github.com/vim/vim/commit/511972d810ea490955161ff5097ec2f57919ceaf
* vim-patch:7.4.1892James McCoy2016-11-15
| | | | | | | Problem: balloon eval only gets the window number, not the ID. Solution: Add v:beval_winid. https://github.com/vim/vim/commit/c9721bdc63378cc6123e775ffe43e9cba30322b3
* vim-patch:7.4.1658James McCoy2016-11-14
| | | | | | | | Problem: A plugin does not know when VimEnter autocommands were already triggered. Solution: Add the v:vim_did_enter variable. https://github.com/vim/vim/commit/1473551a4457d4920b235eeeb9f279e196ee7225
* eval/encode: Make sure that encoder can encode NULL variablesZyX2016-04-18
| | | | | | | | | Adds two undocumented v: variables: _null_list and _null_dict because I do not know a reproducible way to get such lists (though I think I heard about this) and dictionaries (do not remember hearing about them). NULL strings are obtained using $XXX_UNEXISTENT_VAR_XXX. Fixes crash in json_encode($XXX_UNEXISTENT_VAR_XXX). Other added tests worked fine before this commit.
* eval: Do not break when VimVarIndex and vimvars order mismatchesZyX2016-04-18
| | | | Also makes sure that compiler will error out when new name is longer then vv_filler.
* eval/encode: Fix writing strings starting with NL to listZyX2016-04-18
| | | | | | Error [found][1] by oni-link. [1]: https://github.com/neovim/neovim/pull/4131/files#r52239384
* *: Fix linter errorsZyX2016-04-18
|
* eval: Remove v:noneZyX2016-04-18
| | | | | To get v:none back just rever this commit. This will not make json*() functions compatible with Vim though.
* eval: Get rid of VV_LEN constantZyX2016-04-18
|
* eval: Add special variables v:false, v:null, v:noneZyX2016-04-18
|
* eval: Split out typval_T dumping functions to nvim/encode.cZyX2016-04-18
|
* eval: add v:event, which will contain data events want to propagate to their ↵Björn Linse2016-02-29
| | | | | | receivers. Add helper functions dict_clear and dict_set_keys_readonly.
* vim-patch:7.4.944watiko2016-01-10
| | | | | | | | | Problem: Writing tests for Vim script is hard. Solution: Add assertEqual(), assertFalse() and assertTrue() functions. Add the v:errors variable. Add the runtest script. Add a first new style test script. https://github.com/vim/vim/commit/43345546ae63710441f066648b8485fb545b3801
* eval: Use better error messages when failing to dump valuesZyX2016-01-04
| | | | | | | | | | | | | | | | | | | | | | | | Examples: let g:SR = [[]] call add(g:SR[0], g:SR) wshada " E952: Unable to dump variable g:SR: container references itself in index 0, index 0 let g:F = {'_TYPE': v:msgpack_types.map, '_VAL': [[{'abc': 1}, function("tr")]]} wshada " E951: Error while dumping variable g:F, key {'abc': 1} at index 0 from special map, key '': attempt to dump function reference " (no msgpack#string available) " E951: Error while dumping variable g:F, key {="abc": 1} at index 0 from special map, key '': attempt to dump function reference " (msgpack#string available) let g:F = {'_TYPE': v:msgpack_types.map, '_VAL': [[g:SR, function("tr")]]} wshada " E951: Error while dumping variable g:F, key [[[[{E724@0}]]]] at index 0 from special map, index 1: attempt to dump function reference call msgpackdump([g:SR]) " E952: Unable to dump msgpackdump() argument, index 0: container references itself in index 0, index 0 Not tested yet.
* vim-patch:7.4.786watiko2015-11-28
| | | | | | | Problem: It is not possible for a plugin to adjust to a changed setting. Solution: Add the OptionSet autocommand event. (Christian Brabandt) https://github.com/vim/vim/commit/537443018d41918639695a442c91b34ccec69fc3
* Add ":profile stop"Marco Hinz2015-11-10
| | | | This writes the logfile and stops profiling.
* *: Make ShaDa code use VimL values for additional_\* dataZyX2015-10-08
|
* Merge pull request #3034 from ZyX-I/msgpack-evalJustin M. Keyes2015-08-03
|\ | | | | msgpack viml functions for dump/restore
| * eval: Remove most of msgpack* functions limitationsZyX2015-08-02
| |
* | 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
* completion: Add v:completed_item feature #2563Shougo Matsushita2015-05-24
| | | | | | | Reviewed-by: Michael Reed <m.reed@mykolab.com> Reviewed-by: Luke Andrew <luke.github@la.id.au> Reviewed-by: Justin M. Keyes <justinkz@gmail.com> Reviewed-by: Florian Walch <florian@fwalch.com>
* eval: Refactor vimscript job control APIThiago de Arruda2015-03-29
| | | | | | | | | | - Remove JobActivity autocmd and v:job_data variable - Simplify `jobstart` to receive: - An argument vector - An optional dictionary which may contain any of the current `jobstart` options plus `on_stdout`, `on_stderr` and `on_exit` callbacks. - Refactor and add more job tests - Update documentation
* 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.
* profiling: implement on top of os_hrtime()Nicolas Hillegeer2014-07-16
| | | | | | | | | | | | | | | | | | | | | | | | | | Should be better than gettimeofday() since libuv uses higher resolution clocks on most UNIX platforms. Libuv also tries to use monotonic clocks, kernel bugs notwithstanding, which is another win over gettimeofday(). Necessary for Windows, which doesn't have gettimeofday(). In vanilla vim, Windows uses QueryPerformanceCounter, which is the correct primitive for this sort of things, but that was removed when slimming up the codebase. Libuv uses QueryPerformanceCounter to implement uv_hrtime() on Windows so the behaviour of vim profiling on Windows should now be the same. The behaviour on Linux should be different (better) though, libuv uses more accurate primitives than gettimeofday(). Other misc. changes: - Added function attributes where relevant (const, pure, ...) - Convert functions to receive scalars: Now that proftime_T is always a (uint64_t) scalar (and not a struct), it's clearer to convert the functions to receive it as such instead of a pointer to a scalar. - Extract profiling funcs to profile.c: make everything clearer and reduces the size of the "catch-all" ex_cmds2.c - Add profile.{c,h} to clint and -Wconv: - Don't use sprintf, use snprintf - Don't use long, use int16_t/int32_t/...
* move defines from vim.hBrandon Coleman2014-07-12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | buffer.h: buflist_getfile() flags buflist_new() flags buf_freeall() flags do_buffer() flags charset.h: chartab[] flags edit.h: in_cinkeys() flags change_indent() flags beginline() flags insertchar() flags nv_mousescroll() flags eval.c AUTOLOAD_CHAR eval.h: enum for vimvars[] ex_cmds.h: do_ecmd read_viminfo flags ex_cmds2.h: check_changed() flags do_source() flags ex_cmds_defs.h: BAD_* flags ex_docmd.h: VALID_PATH VALID_HEAD EXMODE_* do_cmdline() flags added include ex_getln.c *_ESC_CHARS definitions ex_getln.h: history table flags - used by add_to_history() fileio.h: readfile() flags event_T definition getchar.h: ins_typebuf() flags KEYLEN_* globals.h: NO_SCREEN NO_BUFFERS SEA_* defines current_SID flags hlf_T enum HL_FLAGS do_profiling() flags schar_T sattr_T indent.h: set_indent() flags macros.h: BINARY_FILE_IO flags mbyte.h: MB_BYTE2LEN* ENC_* memfile.h: mf_sync() flags misc1.h: open_line() flags message.h: do_dialog() flags vim_dialogyesno() flags DLG_BUTTON_* normal.h: find_ident_under_cursor() flags ops.h: do_put() flags operator ID's option.h: buf_copy_options() flags OPT_* flags os_unix.h: mch_nodetype() flags quickfix.h: skip_vimgrep_pat() flags regexp.h: vim_regcomp() flags values for reg_do_extmatch search.h: do_search() flags search_regcomp() flags findmatchlimit() flags syntax.h: HL_* flags HL_FOLD is used in buffer_defs.h but nvim compiles just fine with the defines in syntax.h tag.h: do_tag() flags find_tags() flags term.h: TBUFSZ flags MOUSE flags ui.h: jump_to_mouse() flags window.h: file_name_in_line() flags win_split() flags MIN_LINES MIN_COLUMNS Remove VimClipboard which should have been removed with PR #921.
* Add automatic generation of headersZyX2014-06-02
| | | | | | | | | | | | | | | | | - The 'stripdecls.py' script replaces declarations in all headers by includes to generated headers. `ag '#\s*if(?!ndef NEOVIM_).*((?!#\s*endif).*\n)*#ifdef INCLUDE_GENERATED'` was used for this. - Add and integrate gendeclarations.lua into the build system to generate the required includes. - Add -Wno-unused-function - Made a bunch of old-style definitions ANSI This adds a requirement: all type and structure definitions must be present before INCLUDE_GENERATED_DECLARATIONS-protected include. Warning: mch_expandpath (path.h.generated.h) was moved manually. So far it is the only exception.
* Introduce nvim namespace: Fix define guards.Eliseo Martínez2014-05-15
| | | | | | Change define guards from NEOVIM_XXX_H to NVIM_XXX_H: - Change header files. - Change clint correct guard name calculation.
* Introduce nvim namespace: Move files.Eliseo Martínez2014-05-15
Move files from src/ to src/nvim/. - src/nvim/ becomes the new root dir for nvim executable sources. - src/libnvim/ is planned to become root dir of the neovim library.