Commit Graph

1890 Commits

Author SHA1 Message Date
Stefan Hoffmann
741cb5be08 unittest: fix handling of pragma pack in cimport 2014-10-30 19:05:39 +01:00
Justin M. Keyes
34ec5a9f81 Merge pull request #1361 from splinterofchaos/silent-system
Mark patch 427 as included.
2014-10-30 11:06:28 -04:00
Scott Prager
e94c9db43d Mark patch 427 as included. (#1357) 2014-10-30 09:57:04 -04:00
Justin M. Keyes
181e652ee1 Merge pull request #1312 from GokuITA/coverity1289
coverity/71507: Unchecked return value (CHECKED_RETURN)
2014-10-30 02:12:28 -04:00
Kartik Agaram
a62998ea08 CONTRIBUTING.md: more guidance on cosmetic changes #1346 2014-10-30 05:58:40 +00:00
Justin M. Keyes
6b47e13ee0 fs.c: add FUNC_ATTR_NONNULL_ALL to all functions 2014-10-30 05:17:12 +00:00
Thiago de Arruda
713c3ae5ae Merge PR #1357 'Fixes to input/job modules' 2014-10-29 23:43:35 -03:00
Thiago de Arruda
9e41dd07e4 travis: Make sure valgrind report is shown on test failures 2014-10-29 23:33:10 -03:00
Thiago de Arruda
3800b24c5a api: Add vim_input function and mark vim_feedkeys as deferred
The `vim_feedkeys` must be deferred because it can potentially free the buffer
passed to `os_inchar`(which in turns calls `vim_feedkeys` indirectly).

The new `vim_input` function can be used to emulate user input(Since it does not
mess with the typeahead, it is safe to execute without deferring).
2014-10-29 23:33:10 -03:00
Thiago de Arruda
94527245a5 input: Fix sizes of input/read buffers
Input buffer must be bigger than read buffer to ensure it always has space for
converted data.
2014-10-29 23:32:55 -03:00
Thiago de Arruda
4fd9ee4a6b input/job: process ctrl+c and do conversion in the read callback
- Extract `process_interrupts` out of `convert_input`
- Instead of waiting for os_breakcheck/os_inchar calls, call `convert_input`
  and `process_interrupts` directly from the read callback in input.c.
- Remove the `settmode` calls from `job_wait`. Now that interrupts are
  processed in the event loop, there's no need to set the terminal to cooked
  which introduces other problems(ref 7.4.427)
2014-10-29 23:08:43 -03:00
Justin M. Keyes
49d5ed5591 fix #1027: :wundo segfault in new, non-empty buffer 2014-10-26 20:03:02 +00:00
Justin M. Keyes
3fc542b45b Merge pull request #1347 from splinterofchaos/433
vim-patch:7.4.433
2014-10-29 12:09:02 -04:00
Justin M. Keyes
72c54db443 Merge #1342 "signs bugfix" 2014-10-28 23:14:15 -04:00
Kartik K. Agaram
250298884b fix 'sign unplace id'
Since the introduction of the FOR_ALL_BUFFERS macro, 'sign unplace id'
without a buffer was only removing the sign from the first buffer rather
than all buffers, as described in the documentation.

  :help sign-unplace

--

modeline discussion: https://github.com/akkartik/neovim/commit/7863c247db#commitcomment-8342590
2014-10-28 23:12:41 -04:00
Thiago de Arruda
94f59fc9be api: Implement vim_command_output function
This function can be used by API clients to execute a command and capture the
output.
2014-10-28 23:12:41 -04:00
Thiago de Arruda
c28adf15e6 Merge PR #1350 'valgrind/jobs: Fix invalid reads.' 2014-10-28 14:11:32 -03:00
Scott Prager
7203796c54 test/job: Implement some basic jobs tests. 2014-10-28 14:09:28 -03:00
Scott Prager
860b6f6f05 test/shell: Add failure tests for system(). 2014-10-28 14:09:28 -03:00
Scott Prager
dd4263a0c8 job_start: Do not close in/out/err on error.
The streams job_close_*() reference have not been initialized by the
time we call uv_spawn() and libuv closes these pipes for us when spawn()
fails.
2014-10-28 14:09:28 -03:00
Scott Prager
d10e83fec2 job/valgrind: Fix invalid reads/missing free.
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.
2014-10-28 14:09:28 -03:00
Thiago de Arruda
7797991ba5 Merge PR #1354 'Fixes to channel.c, input.c and helpers.lua' 2014-10-28 11:04:55 -03:00
Thiago de Arruda
c95bc3349b input: Fix conversion error in convert_input()
The `rbuffer_consumed` was being passed a consumed count from another buffer,
causing integer overflow in `rbuffer_relocate`.

Fixes #1343
2014-10-28 10:21:05 -03:00
Thiago de Arruda
53ce5493fa test: Small fixes and improvements to functional helpers.lua
- Move the cleanup function definition into `restart()` so restart can be
  selectively used as a hook
- Improve error handling: Before this, errors while running the event loop would
  cause busted to get stuck. Now the error is properly raised by stopping the
  event loop first.
2014-10-28 09:11:40 -03:00
Thiago de Arruda
4d70fe89bf msgpack-rpc: Terminate server->client calls when the channel closes 2014-10-28 08:54:44 -03:00
Thiago de Arruda
3cacdae044 channel: fix REQ definition for msgpack-rpc logging 2014-10-28 08:54:24 -03:00
Scott Prager
ba527b6f34 version: Mark patch 430 NA.
Not relevant because we always compile with +conceal.
2014-10-25 14:53:32 -04:00
Scott Prager
d14c124847 vim-patch:7.4.433
Problem:    Test 75 fails on MS-Windows.
Solution:   Use ":normal" instead of feedkeys(). (Michael Soyka)

https://code.google.com/p/vim/source/detail?r=v7-4-433
2014-10-25 14:52:29 -04:00
Thiago de Arruda
65942d3a8d Merge PR #1331 'Fixes to job and channel modules' 2014-10-23 22:19:18 -03:00
Thiago de Arruda
d696fa51f8 test: verify that msgpacks-rpc exceptions are working 2014-10-23 21:46:09 -03:00
Thiago de Arruda
64844b7312 msgpack-rpc: Improve logging of msgpack-rpc messages
- Expose more logging control from the log.c module(get log stream and omit
  newlines)
- Remove logging from the generated functions in msgpack-gen.lua
- Refactor channel.c/helpers.c to log every msgpack-rpc payload using
  msgpack_object_print(a helper function from msgpack.h)
- Remove the api_stringify function, it was only useful for logging msgpack-rpc
  which is now handled by msgpack_object_print.
2014-10-23 21:46:03 -03:00
Thiago de Arruda
f05fead12e job: Only decrease refcount after settmode in job_wait
This is required to prevent the scenario explained by @akkartik in #1324
2014-10-23 21:19:08 -03:00
Thiago de Arruda
6f5f3faa84 travis: Setup xvfb for running xclip tests 2014-10-23 21:19:08 -03:00
Thiago de Arruda
d561ba223d job: Refactor to ensure that all callbacks will be invoked
It's possible that a child process won't close it's standard streams, even after
it exits. This can be evidenced with the "xclip" program:

    :call system('xclip -i -selection clipboard', 'DATA')

Before this commit, the above command wouldn't return, even though the xclip
program had exited. That is because `xclip` wasn't closing it's stdout/stderr
streams, which would block pending_refs from ever reaching 0.

Now the job.c module was refactored to ensure all streams are closed when the
uv_process_t handle is closed.
2014-10-23 21:19:08 -03:00
Thiago de Arruda
9abcd9a4a0 msgpack-rpc: Fix error handling and leak in call_request_handler
Free the arguments array after sending the response and also avoid
double-sending responses in cases of errors.
2014-10-23 21:19:08 -03:00
Thiago de Arruda
d4f78127fb msgpack-rpc: Ensure stdio channels are properly closed
When stdio was closed, parse_msgpack was called with eof == true, with caused a
free_channel call. To ensure the correct behavior for all types of channels, the
close_channel must be called before free_channel.
2014-10-23 21:19:08 -03:00
Thiago de Arruda
b4ec764e8e runtime: Fix rpcstop call in python_setup.vim 2014-10-23 21:19:08 -03:00
Justin M. Keyes
d1e063a8af Merge pull request #1332 from splinterofchaos/listbr
vim-patch:7.4.422
2014-10-23 15:20:01 -04:00
Scott Prager
87cf661af6 vim-patch:7.4.422
Problem:    When using conceal with linebreak some text is not displayed
            correctly. (Grüner Gimpel)
Solution:   Check for conceal mode when using linebreak. (Christian Brabandt)

https://code.google.com/p/vim/source/detail?r=v7-4-422
2014-10-23 14:37:55 -04:00
Justin M. Keyes
b8401550a7 Merge pull request #1330 from splinterofchaos/na-patches
N/A patches
2014-10-23 14:22:01 -04:00
Scott Prager
089f977d18 version: update patches to 488 2014-10-23 13:18:02 -04:00
Scott Prager
95cdf32f24 version: More NA patches. 2014-10-23 13:18:02 -04:00
Scott Prager
46c610c9fe vim-patch:7.4.406
Problem:    Test 72 and 100 fail on MS-Windows.
Solution:   Set fileformat to unix in the tests. (Taro Muraoka)

https://code.google.com/p/vim/source/detail?r=v7-4-406
2014-10-23 13:18:02 -04:00
Nate Sullivan
d11fd1950f legacy tests: migrate test35. #1318
Migrate vim's integration test 35 (increment/decrement commands) to
lua/busted.
2014-10-22 15:28:26 -04:00
Thiago de Arruda
2f31c3d6ce Merge PR #1326 'Add verification of log macros' 2014-10-22 11:40:38 -03:00
Thiago de Arruda
b31a74ad11 debug: Improve debugging of msgpack-rpc requests
- Add the api_stringify function to display API objects
- Use api_stringify to display request arguments and return values in DLOG
  statements.
2014-10-22 11:26:43 -03:00
Thiago de Arruda
4233446344 debug: Fix broken DLOG macro calls 2014-10-22 11:26:43 -03:00
Thiago de Arruda
97f0c1eda1 travis: Force verification of DLOG macros
We use INFO as the default log level, which leaves code inside DLOG macros
unverified(currently it has compilation errors).

Decrease the log level on travis builds for automatic verification in PRs.
2014-10-22 11:26:36 -03:00
Thiago de Arruda
cdfdfae322 input: Fix ctrl+c handling in convert_input 2014-10-22 09:58:17 -03:00
Thiago de Arruda
5cd9b64742 Merge PR #1316 'Refactor event deferral' 2014-10-22 07:30:32 -03:00