Commit Graph

3327 Commits

Author SHA1 Message Date
Justin M. Keyes
b23e444b37 test regression: recover_spec.lua 2015-04-12 01:14:54 -04:00
Justin M. Keyes
04806dee4b test: helpers.lua: add temporary set_session() function
This function is needed until helpers.lua is refactored to support
multiple sessions.
2015-04-12 01:02:58 -04:00
Justin M. Keyes
2275297f4a test: migrate legacy test 78 2015-04-12 01:02:58 -04:00
Justin M. Keyes
86ee88163e passing-by: mark non-null return; remove invalid OOM check.
remove some #ifdef noise
2015-04-12 01:02:58 -04:00
Marco Hinz
e4975f82c9 Expand :profile's filename #2390
vim_strsave() is replaced by expand_env_save_opt(), which expands ~ for
convenience:

    :profile start ~/.nvim/prof.log

Prior to this change you had to specify an absolute path.
2015-04-11 19:22:49 -04:00
Michael Reed
5b390395e6 Merge pull request #2404 from Pyrohh/coverity-108870
[RFC] coverity/108870: Missing break in switch
2015-04-11 18:05:06 -04:00
Eliseo Martínez
4a2c737e68 Merge #2410: Fix coverity issues. (7)
Reviewed-by: Justin M. Keyes <justinkz@gmail.com>
2015-04-11 23:06:41 +02:00
Eliseo Martínez
95d6f4416e coverity/{13738,13739,68853,13717,13720,13716,68854,13718,13721}: FP.
All these issues are false positives that result from coverity's
inability to properly follow arithmetic implications in expressions
using some macros. Redefining macros another way to make arithmetic
implications clearer fixes the issues.
2015-04-11 22:34:57 +02:00
Michael Reed
9a363ca7a3 Merge pull request #2398 from mhinz/docs-remove-jobactivity
[RFC] Remove all references to JobActivity
2015-04-11 15:12:38 -04:00
Marco Hinz
0e65962a68 Remove all references to JobActivity
The JobActivity event got replaced by callback functions provided to
jobstart() or termopen().

It got removed here:

6e7757ad51
2015-04-11 18:32:18 +02:00
Thiago de Arruda
8171fc4cbc Merge PR #2405 'Job control fixes' 2015-04-11 09:10:54 -03:00
Thiago de Arruda
484fd734ab build: Remove busted output handler utfTerminalDetailed
Busted now contains "gtest", which can be used for the same purpose as
utfTerminalDetailed.
2015-04-11 08:46:59 -03:00
Thiago de Arruda
ad8d415e3a test: Remove indeterminism in job_spec.lua pty tests 2015-04-11 08:46:59 -03:00
Thiago de Arruda
ccd42e81c8 eval: Fix jobwait()
- Properly save job event deferring state for recursive calls
- Disable breakcheck while running. Breakcheck can invoke job callbacks
  in unexpected places.
2015-04-11 08:46:59 -03:00
Thiago de Arruda
17db7f1e14 eval: Fix segfault caused by passing invalid callback to jobstart 2015-04-11 08:46:59 -03:00
Björn Linse
5bd85fd954 Merge pull request #2381 from bfredl/unnamed
fix update v:register and the " register when clipboard=unnamed
2015-04-11 12:57:38 +02:00
Björn Linse
a6487ae9cb ops.c: cleanup of get_yank_register 2015-04-11 11:14:22 +02:00
Björn Linse
9978a01faa clipboard: fix "" register not updated when clipboard=unnamed
Helped-By: Scott Prager <splinterofchaos@gmail.com>
2015-04-11 11:11:52 +02:00
Björn Linse
941b02af4c clipboard: adjust v:register when clipboard=unnamed
Helped-By: Nicolas Hillegeer <nicolas@hillegeer.com>
Helped-By: Michael Reed <m.reed@mykolab.com>
2015-04-11 11:11:52 +02:00
Michael Reed
98f976b861 coverity/108870: Missing break in switch 2015-04-10 22:12:29 -04:00
Michael Reed
e584fe0057 doc: Remove |shell-window|
fixes #2384
2015-04-10 16:38:11 -04:00
Michael Reed
95b7059d45 Remove unused 'if_[language].txt': Review 2015-04-10 16:38:11 -04:00
Michael Reed
5bc151c2a4 Remove unused 'if_[language].txt': Clean up
Regarding |script-here|: despite being a language agnostic piece of
advice, it was in `if_perl.txt`. Regardless, we now only have one
support for one legacy plugin interface, so put it in `if_pyth.txt`
2015-04-10 16:38:11 -04:00
Michael Reed
b0cc6eadd7 doc: Remove unused 'if_[language].txt' and related
Rubycomplete requires 'if_ruby', which has never been in Neovim. Because
of this, remove some mentions of it from the docs, but keep the actual
plugin untouched (as to avoid unneeded maintainence costs). It has a
call to `has('ruby')`, so it will still fall back to syntax completion.
2015-04-10 16:38:11 -04:00
Michael Reed
ea8325024e Bring E319 (cmd not available) in line with E519 (opt not available) 2015-04-10 16:38:11 -04:00
Michael Reed
baba9f7096 Clarify that nvim has no built-in GUI 2015-04-10 16:38:10 -04:00
Alexey Shmalko
6139c72251 coverity/{108271,108272,108273}: add fallthrough annotation #2362
Signed-off-by: Michael Reed <m.reed@mykolab.com>
2015-04-10 02:05:48 -04:00
Michael Reed
5f743a120b README.md: Link to neovim.org/Community #2167
[ci skip]
2015-04-09 17:39:49 -04:00
David Bürgin
cb7bb70c49 scripts: Fix "test input line" logic in legacy2luatest.pl #2369
Fixes the handling of the initial input lines of a test script by simply
skipping all initial empty lines.

Helped-by: Florian Walch <florian@fwalch.com>
Suggested-by: Florian Walch <florian@fwalch.com>
2015-04-09 11:40:09 -04:00
David Bürgin
42af7daa25 mark.c: Remove JUMPLIST_ROTATE #2376
JUMPLIST_ROTATE is never defined, and the feature is not popular.
2015-04-09 11:21:51 -04:00
Scott Prager
4a7364c807 Merge pull request #2374 from mhinz/hl-group-termcursor
[RDY] Add new highlight groups TermCursor and TermCursorNC
2015-04-09 11:14:22 -04:00
Marco Hinz
cd7b910e81 Add new highlight groups TermCursor/TermCursorNC
These highlight groups replace the old mechanism of setting:

  - {g,b}:terminal_focused_cursor_highlight
  - {g,b}:terminal_unfocused_cursor_highlight
2015-04-09 16:38:32 +02:00
Scott Prager
bae1da3f74 Merge pull request #2307 from splinterofchaos/system-null
[RFC] NULL and empty string bugs
2015-04-08 23:19:41 -04:00
Scott Prager
93a3e331a3 event: Only process if event_init has been run.
Reported by @fourjay, a codepath that causes event_poll() to run before
event_init() will trigger a segfault as the events list will not have
been initialized. Exiting immediately from event_init() causes nvim to
hang, so just exit before running the events.

fixes #2339
2015-04-08 23:18:16 -04:00
Scott Prager
edbc9e6538 eval: do not assume a vval.v_string is nonnull.
In the fallowing functions, use get_tv_string() to safely avoid a NULL
pointer dereference.
  * rpcstart
  * rpcrequest
  * rpcnotify
  * jobstart

fixes #2321
2015-04-08 23:18:16 -04:00
Scott Prager
41ce69811a system(): Return an empty string if no output.
fixes #2286
2015-04-08 23:18:16 -04:00
Michael Reed
0f6e25a9e4 messages: Update common instances of Vim to Nvim #2031 2015-04-08 23:05:39 -04:00
Florian Walch
6df132f4a4 Merge pull request #2378 from fwalch/travis-disable-nightly
Travis: Disable building 'nightly' tag.
2015-04-09 01:22:42 +03:00
Florian Walch
04e09ba742 Merge pull request #1805 from fwalch/vim-7.4.399
vim-patch: Port parts of Vim 7.4.399.
2015-04-09 00:02:09 +03:00
Florian Walch
1882598e71 Travis: Disable building 'nightly' tag. 2015-04-08 20:38:36 +03:00
Scott Prager
e1bac3b840 Merge pull request #2346 from splinterofchaos/fix-terminal
[RFC] terminal: Handle loss of focus in event loop.
2015-04-08 12:27:52 -04:00
Florian Walch
dea2731184 vim-patch: Port parts of Vim 7.4.399.
Resolves #1753.

https://code.google.com/p/vim/source/detail?r=v7-4-399

Reviewed-by: Felipe Oliveira Carvalho <felipekde@gmail.com>

Helped-by: David Bürgin <676c7473@gmail.com>
Helped-by: Scott Prager <splinterofchaos@gmail.com>
Helped-by: Michael Reed <m.reed@mykolab.com>
Helped-by: Felipe Oliveira Carvalho <felipekde@gmail.com>
2015-04-08 18:33:54 +03:00
oni-link
5f98c32725 event.c: Simplify timer use in event_poll()
event_poll() always leaves the libuv I/O loop after one iteration. The
duration for how long the loop polls for I/O is given by the shortest
timeout of all active timers. Is no timer active, I/O is/could be polled
indefinitely.

To make sure our timer is still active when I/O polling begins,
a prepare handle is used to start the timer right before the polling.

But by only using a timer that restarts after its timeout was reached,
we also can assure that polling is done with (nearly) the same finite
timeout.

For a short explanation how the I/O loop is working, see
http://docs.libuv.org/en/latest/design.html#the-i-o-loop.
2015-04-08 09:46:14 -03:00
Justin M. Keyes
95db8df682 Merge #2303 'Fix clang analysis warnings. (9)' 2015-04-07 20:04:35 -04:00
Eliseo Martínez
3c57f5a0e1 Fix warnings: window.c: close_last_window_tabpage(): Np deref: RI.
Problem    : Dereference of null pointer @ 1769.
Diagnostic : Real issue.
Rationale  : It seems buffer could be null. Not sure, though.
Resolution : Check for buffer null.
             This resolution was chosen as it will always work.
             But it could be that buffer can't really be null at that
             point. autocmd_win is ruled out by close_window, so that
             can't be the case. I'm not sure if other windows without
             buffers are possible, so leaving it this way.
             If it's confirmed buffer can't be null, resolution through
             an assert would be possible and this would be FP, not RI.
2015-04-07 20:04:34 -04:00
Eliseo Martínez
af8adc2d8c Fix warnings: terminal.c: get_config_int(): Dead init: RI.
Problem    : Dead initialization @ 1119.
Diagnostic : Real issue.
Rationale  : `obj` is immediately assigned another value through
             GET_CONFIG_VALUE macro.
Resolution : Don't initialize.

Helped-by: oni-link <knil.ino@gmail.com>
2015-04-07 20:04:34 -04:00
Eliseo Martínez
1b4dbdf45b Fix warnings: terminal.c: get_config_string(): Dead init: RI.
Problem    : Dead initialization @ 1109.
Diagnostic : Real issue.
Rationale  : `obj` is immediately assigned another value through
             GET_CONFIG_VALUE macro.
Resolution : Don't initialize.

Helped-by: oni-link <knil.ino@gmail.com>
2015-04-07 20:04:33 -04:00
Eliseo Martínez
3465a945e1 Fix warnings: terminal.c: redraw(): Np dereference: RI.
Problem    : Dereference of null pointer @ 1053.
Diagnostic : Real issue.
Rationale  : Branch "Exiting focused terminal" can actually be executed
             when term is NULL.
Resolution : Guard branch with term check.
2015-04-07 20:04:33 -04:00
Eliseo Martínez
bddba93949 Fix warnings: eval.c: f_termopen(): Use-after-free: MI.
Problem    : Use-after-free @ 15081.
Diagnostic : Multithreading issue.
Rationale  : `get_dict_callback` can return NULL on two different
             cases: 1) when the dict doesn't contain the given key;
             this case is not considered an error. 2) when the key
             exists but there's some problem with its value; this is
             considered an error.
             Then, code calling `get_dict_callback` in
             `common_job_callbacks`, as well as code calling
             `common_job_callbacks`, uses `did_emsg` to distinguish
             between error/non-error cases.
             Suggested error path presumes an error condition within
             `common_job_callbacks`, with `did_emsg` being true, but
             then being false just after returning to calling code in
             `f_termopen`.
             That, clearly, could only happen if another thread run in
             between those points.
Resolution : Refactor `get_dict_callback` and `common_job_callbacks`, so
             that they clearly distinguish between error/non-error
             situations, without recurring to globals.
2015-04-07 20:04:33 -04:00
Eliseo Martínez
31581bd750 Fix warnings: eval.c: f_jobstart(): Np dereference: FP.
Problem    : Dereference of null pointer @ 10812.
Diagnostic : False positive.
Rationale  : `args->lv_first` can't be NULL, as we have just stated
             above that that there's at least one item.
Resolution : Assert.
2015-04-07 20:04:33 -04:00