aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/eval.c
Commit message (Collapse)AuthorAge
...
* viminfo: First version of ShaDa file dumpingZyX2015-10-08
| | | | | | | | | | | | | | | | | | | | What works: 1. ShaDa file dumping: header, registers, jump list, history, search patterns, substitute strings, variables. 2. ShaDa file reading: registers, global marks, variables. Most was not tested. TODO: 1. Merging. 2. Reading history, local marks, jump and buffer lists. 3. Documentation update. 4. Converting some data from &encoding. 5. Safer variant of dumping viminfo (dump to temporary file then rename). 6. Removing old viminfo code (currently masked with `#if 0` in a ShaDa file for reference).
* eval/string(): Share code between msgpackdump() and string()+:echoZyX2015-09-30
|
* eval/msgpackdump(): Use copyID for protecting against recursive inputZyX2015-09-30
| | | Should be faster then O(depth) iteration, but removes const qualifiers.
* eval/msgpackparse(): Fix crash by adding return at errorZyX2015-09-19
|
* eval: Fix `ex_delfunction` to use the `uf_refcount` field properlyThiago de Arruda2015-09-18
| | | | | | @4b98ea1e80bf changed how refcounts are handled internally to fit into job control semantics. Change the refcount check in `ex_delfunction` to consider this. Close #3000
* vim-patch:7.4.609oni-link2015-09-07
| | | | | | | | | Problem: For complicated list and dict use the garbage collector can run out of stack space. Solution: Use a stack of dicts and lists to be marked, thus making it iterative instead of recursive. (Ben Fritz) https://github.com/vim/vim/commit/2459a5ecaa43c8549ea53e9364253ff891676da5
* termopen(): remove `name` feature. #3181Mathieu Xhonneux2015-08-30
| | | | | | | | | | | Problem: Commands like `:e term://top` display `term://.//PID:(null)` instead of `term://.//PID:top`. Solution: Remove the optional `name` argument (it allowed ambiguous/potentially destructive cases, so it was problematic anyway). Closes #3113 Closes #2924
* Windows: avoid "uv_" naming conflicts. #3225Seth Jackson2015-08-27
|
* vim-patch:7.4.836 #3244Justin M. Keyes2015-08-26
| | | | | | | Problem: Accessing unitinialized memory. Solution: Add missing calls to init_tv(). (Dominique Pelle) https://github.com/vim/vim/commit/0a38dd29d6f65aa601162542a5ab0ba7f308fc8e
* Windows: Add has('win32'). #3223Rui Abreu Ferreira2015-08-23
| | | | References #810
* eval: Protect job callbacks from being redefinedThiago de Arruda2015-08-21
| | | | ref: #3188
* 7.4.813James McCoy2015-08-20
| | | | | | | | | | | patch 7.4.813 Problem: It is not possible to save and restore character search state. Solution: Add getcharsearch() and setcharsearch(). (James McCoy) https://github.com/vim/vim/releases/tag/v7.4.813 https://github.com/vim/vim/releases/tag/v7.4.826 Signed-off-by: James McCoy <vega.james@gmail.com>
* fs.c: implement os_file_is_readable()Justin M. Keyes2015-08-17
| | | | | | | Use access() because: - We already use it for os_file_is_writable() - Vim's old check_file_readonly() ends up using access() after all.
* eval: Fix jobwait() to process multiple jobs concurrentlyThiago de Arruda2015-08-13
| | | | | | | | | | | | | The new event processing architecture changed `jobwait()` semantics: Only one job is processed at time since process_wait only focuses on one queue. This fixes the problem with a few changes: - Allow the event queue polled by `process_wait` to be overriden by a new argument. - Allow the parent queue to be overriden with `queue_replace_parent` - Create a temporary queue that serves as the parent for all jobs passed to `jobwait()`
* rstream: Pass read count to read eventsThiago de Arruda2015-08-13
| | | | This is necessary to keep events in the same order received from the OS.
* process: Remove indeterminism that causes reordering of pty eventsoni-link2015-08-13
| | | | | | | | | | | | | | | | | | | | | Since pty events are queued, it is possible that the reads will be reordered. Example scenario: In the terminal you have output combined from stdout and stderr. A program generates output, first you have some output on stdout, then output on stderr, output on stdout, output on stderr,... The whole output should be interleaved from both streams. Each output generates a read_event and they are placed in the same queue. If the queue is processed, the first read_event will send the whole stdout output to the terminal (on_job_output() consumes the whole buffer). The next read_event is similar for stderr. The remaining read events do nothing because now both RBuffer are already empty. So the terminal would show first the stdout output and after that the stderr output. This commit fixes the problem by disabling stderr stream in pty processes. That's ok because they all represent the same stream(duplicate file descriptors), plus one stream is simpler to deal with.
* event: Refactor async event processingThiago de Arruda2015-08-13
| | | | | | | | | | - Improve the implementation of deferred/immediate events. - Use the new queue module to change how/when events are queued/processed by giving a private queue to each emitter. - Immediate events(which only exist to break uv_run recursion) are now represented in the `loop->fast_events` queue. - Events pushed to child queues are propagated to the event loop main queue and processed as K_EVENT keys.
* process: Pass loop reference during initializationThiago de Arruda2015-08-13
| | | | | Change the API so that it is passed to {uv,pty}_process_init instead of `process_spawn`.
* eval: Fixes to job controlThiago de Arruda2015-08-13
| | | | | - Ensure TerminalJobData is freed in case of error when spawning pty jobs - Check if job was stopped in every function that receives a job id.
* eval: Use proper refcount of msgpack type listsZyX2015-08-05
|
* Merge pull request #3034 from ZyX-I/msgpack-evalJustin M. Keyes2015-08-03
|\ | | | | msgpack viml functions for dump/restore
| * eval: Call list_append_allocated_string from list_append_stringZyX2015-08-02
| |
| * vim_to_msgpack: Silence -Werror=unitialized compiler errorZyX2015-08-02
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Compiler warning was found in [QuickBuild logs][1] from [this page][2]. GCC and clang on travis appear to be fine. Relevant log parts: Step Log (master>buildall>build-node?testNode=linux-64>build-and-run-tests>build-and-run-tests-parameterized?buildType=Release>configure-neovim-and-build-nvim) <…> 16:26:31,364 WARN - /home/quickbuild/buildagent/workspace/root/neovim/pull-requests-automated/src/nvim/eval.c: In function ‘f_msgpackdump’: 16:26:31,364 WARN - /home/quickbuild/buildagent/workspace/root/neovim/pull-requests-automated/src/nvim/eval.c:12371:26: error: ‘cur_tv’ may be used uninitialized in this function [-Werror=uninitialized] 16:26:31,364 WARN - /home/quickbuild/buildagent/workspace/root/neovim/pull-requests-automated/src/nvim/eval.c:12328:21: note: ‘cur_tv’ was declared here 16:26:31,938 WARN - cc1: all warnings being treated as errors [1]: http://neovim-qb.szakmeister.net/wicket/page?4-1.ILinkListener-content-buildTab-panel-errorContainer-steps-5-logLink [2]: http://neovim-qb.szakmeister.net/build/2099/overview
| * eval: Remove most of msgpack* functions limitationsZyX2015-08-02
| |
| * eval: Add msgpackparse and msgpackdump functionsZyX2015-08-02
| |
* | os/fs: Move mkdir_recurse from eval.c to os/fs.cZyX2015-07-26
| |
* | eval.c: Only inline float_op_wrapper on non-i386 #3072Wander Nauta2015-07-21
| | | | | | | | | | | | | | | | | | glibc on i386 seems to have an optimization that makes it harder to call some math functions indirectly from inside an inlined function, causing compile-time errors with some versions of gcc. This removes inlining on that platform. Closes #3071
* | 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
* | synIDattr(): true color awarenessMarco Hinz2015-07-18
| | | | | | | | | | | | | | | | In Vim, which doesn't true colors, synIDattr('Foo', 'fg') returns either ctermfg or guifg depending on whether vim or gvim is running. True colors naturally use GUI colors, so synIDattr() has to be adapted to return guifg, if a TUI with enabled true colors is used.
* | eval: Fix duplicate code in trig/math functions #3035Wander Nauta2015-07-18
| | | | | | | | | | | | | | | | | | | | The same error checking/recovery code was duplicated among the f_acos, f_asin, f_atan, f_ceil, f_cos, f_cosh, f_exp, f_floor, f_log, f_log10, f_round, f_sin, f_sinh, f_sqrt, f_tan, f_tanh and f_trunc functions. This commit moves that code into a wrapper function. `trunc` is not in C90, but it is in C99, which is what neovim targets, so we use it here.
* | Macro cleanup: FEAT_SHORTCUT, replace with WIN32Hettomei2015-07-17
| |
* | Macro cleanup: USE_FILE_CHOOSERHettomei2015-07-17
| |
* | Macro cleanup: FEAT_GUI_MOTIFHettomei2015-07-17
| |
* | Macro cleanup: FEAT_GUI_W32Hettomei2015-07-17
|/
* job: Replace by a better process abstraction layerThiago de Arruda2015-07-17
| | | | | | | | | | | | | - New libuv/pty process abstraction with simplified API and no globals. - Remove nvim/os/job*. Jobs are now a concept that apply only to programs spawned by vimscript job* functions. - Refactor shell.c/channel.c to use the new module, which brings a number of advantages: - Simplified API, less code - No slots in the user job table are used - Not possible to acidentally receive data from vimscript - Implement job table in eval.c, which is now a hash table with unilimited job slots and unique job ids.
* rstream/wstream: Unify structures and simplify APIThiago de Arruda2015-07-17
| | | | | | | | | | | | | - Simplify RStream/WStream API and make it more consistent with libuv. - Move into the event loop layer(event subdirectory) - Remove uv_helpers module. - Simplify job/process internal modules/API. - Unify RStream and WStream into a single structure. This is necessary because libuv streams can be readable and writable at the same time(and because the uv_helpers.c hack to associate multiple streams with libuv handle was removed) - Make struct definition public, allowing more flexible/simple memory management by users of the module. - Adapt channel/job modules to cope with the changes.
* event loop: New abstraction layer with refactored time/signal APIThiago de Arruda2015-07-17
| | | | | | | | | | - Add event loop abstraction module under src/nvim/event. The src/nvim/event/loop module replaces src/nvim/os/event - Remove direct dependency on libuv signal/timer API and use the new abstraction instead. - Replace all references to uv_default_loop() by &loop.uv, a new global variable that wraps libuv main event loop but allows the event loop functions to be reused in other contexts.
* vim-patch:7.4.688 #2941Felipe Morales2015-07-14
| | | | | | | | | | ``` updated for version 7.4.668 Problem: Can't use a glob pattern as a regexp pattern. Solution: Add glob2regpat(). (Christian Brabandt) ``` https://code.google.com/p/vim/source/detail?r=v7-4-668
* rbuffer: Reimplement as a ring buffer and decouple from rstreamThiago de Arruda2015-07-01
| | | | | | | | | | | | | | | | | | | | Extract the RBuffer class from rstream.c and reimplement it as a ring buffer, a more efficient version that doesn't need to relocate memory. The old rbuffer_read/rbuffer_write interfaces are kept for simple reading/writing, and the RBUFFER_UNTIL_{FULL,EMPTY} macros are introduced to hide wrapping logic when more control is required(such as passing the buffer pointer to a library function that writes directly to the pointer) Also add a basic infrastructure for writing helper C files that are only compiled in the unit test library, and use this to write unit tests for RBuffer which contains some macros that can't be accessed directly by luajit. Helped-by: oni-link <knil.ino@gmail.com> Reviewed-by: oni-link <knil.ino@gmail.com> Reviewed-by: Scott Prager <splinterofchaos@gmail.com> Reviewed-by: Justin M. Keyes <justinkz@gmail.com> Reviewed-by: Michael Reed <m.reed@mykolab.com>
* completion: Initialize v:completed_item #2839Shougo Matsushita2015-06-20
| | | | | v:completed_item should always be a dict (not empty string), even before the first completion.
* 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>
* Cleanup 'ttym[ouse]', FEAT_MOUSE, mouse_(dec|gpm|etc.)Michael Reed2015-05-18
| | | | | | Because of 3baba1e7bc6698e6bc9f1d37fce88b30d6274bc9, it's dead code. Helped-by: Justin M. Keyes <justinkz@gmail.com>
* vim-patch:7.4.597 #2658David Bürgin2015-05-17
| | | | | | | | | Problem: Cannot change the result of systemlist(). Solution: Initialize v_lock. (Yukihiro Nakadaira) https://github.com/vim/vim/commit/v7-4-597 See https://groups.google.com/d/msg/vim_dev/WXCfHMeqjfk/n2PjNwZ2bzIJ
* passing-by: get_vim_var_str: mark non-null returnJustin M. Keyes2015-05-17
|
* doc: v:servername, serverstart()Justin M. Keyes2015-05-17
|
* Remove char_u: message:smsg()Michael Reed2015-05-13
|
* coverity/62618: fixing "Wrong sizeof argument"Chris Hall2015-05-08
| | | | | | suspicious_sizeof: Passing argument 168UL /* sizeof (ufunc_T) */ * todo to function xmalloc and then casting the return value to ufunc_T ** is suspicious.
* Merge #2470: Remove char_u (5)Eliseo Martínez2015-05-07
|\ | | | | | | | | | | Reviewed-by: Scott Prager <splinterofchaos@gmail.com> Reviewed-by: Michael Reed <m.reed@mykolab.com> Reviewed-by: Eliseo Martínez <eliseomarmol@gmail.com>
| * Remove char_u: FullName_save()Mark Bainter2015-05-06
| |
| * Remove char_u: path_with_url()Mark Bainter2015-05-06
| |