aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/eval.c
Commit message (Collapse)AuthorAge
...
* Make "v:errmsg", "v:shell_error" and "v:this_session" distinctShougo Matsushita2018-07-23
|
* vim-patch: finish port of 8.0.0{654,663,667}Jan Edmund Lazo2018-07-07
| | | | | Fix ex_function so that :endfunction passes the test. Remove variables, added in 60c025267265ba4bfc2abd34ea02b13bd5c0e63f.
* vim-patch:8.0.0593: DRY: setting list/dict return value (#8639)Jan Edmund Lazo2018-06-30
| | | | | Problem: Duplication of code for adding a list or dict return value. Solution: Add rettv_dict_set() and rettv_list_set(). (Yegappan Lakshmanan) https://github.com/vim/vim/commit/45cf6e910c6d162775ca9d470fac4b6db844001f
* vim-patch:8.0.0642: writefile() continues after detecting an errorJan Edmund Lazo2018-06-24
| | | | | | | Problem: writefile() continues after detecting an error. Solution: Bail out as soon as an error is detected. (suggestions by Nikolai Pavlov, closes vim/vim#1476) https://github.com/vim/vim/commit/8cf91286ca46a501d24e4b7d631b193256782c88
* vim-patch:8.0.0548: saving the redo buffer only works one time (#8629)KunMing Xie2018-06-24
| | | | | | | Problem: Saving the redo buffer only works one time, resulting in the "." command not working well for a function call inside another function call. (Ingo Karkat) Solution: Save the redo buffer at every user function call. (closes vim/vim#1619) https://github.com/vim/vim/commit/d4863aa99e0527e9505c79cbeafc68a6832200bf
* vim-patch:8.0.0535: leak when exiting user function (#8574)KunMing Xie2018-06-24
| | | | | | Problem: Memory leak when exiting from within a user function. Solution: Clear the function call stack on exit. https://github.com/vim/vim/commit/6914c64ee58ce68f31fb8a8793293a9b3f2f6240
* *: Replace b_changedtick with new always-inline functionsZyX2018-06-22
| | | Ref #8474
* vim-patch:8.0.0542: getpos() can return a negative line number (#8580)Jan Edmund Lazo2018-06-19
| | | | | Problem: getpos() can return a negative line number. (haya14busa) Solution: Handle a zero topline and botline. (closes vim/vim#1613) https://github.com/vim/vim/commit/a1d5fa65bc7e8a548858e9c295a192b63dcd011b
* vim-patch:8.0.0547: extra line break in verbosefileJan Edmund Lazo2018-06-18
| | | | | | | Problem: Extra line break in verbosefile when using ":echomsg". (Ingo Karkat) Solution: Don't call msg_start(). (closes vim/vim#1618) https://github.com/vim/vim/commit/52604f2454e5369f861d3ce34764f74a0999c773
* vim-patch:8.0.0467: using g< after :for does not show the right outputJan Edmund Lazo2018-06-18
| | | | | | | Problem: Using g< after :for does not show the right output. (Marcin Szamotulski) Solution: Call msg_sb_eol() in :echomsg. https://github.com/vim/vim/commit/57002ad70c4c32f3afefec24994a974cf3eef3ad
* vim-patch:8.0.0625: shellescape() always escapes a newline (#8573)Jan Edmund Lazo2018-06-17
| | | | | | | Problem: shellescape() always escapes a newline, which does not work with some shells. (Harm te Hennepe) Solution: Only escape a newline when the "special" argument is non-zero. (Christian Brabandt, closes vim/vim#1590) https://github.com/vim/vim/commit/206155280def51160a9d81d983aed639015ffb44
* Merge #8526 from janlazo/vim-8.0.0451Justin M. Keyes2018-06-16
|\
| * vim-patch:8.0.0451: some macros are in lower caseJan Edmund Lazo2018-06-12
| | | | | | | | | | | | | | Problem: Some macros are in lower case. Solution: Make a few more macros upper case. Avoid lower case macros use an argument twice. https://github.com/vim/vim/commit/91acfffc1e6c0d8c2abfb186a0e79a5bf19c3f3f
* | screen: use UTF-8 representationBjörn Linse2018-06-13
|/ | | | | | | | | | | | | | Store text in ScreenLines as UTF-8, so it can be sent as-is to the UI layer. `utfc_char2bytes(off,buf)` is removed, as `ScreenLines[off]` now already contains this representation. To recover the codepoints that the screen arrays previously contained, use utfc_ptr2char (or utf_ptr2char to ignore composing chars). NB: This commit does NOT change how screen.c processes incoming UTF-8 data from buffers, cmdline, messages etc. Any algorithm that operates on UCS-4 (like arabic shaping, treatment of non-printable chars) is left unchanged for now.
* vim-patch:8.0.0466: still macros that should be all-caps (#8510)Jan Edmund Lazo2018-06-10
| | | | | Problem: There are still a few macros that should be all-caps. Solution: Make a few more macros all-caps. https://github.com/vim/vim/commit/8820b48654b62472821d9b155fe03ab7ac13a05c
* vim-patch:8.0.0452: some macros are in lower case (#8505)Jan Edmund Lazo2018-06-08
| | | | | Problem: Some macros are in lower case. Solution: Make a few more macros upper case. https://github.com/vim/vim/commit/1c46544412382db8b3203d6c78e550df885540bd
* Merge #8491 from janlazo/vim-8.0.0255Justin M. Keyes2018-06-07
|\
| * vim-patch:8.0.0256: missing changes to one file breaks testJan Edmund Lazo2018-06-07
| | | | | | | | | | | | Problem: Tests fail because some changes were not included. Solution: Add changes to evalfunc.c https://github.com/vim/vim/commit/3a29abcb6154d9f55ca8abd6d97e5822b97ac4b3
* | vim-patch:8.0.0254: error message of assert functions (#8488)Jan Edmund Lazo2018-06-07
|/ | | | | | Problem: When using an assert function one can either specify a message or get a message about what failed, not both. Solution: Concatenate the error with the message. https://github.com/vim/vim/commit/c7b831ca154537505f5a22d01335a86b2e9cb023
* cleanupJustin M. Keyes2018-05-18
|
* do not pass NULL to os_getenvJustin M. Keyes2018-05-18
| | | | closes #8393
* timer: make sure to free callback after the last timer due callbackBjörn Linse2018-05-13
| | | | | | | | fixes #6974 Before this change, the partial could be freed before the last due callback got invoked, which caused a use-after-free when the due callback called the partial.
* Merge #8329 'API: Make nvim_set_option() update `:verbose set …`'Justin M. Keyes2018-05-11
|\
| * lintb-r-o-c-k2018-05-10
| |
| * api: Make nvim_set_option() update `:verbose set ...`b-r-o-c-k2018-05-03
| | | | | | | | | | | | Make `:verbose set ...` show when an option was last modified by an API client or Lua script/chunk. In the case of an API client, the channel ID is displayed.
* | API: better way to capture abort-causing non-exception errorsJustin M. Keyes2018-05-09
| | | | | | | | | | | | | | | | This condition is not perfectly reliable: (did_emsg && force_abort && !current_exception) The more proper way to check for abort-causing non-exception errors is to set up `msg_list` using the "pattern" given by do_cmdline().
* | API: return non-generic VimL errorsJustin M. Keyes2018-05-09
|/ | | | | | | | | | - Return VimL errors instead of generic errors for: - nvim_call_function - nvim_call_dict_function - Fix tests which were silently broken before this change. This violates #6150 where we agreed not to translate API errors. But that can be fixed later.
* Merge #8218 'Fix errors reported by PVS'Justin M. Keyes2018-04-27
|\ | | | | closes #4983
| * eval: Silence PVS/V547: PVS cannot stand `!known_val` expressionsZyX2018-04-15
| |
| * eval: Fix PVS/V547: skipping is now done using eval0ZyX2018-04-15
| |
| * eval: Silence PVS/V547: E882 may be triggeredZyX2018-04-15
| | | | | | | | | | | | | | | | | | | | I failed to deduce why analyzer thinks E882 may not be triggered, though conditions for triggering it are strange: it would trigger E882 only in the single case “function returned non-number”. Cases “function thrown exception”, or “built-in sorter encountered error” will neither yield E882 nor stop sort()/uniq(). Note though that searching test code revealed that neither E702 nor E882 are not tested anywhere.
| * eval: Silence PVS/V614: use of potentially uninitialized pointerZyX2018-04-10
| | | | | | | | | | | | It is hard to say whether it actually is uninitialized, need to go deeper into regex code. Probably analyzer did not go that far as regmatch for sure would not be initialized up until calling NFA/DFA engine functions, which is to be done by pointer.
| * eval: Fix PVS/V560: unneded check for name_lenZyX2018-04-10
| | | | | | | | It is unsigned, zero length would already cause early return and length 1 is checked earlier in the same condition.
| * eval: Fix PVS/V547: ufunc_T is actually an incomplete typeZyX2018-04-10
| |
| * charset,*: Refactor transstr()ZyX2018-04-09
| |
* | Merge #6272 'stdpath()'Justin M. Keyes2018-04-15
|\ \
| * | eval: Add stdpath() method (#5297)Christian Höltje2018-03-29
| | | | | | | | | | | | | | | | | | Adds the :stdpath method for fetching XDG standard directories. Fixes #5297
* | | serverstop(): return FALSE for invalid addressJustin M. Keyes2018-04-11
| |/ |/|
* | timer_pause: stop the timer resource (#8199)Utkarsh Maheshwari2018-03-30
|/ | | | | If the timer isn't stopped, it still emits events which consume some CPU. Fix #8188
* refactor/rename: path_is_absolute()Justin M. Keyes2018-03-24
|
* refactor: eliminate `autocmd_fname_full` globalJustin M. Keyes2018-03-24
| | | | | | | | It's a micro-optimization; check path_is_absolute_path(autocmd_fname) instead. The main optimization (which is still in place) afforded by Vim 7.2.021 was to avoid resolving <afile> when it is not needed.
* provider/RPC: apply_autocmds_group(): fix double-freeJustin M. Keyes2018-03-24
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | During provider dispatch, eval_call_provider() saves global state--including pointers, such as `autocmd_fname`--into `provider_caller_scope` which is later restored by f_rpcrequest(). But `autocmd_fname` is special-cased in eval_vars(), for performance (see Vim patch 7.2.021; this is also the singular purpose of the `autocmd_fname_full` global. Yay!) If eval_vars() frees `autocmd_fname` then its provider-RPC-scoped alias becomes a problem. Solution: Don't free autocmd_fname in eval_vars(), just copy into it. closes #5245 closes #5617 Reference ------------------------------------------------------------------------ Vim patch 7.2.021 https://github.com/vim/vim/commit/f6dad43c98f47da1ff9d8c99b320fc3674f83c63 Problem: When executing autocommands getting the full file name may be slow. (David Kotchan) Solution: Postpone calling FullName_save() until autocmd_fname is used. vim_dev discussion (2008): "Problem with CursorMoved AutoCommand when Editing Files on a Remote WIndows Share" https://groups.google.com/d/msg/vim_dev/kj95weZa_eE/GTgj4aq5sIgJ
* log/channels: Formatting. Also log loopback channel. #8146Justin M. Keyes2018-03-18
|
* Merge #8084 'build/win: support MSVC'Justin M. Keyes2018-03-08
|\
| * build/msvc: Fix errors caused by compiler intrinsicsb-r-o-c-k2018-03-04
| |
* | vim-patch:8.0.0513: fix getting name of cleared highlight group (#8103)KunMing Xie2018-03-08
|/ | | | | | | Problem: Getting name of cleared highlight group is wrong. (Matt Wozniski) Solution: Only skip over cleared names for completion. (closes vim/vim#1592) Also fix that a cleared group causes duplicate completions. https://github.com/vim/vim/commit/c96272e30e2b81e5e0c8418f09d9db4e2fcd5d73
* shell: use msg_outtrans_len_attr for :!cmdBjörn Linse2018-02-05
| | | | fixes #7830 and #7788
* provider: make has('ruby') only return 1 if gem is installed (#7944)Marco Hinz2018-02-01
|
* win: has("wsl") on Windows Subsystem for Linux #7330Mahmoud Al-Qudsi2018-01-30
| | | | | | | | | | | | | Per CMAKE docs, CMAKE_HOST_SYSTEM_VERSION is the result of `uname -r`: https://cmake.org/cmake/help/v3.4/variable/CMAKE_HOST_SYSTEM_VERSION.html?highlight=uname A numeric version string for the system. On systems that support uname, this variable is set to the output of uname -r. On other systems this is set to major-minor version numbers. On Windows it is something like "6.1", so it won't match ".*-Microsoft". Closes #7329
* eval: save_tv_as_string: Correctly handle an empty stringJames McCoy2018-01-23
| | | | | | | | When tv_get_string_chk returns a non-NULL value, we have a valid string. Propagating an error state (*len = -1, NULL return) for an empty string is invalid. Closes #6554