aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/eval.c
Commit message (Collapse)AuthorAge
...
* eval: Return an empty list from systemlist() when there's no outputThiago de Arruda2014-11-10
| | | | This is the behavior on vim's `systemlist()`.
* job: Let vimL jobsend() accept a list.Scott Prager2014-11-07
| | | | | | | | Use save_tv_as_string(), same as vimL system(). This also makes jobsend() more liberal in what it can accept. For example, `jobsend(j, 123)` is now valid. Closes #1176
* job: Make v:job_data[2] a list.Scott Prager2014-11-07
| | | | | | | | Factor out string_to_list() from f_system()'s implementation and use that to set job_data. This has the technical advantage of preserving NULs, and may be more convenient for users. Required for #1176.
* job: Read job data line-wise.Scott Prager2014-11-07
| | | | Only read up to the last newline in push_job_event().
* Remove long_u: eval: Replace with size_t.Eliseo Martínez2014-11-06
| | | | | Note: No effort is done on refactoring anything in eval module, as it will be eventually dropped.
* iconv: re-enableNicolas Hillegeer2014-11-06
| | | | | This seems to have been disabled in the transition from vim to neovim, re-enable it.
* event: Reintroduce the immediate event queueThiago de Arruda2014-11-02
| | | | | | | | | | | | | Commit @264e0d872c("Remove automatic event deferral") removed the immediate event queue because event deferral now had to be explicit. The problem is that while some events don't need to be deferred, they still can result in recursive `event_poll` calls, and recursion is not supported by libuv. Examples of those are msgpack-rpc requests while a server->client request is pending, or signals which can call `mch_exit`(and that will result in `uv_run` calls). To fix the problem, this reintroduces the immediate event queue for events that can potentially result in event loop recursion. The non-deferred events are still processed in `event_poll`, but only after `uv_run` returns.
* job: Let job_start callers to selectively ignore stdioThiago de Arruda2014-10-31
| | | | | | | | Passing NULL as the callback for stdout/stderr will result in job_start ignoring stdout/stderr, respectively. A 'writable' boolean argument was also added, and when false `job_start` will ignore stdin. Also, refactor os_system to allow passing NULL as the `output` argument.
* Merge pull request #1312 from GokuITA/coverity1289Justin M. Keyes2014-10-30
|\ | | | | coverity/71507: Unchecked return value (CHECKED_RETURN)
| * coverity/71507: Unchecked return value (CHECKED_RETURN)Victor Fonseca2014-10-20
| | | | | | | | Don't check for err->set since object_to_vim always return false when error is set
* | 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.
* | job/valgrind: Fix invalid reads/missing free.Scott Prager2014-10-28
| | | | | | | | | | | | | | | | The JobEvent structure may refer to a job after it has been freed. Apply @tarruda's patch to extract the job data before pushing the event. Also, fix the type, "data" -> "job", in on_job_exit() and free the job name in the last job event.
* | eval: Defer execution of JobActivity autocommandsThiago de Arruda2014-10-21
| | | | | | | | | | | | JobActivity autocommands run vimscript and must be executed on Nvim main loop. Since the previous commit removed automatic calls to `event_push` on RStream/Job callbacks, this adds it back, but in eval.c where job control is implemented.
* | 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
* rstream: Extract some RStream functionality to RBufferThiago de Arruda2014-10-18
| | | | | | | | RBuffer instances represent the internal buffer used by RStreams. This changes RStream constructor to receive RBuffer pointers and adds a set of RBuffer methods that expose the lower level buffer manipulation to consumers of the RStream API.
* Merge pull request #1208 from war1025/dev/remove_for_all_windowsJustin M. Keyes2014-10-03
|\ | | | | Remove FOR_ALL_WINDOWS and replace with FOR_ALL_WINDOWS_IN_TAB(curtab)
| * Replace FOR_ALL_WINDOWS with FOR_ALL_WINDOWS_IN_TAB(curtab)Wayne Rowcliffe2014-09-24
| |
* | eval: Fix `save_tv_as_string` to handle non-string typesThiago de Arruda2014-10-01
| |
* | Implement save_tv_as_string to assist in #1176.Scott Prager2014-09-30
| |
* | Fix system() output truncation bug.Scott Prager2014-09-30
| | | | | | | | Replace NULs with SOH to restore the old behaviour of get_cmd_output().
* | vim-patch:7.4.256Scott Prager2014-09-30
| | | | | | | | | | | | | | | | | | Problem: Using systemlist() may cause a crash and does not handle NUL characters properly. Solution: Increase the reference count, allocate memory by length. (Yasuhiro Matsumoto) https://code.google.com/p/vim/source/detail?r=v7-4-256
* | Return list from rettv_list_alloc.Scott Prager2014-09-30
| |
* | vim-patch:7.4.248Scott Prager2014-09-30
| | | | | | | | | | | | | | Problem: Cannot distinguish between NL and NUL in output of system(). Solution: Add systemlist(). (ZyX) https://code.google.com/p/vim/source/detail?r=v7-4-248
* | vim-patch:7.4.247Scott Prager2014-09-30
| | | | | | | | | | | | | | | | | | | | | | Problem: When passing input to system() there is no way to keep NUL and NL characters separate. Solution: Optionally use a list for the system() input. (ZyX) https://code.google.com/p/vim/source/detail?r=v7-4-247 Implement write_list_to_string() as well since write_list() only works on files.
* | vim-patch:7.4.411André Twupack2014-09-22
|/ | | | | | | Problem: "foo bar" sorts before "foo" with sort(). (John Little) Solution: Avoid putting quotes around strings before comparing them. https://code.google.com/p/vim/source/detail?r=v7-4-411
* FOR_ALL_WINDOWS_IN_TAB and local variables in FOR_ALL_TAB_WINDOWSWayne Rowcliffe2014-09-22
|
* FOR_ALL_TABS helperWayne Rowcliffe2014-09-22
|
* Merge pull request #1197 from Shougo/vim-patch-7.4.392Justin M. Keyes2014-09-20
|\ | | | | vim-patch:7.4.392
| * vim-patch:7.4.392Shougo Matsushita2014-09-18
| | | | | | | | | | | | | | Problem: Not easy to detect type of command line window. Solution: Add the getcmdwintype() function. (Jacob Niehus) https://code.google.com/p/vim/source/detail?r=v7-4-392
* | api/msgpack-rpc: Improve error infrastructureThiago de Arruda2014-09-18
|/ | | | | | | | | | | | | | | | - Add error type information to `Error` - Rename `set_api_error` to `api_set_error` for consistency with other api_* functions/macros. - Refactor the api_set_error macro to accept formatted strings and error types - Improve error messages - Wrap error messages with gettext macro - Refactor msgpack-rpc serialization to transform Error instances into [type, message] arrays - Add error type information to API metadata - Normalize nvim->client and client->nvim error handling(change channel_send_call to accept an Error pointer instead of the `errored` boolean pointer) - Use macro to initialize Error structures
* Merge pull request #953 from splinterofchaos/patch235-exepathJustin M. Keyes2014-09-17
|\ | | | | vim-patch:7.4.235
| * vim-patch:7.4.235Scott Prager2014-09-17
| | | | | | | | | | | | | | Problem: It is not easy to get the full path of a command. Solution: Add the exepath() function. https://code.google.com/p/vim/source/detail?r=5ab2946f7ce560985830fbc3c453bb0f7a01f385
* | vim-patch:7.4.313Damián Silvani2014-09-16
| | | | | | | | | | | | | | Problem: Changing the return value of getpos() causes an error. (Jie Zhu) Solution: Revert getpos() and add getcurpos(). https://code.google.com/p/vim/source/detail?r=332a5c2b2956d9b18d85268a724d01deea27ec83
* | vim-patch:7.4.310Damián Silvani2014-09-16
|/ | | | | | | Problem: getpos()/setpos() don't include curswant. Solution: Add a fifth number when getting/setting the cursor. https://code.google.com/p/vim/source/detail?r=ccac0aa34eeaf46dad4b831461a532fc3fe71096
* Merge pull request #1140 from atwupack/vp-7.4.341Justin M. Keyes2014-09-15
|\ | | | | vim-patch:7.4.341, 7.4.347, 7.4.351, 7.4.358
| * vim-patch:7.4.358André Twupack2014-09-13
| | | | | | | | | | | | | | | | Problem: Sort is not always stable. Solution: Add an index instead of relying on the pointer to remain the same. Idea by Jun Takimoto. https://code.google.com/p/vim/source/detail?r=v7-4-358
| * vim-patch:7.4.351André Twupack2014-09-13
| | | | | | | | | | | | | | Problem: sort() is not stable. Solution: When the items are identical, compare the pointers. https://code.google.com/p/vim/source/detail?r=v7-4-351
| * vim-patch:7.4.341André Twupack2014-09-13
| | | | | | | | | | | | | | Problem: sort() doesn't handle numbers well. Solution: Add an argument to specify sorting on numbers. (Christian Brabandt) https://code.google.com/p/vim/source/detail?r=adc4a84f72eb44dae657af713922a6e2c1f64ae3
* | eval.c: Rename has('neovim') feature to has('nvim')Thiago de Arruda2014-09-15
| | | | | | | | To follow the convention of 'nvim' for technical references
* | Merge pull request #1169 from splinterofchaos/arglistidJustin M. Keyes2014-09-15
|\ \ | | | | | | vim-patch:7.4.312
| * | vim-patch:7.4.312Scott Prager2014-09-13
| |/ | | | | | | | | | | | | Problem: Cannot figure out what argument list is being used for a window. Solution: Add the arglistid() function. (Marcin Szamotulski) https://code.google.com/p/vim/source/detail?r=v7-4-312
* | eval.c: Rename msgpack-rpc functions for consistencyThiago de Arruda2014-09-13
| |
* | eval.c: Rename jobwrite to jobsendThiago de Arruda2014-09-13
|/
* api: Implement `vim_report_error` functionThiago de Arruda2014-09-12
| | | | | This function is used to report errors caused by remote functions called by channel_send_call
* api/msgpack-rpc: Implement `channel_close` and expose to vimscriptThiago de Arruda2014-09-12
| | | | Simple function for closing a channel by id
* api/msgpack-rpc: Expose channel_from_job to vimscript as api_spawnThiago de Arruda2014-09-12
|
* api/msgpack-rpc: Refactor msgpack_rpc_helpers.{c,h}Thiago de Arruda2014-09-12
| | | | | | - Move helpers that are specific to API types to api/private/helpers.{c,h} - Include headers with generated declarations - Delete unused macros
* Merge pull request #1149 from splinterofchaos/vim-patch-7.4.278Justin M. Keyes2014-09-09
|\ | | | | vim-patch:7.4.278
| * vim-patch:7.4.278Scott Prager2014-09-09
| | | | | | | | | | | | | | Problem: list_remove() conflicts with function defined in Sun header file. Solution: Rename the function. (Richard Palo) https://code.google.com/p/vim/source/detail?r=v7-4-278
* | Additional FOR_ALL_WINDOWS usageWayne Rowcliffe2014-09-08
|/