aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/eval.c
Commit message (Collapse)AuthorAge
...
| * vim-patch:7.4.1742Michael Ennen2016-10-23
| | | | | | | | | | | | | | Problem: strgetchar() does not work correctly. Solution: use mb_cptr2len(). Add a test. (Naruhiko Nishino) https://github.com/vim/vim/commit/5d18e0eca59ffbba22c7f7c91c9f99d672095728
| * vim-patch:7.4.1730Michael Ennen2016-10-23
| | | | | | | | | | | | | | Problem: It is not easy to get a character out of a string. Solution: Add strgetchar() and strcharpart(). https://github.com/vim/vim/commit/58de0e2dcc1f2d251b74892a06d71a14973f3187
* | CheckHealth: more checksJustin M. Keyes2016-10-25
| |
* | version: Allow has("nvim-x"), has("nvim-x.y")Justin M. Keyes2016-10-25
| |
* | version: has("nvim-1.2.3")Justin M. Keyes2016-10-25
|/ | | | Helped-by: Daniel Hahler <git@thequod.de>
* api: call multiple methods atomically (useful in async contexts)Björn Linse2016-10-22
| | | | remove unused response_id parameter of handle_nvim_... helpers
* events: allow event processing in getchar()Björn Linse2016-10-15
| | | | | | this is consistent with vim, and is necessary for plugins that implement their own input modes using "getchar()" and still want to do async event processing.
* Merge #5257 from jbradaric/vim-7.4.1893Justin M. Keyes2016-10-13
|\ | | | | vim-patch:7.4.{1893,1895}
| * eval: Exit early if argument is invalid.Jurica Bradaric2016-10-07
| |
| * vim-patch:7.4.1895Jurica Bradaric2016-10-07
| | | | | | | | | | | | | | | | Problem: Cannot use a window ID where a window number is expected. Solution: Add LOWEST_WIN_ID, so that the window ID can be used where a number is expected. https://github.com/vim/vim/commit/888ccac8902cee186fbd47e971881f6d9b19c068
| * vim-patch:7.4.1893Jurica Bradaric2016-10-07
| | | | | | | | | | | | | | Problem: Cannot easily get the window ID for a buffer. Solution: Add bufwinid(). https://github.com/vim/vim/commit/b3619a90eae2702553ff9494ecc4c9b20c13c224
* | Merge #5418 from Shougo/vim-7.4.2158Justin M. Keyes2016-10-13
|\ \ | | | | | | vim-patch: 7.4.2158, 2162, 2205
| * | vim-patch:7.4.2205Shougo Matsushita2016-10-01
| | | | | | | | | | | | | | | | | | | | | Problem: 'wildignore' always applies to getcompletion(). Solution: Add an option to use 'wildignore' or not. (Yegappan Lakshmanan) https://github.com/vim/vim/commit/e9d58a6459687a1228b5aa85bd7b31f8f1e528a8
| * | vim-patch:7.4.2162Shougo Matsushita2016-10-01
| | | | | | | | | | | | | | | | | | | | | | | | Problem: Result of getcompletion('', 'sign') depends on previous completion. Solution: Call set_context_in_sign_cmd(). (Dominique Pelle) https://github.com/vim/vim/commit/7522f6982197f83a5c0f6e9af07fb713934f824a
| * | vim-patch:7.4.2158Shougo Matsushita2016-10-01
| | | | | | | | | | | | | | | | | | | | | | | | Problem: Result of getcompletion('', 'cscope') depends on previous completion. (Christian Brabandt) Solution: Call set_context_in_cscope_cmd(). https://github.com/vim/vim/commit/b650b9878e9f0ac6bb1b61230095ad9ab3850a33
* | | eval/term_write(): Skip writes if stream was closed.Justin M. Keyes2016-10-12
| |/ |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | If the backing stream for a :terminal was closed (e.g. if the shell exits unexpectedly) there may be pending input on the loop which will be processed before the terminal close event (which is queued on the same loop). terminal_send checks term->closed but this does not reflect the state of the underlying streams. The terminal.c module in fact has no knowledge of the streams (this seems intentional: it is abstracted as TerminalOption.write_cb). The SIGCHLD handler (pty_process_unix.c) is executed immediately, and it triggers a stream teardown so Stream.closed=false (TerminalJobData.in.closed). When the pending writes are handled by eval.c:term_write, wstream_write() aborts because it sees the closed Stream. To avoid that, this commit checks Stream.closed in eval:term_write() before writing to the WStream. (As hinted above, we cannot do this in terminal:terminal_send() because that module cannot inspect the underlying streams.) References #5445 https://github.com/neovim/neovim/pull/5445#issuecomment-252529766
* | event/multiqueue.c: Rename "queue" to "multiqueue".Justin M. Keyes2016-10-02
|/ | | | | | | | | | | | | | `lib/queue.h` implements a basic queue. `event/queue.c` implements a specialized data structure on top of lib/queue.h; it is not a "normal" queue. Rename the specialized multi-level queue implemented in event/queue.c to "multiqueue", to avoid confusion when reading the code. Before this change one can eventually notice that "macros (uppercase symbols) are for the normal queue, lowercase operations are for the multi-level queue", but that is unnecessary friction for new developers (or existing developers just visiting this part of the codebase).
* vim-patch:7.4.1681Jurica Bradaric2016-09-28
| | | | | | | Problem: Coverity warns for fixed size buffer length (false positive). Solution: Add a check for the name length. https://github.com/vim/vim/commit/ef9d9b94a8803c405884bb6914ed745ede57c596
* vim-patch:7.4.1679Jurica Bradaric2016-09-28
| | | | | | | Problem: Coverity: copying value of v_lock without initializing it. Solution: Init v_lock in rettv_list_alloc() and rettv_dict_alloc(). https://github.com/vim/vim/commit/7d2a5796d39905a972e8f74af5f7b0a62e3de173
* vim-patch:7.4.1648Jurica Bradaric2016-09-28
| | | | | | | | Problem: Compiler has a problem copying a string into di_key[]. (Yegappan Lakshmanan) Solution: Add dictitem16_T. https://github.com/vim/vim/commit/bee6c0cf86a75faa2aa893f2c9db82fd944a89a5
* vim-patch:7.4.1670Jurica Bradaric2016-09-18
| | | | | | | Problem: Completion doesn't work well for a variable containing "vim/vim#". Solution: Recognize the "vim/vim#". (Watiko) https://github.com/vim/vim/commit/a32095fc8fdf5fe3d487c86d9cc54adb1236731e
* eval.c: Clean up spurious FAIL checks. (#5345)Justin M. Keyes2016-09-18
| | | rettv_list_alloc cannot fail.
* 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.1558 (#5333)Justin M. Keyes2016-09-13
| | | | | | Problem: It is not easy to find out what windows display a buffer. Solution: Add win_findbuf(). https://github.com/vim/vim/commit/9cdf86b86f5fdb5a45b682f336846f9d9a9c6f1f
* 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
* eval.c: Fix memory leak for detached pty joboni-link2016-09-08
|
* eval.c: Garbage collection frees dictionary before job cleanuponi-link2016-09-08
| | | | | | | | | | Removing a job too early from the joblist gives garbage collection the chance to also remove the job dictionary. Can be triggered with ASAN while waiting 'updatetime'ms (~5 seconds) before closing the terminal window opened with: nvim -u NONE +'call termopen("true",{})'
* getcwd(): Return empty string if CWD is invalid. #5292HiPhish2016-09-04
| | | | | | | | | | Closes #5291 Restores behaviour identical to Vim. If the user calls the VimScript function 'getcwd()' and the working directory cannot be found (for example because the directory has been deleted since the last time it was used) an empty string needs to be returned instead of throwing an error.
* api: fix leak when a api function is incorrectly called with a list.Björn Linse2016-08-31
| | | | This applies both to msgpack-rpc and eval.
* api: consistently use nvim_ prefix and update documentationBjörn Linse2016-08-31
|
* eval: use gperf to generate the hash of builtin functionsBjörn Linse2016-08-31
| | | | make api functions highlighted as builtins in vim.vim
* api: When calling get/set_lines from vimL, don't convert between "\n" and "\0".Björn Linse2016-08-31
|
* api: auto generate api function wrappers for vimlBjörn Linse2016-08-31
|
* eval: Use generated hash to look up function listZyX2016-08-31
| | | | | | | | | Problems: - Disables cross-compiling (alternative: keeps two hash implementations which need to be synchronized with each other). - Puts code-specific name literals into CMakeLists.txt. - Workaround for lua’s absence of bidirectional pipe communication is rather ugly.
* eval: Move VimL functions list to a lua fileZyX2016-08-31
| | | | | | Removes all kinds of problems with sorting, provides a ready-to-use function list representation for genvimvim.lua, does not require specifying function name twice (VimL function name (string) + f_ function name).
* eval: remove (char_u *) in constant get_dict_(string|number) parametersBjörn Linse2016-08-24
| | | | | Remove redundant item availibility checks when constructing complete items from a dict.
* job control: reuse common job code for rpc jobsBjörn Linse2016-08-20
| | | | This makes stderr and exit callbacks work for rpc jobs
* stream: set data together with callbackBjörn Linse2016-08-20
|
* vim-patch:7.4.2112 (#5175)Shougo2016-08-17
| | | | | | | | | Problem: getcompletion(.., 'dir') returns a match with trailing "*" when there are no matches. (Chdiza) Solution: Return an empty list when there are no matches. Add a trailing slash to directories. (Yegappan Lakshmanan) Add tests for no matches. (closes vim/vim#947) https://github.com/vim/vim/commit/b56195ed00a9a79aa6217cddbeedbc8cc7a5b6d8
* Restore ":browse oldfiles" behavior from VimJames McCoy2016-08-11
| | | | | | | | | | | | In 3b12bb225adda2aac40a55f7009cae05311b2a43, ":oldfiles" was taught to behave like Vim's ":browse oldfiles" if ":oldfiles!" was used. However, this conflates the use of ! for abandoning a modified buffer with choosing one file out of a list of oldfiles. Now that ":browse" is supported again, ":browse oldfiles" will allow the user to select an old file, while still complaining if that would cause a modified buffer to be abandoned. ":browse oldfiles!" will just abandon the buffer, as expected.
* timers: do not crash after processing events in the handlerBjörn Linse2016-08-10
|
* vim-patch:7.4.1557 (#5117)prollings2016-08-04
| | | | | | Problem: Windows cannot be identified. Solution: Add a unique window number to each window and functions to use it. https://github.com/vim/vim/commit/86edef664efccbfe685906c854b9cdd04e56f2d5
* Merge #4837 from justinmk/os_resolve_shortcutJustin M. Keyes2016-08-01
|\ | | | | os_resolve_shortcut
| * os_resolve_shortcut: initial port from Vim sourceJustin M. Keyes2016-07-30
| |
* | [RFC] vim-patch:7.4.2011, vim-patch:7.4.2012, vim-patch:7.4.2066 #5106Shougo Matsushita2016-08-01
|/ | | | | | | | | | | | | | | | | | | | | | | vim-patch:7.4.2011 Problem: It is not easy to get a list of command arguments. Solution: Add getcompletion(). (Yegappan Lakshmanan) https://github.com/vim/vim/commit/aa4d73235bf4deee167aa5314b89ae3d3db334b7 vim-patch:7.4.2012 Problem: Test for getcompletion() does not pass on all systems. Solution: Only test what is supported. https://github.com/vim/vim/commit/0d3e24be5686c0710aa3c6671e4c626d6cb21a5f vim-patch:7.4.2066 Problem: getcompletion() not well tested. Solution: Add more testing. https://github.com/vim/vim/commit/c1fb763184c8ae82300357867fa2070aa94366e9
* eval.c: rename capture() to execute() (#5132)Justin M. Keyes2016-07-31
|
* lintJames McCoy2016-07-23
|
* vim-patch:7.4.1703James McCoy2016-07-23
| | | | | | | Problem: Can't assert for not equal and not matching. Solution: Add assert_notmatch() and assert_notequal(). https://github.com/vim/vim/commit/b50e5f56861deb867478997397f7c784a7043233