Commit Graph

3389 Commits

Author SHA1 Message Date
Thiago de Arruda
3a20a9847e test/ui: Fix indeterminism in screen_basic_spec 2015-04-03 09:05:04 -03:00
Björn Linse
1e7624d2a0 tests/ui: warn when the correct state was seen temporarily.
Helped-by: Thiago de Arruda <tpadilha84@gmail.com>
2015-04-03 09:05:04 -03:00
Björn Linse
e5c4c4bca2 test/ui: add redraw debug util 2015-04-03 09:05:04 -03:00
Thiago de Arruda
a5561fe610 Merge PR #1978 'Prevent too early sending of delayed notifications.' 2015-04-03 08:03:50 -03:00
oni-link
12b084b621 Fix a memory leak for WBuffers used in channel_write().
channel_write() uses a ref-counted buffer for writing. This buffer
should be released if it was used in "refcount" channel_write() calls.
But calling channel_write() on a closed channel would return early and
not decrease the refcount of the used buffer.
2015-04-03 08:03:25 -03:00
oni-link
db3ae72d19 Prevent too early sending of delayed notifications.
Notifications for a channel will be sent directly if there are no
pending requests (for this channel). Otherwise notifications are queued
for later sending.

But in two cases a notification could be sent with pending requests:
* Broadcasting a notification
* A channel that has just finished its last pending request
  would call send_delayed_notifications() for all channels.

To prevent this, every channel can now only send its own delayed
notifications and broadcasting checks for pending requests.
2015-04-03 08:03:25 -03:00
John Szakmeister
ab02637592 Merge pull request #2318 from yshui/master
CMakeLists: fix build when there're multiple arguments in C_FLAGS
2015-04-03 04:57:44 -04:00
Michael Reed
dfdc6a76b1 README.md: Avoid redirect in wiki link 2015-04-02 17:46:08 -04:00
Thiago de Arruda
1b2e991cf2 Merge PR #2314 'Add vimexpect library and example gdb plugin' 2015-04-02 11:55:17 -03:00
Thiago de Arruda
617878f747 runtime: Add vimexpect library and example gdb plugin
This library makes it easier to script communication with interactive programs.
It is similar to what the "expect" tcl extension does, but uses an object
oriented API and is designed to integrate nicely with Neovim job control.
2015-04-02 11:33:48 -03:00
Thiago de Arruda
6abde99ff2 test: Remove indeterminism from jobwait tests
- Use on_exit instead of on_stdout since there's no guarantee that the OS will
  send the data in time(It fails randomly in slow environments such as
  travis/valgrind)
- Increase the timeout gap for the "jobwait with timeout" test
2015-04-02 11:33:48 -03:00
Thiago de Arruda
d487dc1a9a eval: Ensure all job callbacks are invoked by jobwait()
A call to `event_poll` is required to ensure the exit callback from the last job
is invoked.
2015-04-02 11:33:48 -03:00
Thiago de Arruda
2b7f460716 eval: Add internal_refcount field to dict_T
Due to the way vimscript garbage collection handles cyclic references, its not
possible to rely on incrementing `dv_refcount` to prevent dicts still used
internally from being collected: If a object with dv_refcount > 0 isn't
reachable by vimscript code, it will be freed when `garbage_collect()` is
called. Add the `internal_refcount` field to prevent this.
2015-04-02 11:33:48 -03:00
David Bürgin
b3f07b2468 vim-patch:7.4.336 #2299
Problem:    Setting 'history' to a big value causes out-of-memory errors.
Solution:   Limit the value to 10000. (Hirohito Higashi)

https://github.com/vim/vim/tree/v7-4-336
2015-04-02 01:22:02 -04:00
Michael Reed
119a3f2485 Merge pull request #2124 from Pyrohh/improve-contrib
[RDY] CONTRIBUTING.md: Misc improvements
2015-04-01 13:56:29 -04:00
Michael Reed
82d2b8a45f CONTRIBUTING.md: Review
Helped-by: Florian Walch <florian@fwalch.com>
Helped-by: oni-link <knil.ino@gmail.com>
2015-04-01 13:46:54 -04:00
Florian Walch
4b585c52f3 Merge pull request #2284 from glts/vim-7.4.515
vim-patch:7.4.515
2015-04-01 16:34:52 +03:00
David Bürgin
db90dcb6fd vim-patch:7.4.515
Problem:    In a help buffer the global 'foldmethod' is used.  (Paul Marshall)
Solution:   Reset 'foldmethod' when starting to edit a help file.  Move the
            code to a separate function.

https://github.com/vim/vim/releases/tag/v7-4-515
2015-04-01 14:41:53 +02:00
Michael Reed
3e6989b5ec Merge pull request #2279 from Pyrohh/modeline
[RDY] Small modeline cleanup
2015-03-31 16:58:31 -04:00
Michael Reed
00e1b62ca8 Modeline cleanup
If users want folds to be automatically collapsed, then they should just
set foldmethod=marker in their vimrc.
2015-03-31 16:56:41 -04:00
Prajjwal Bhandari
d2c3592da1 Remove potential NULL dereference. #2316
This also removes the `#elseif defined(MSWIN)` clause. Due to the
enclosing `if` block, we will never get to this point when src starts with
a '%', making the whole #elseif block dead code.
2015-03-31 22:36:38 +02:00
Rich Churcher
1200f1f20e Use lfs.currentdir() to fix symlink test fail. 2015-04-01 09:21:21 +13:00
Florian Walch
7080041465 Merge pull request #2296 from glts/vim-7.4.324
[RDY] vim-patch:7.4.324
2015-03-31 23:07:13 +03:00
Yuxuan Shui
80e80e467f CMakeLists: fix build when there're multiple arguments in C_FLAGS
Because the COMMAND arguments of custom_command takes a list, and
CMAKE_C_FLAGS is a string, it will be treated as a single long
argument, which will cause the build to fail.
2015-03-31 14:46:17 -04:00
Thiago de Arruda
ad7a317c42 Merge PR #1212 'os_scandir/scandir_next/closedir()' 2015-03-31 11:50:39 -03:00
Scott Prager
feca9624b8 CMakeLists: enable USE_FNAME_CASE on Mac 2015-03-31 11:20:24 -03:00
Scott Prager
93bfe6a400 path_fix_case: unit test 2015-03-31 11:20:24 -03:00
Scott Prager
0f4976687d os_scandir: fname_case -> path_fix_case
Use os_scandir().

fname_case() only gets used when `defined(USE_FNAME_CASE)` (on operating
systems with case-insensitive file systems), but may be useful in other
contexts, so move it to path.c. (See the TODO.)

Remove the unused parameter, len.
2015-03-31 11:20:23 -03:00
Scott Prager
24da0d49d0 os_scandir: mch/unix_expandpath() -> path_expand()
Merge unix_expandpath with dos_expandpath from upstream vim and use
os_scandir() over POSIX readdir().
2015-03-31 11:20:23 -03:00
Scott Prager
3f74067565 Un-mch mch_has_(exp_)wildcard().
Merge mch_has_wildcard() and mch_has_exp_wildcar() with their upstream
equivalents for Windows and replace the "mch_" suffix with "path_".
2015-03-31 11:20:23 -03:00
Scott Prager
99869989c8 os_scandir(), scandir_next(), and os_closedir() 2015-03-31 11:20:23 -03:00
David Bürgin
21f446ebb4 vim-patch:7.4.324
Problem:    In Ex mode, cyrillic characters are not handled. (Stas Malavin)
Solution:   Support multi-byte characters in Ex mode. (Yukihiro Nakadaira)

https://github.com/vim/vim/releases/tag/v7-4-324
2015-03-30 12:03:33 +02:00
Thiago de Arruda
960b9108c2 Merge PR #2247 'Refactor/enhance job api' 2015-03-29 21:07:56 -03:00
Thiago de Arruda
b94f29004b doc: Begin terminal emulator documentation
With some spacing/indentation fixes.

Helped by: @Pyrohh, @kopischke
2015-03-29 20:35:45 -03:00
Thiago de Arruda
88d8ca73f9 eval: Improve validation of ids passed to job functions
Use the `is_user_job` to ensure that the job was started by `jobstart` or
`termopen`.
2015-03-29 20:35:45 -03:00
Thiago de Arruda
b8b9e5ebad eval: Implement jobclose() vimscript function 2015-03-29 20:35:44 -03:00
Thiago de Arruda
028f6d7d3f eval: Implement jobwait() vimscript function 2015-03-29 20:35:44 -03:00
Thiago de Arruda
6e7757ad51 eval: Refactor vimscript job control API
- Remove JobActivity autocmd and v:job_data variable
- Simplify `jobstart` to receive:
  - An argument vector
  - An optional dictionary which may contain any of the current `jobstart`
    options plus `on_stdout`, `on_stderr` and `on_exit` callbacks.
- Refactor and add more job tests
- Update documentation
2015-03-29 20:35:44 -03:00
Thiago de Arruda
4b98ea1e80 eval: Refactor call_func and func_unref
- Make it possible to call or unref ufunc_T pointers directly.
- Keep refcount of named functions, and stop them from being deleted if the
  refcount is greater than 1.
2015-03-29 20:35:44 -03:00
David Bürgin
2c7e8c38e0 vim-patch:7.4.502 #2282
Problem:    Language mapping also applies to mapped characters.
Solution:   Add the 'langnoremap' option, when on 'langmap' does not apply to
            mapped characters. (Christian Brabandt)

https://github.com/vim/vim/releases/tag/v7-4-502
2015-03-29 09:55:59 -04:00
Thiago de Arruda
9d02e5b984 test: Add missing before_each call to sign_spec.lua
Without this the test will inherit the previous test environment, causing random
failures.

Close #2243
2015-03-28 12:04:14 -03:00
Michael Reed
97df129956 CONTRIBUTING.md: Misc improvements
- In general, many sections have been expanded a lot.
- Defer to the wiki when it makes sense.
- Rewrite a bunch of things to be clearer. There is a lot more
  verbosity, but clarifying as many items as we can in this document is
  preferable to it being done later in the issue tracker.

(alphabetically sorted)
Helped-by: David Granström <david@davidgranstrom.com>
Helped-by: Florian Walch <florian@fwalch.com>
Helped-by: John Szakmeister <john@szakmeister.net>
Helped-by: Justin M. Keyes <justinkz@gmail.com>
Helped-by: Martin Kopischke <martin@kopischke.net>
Helped-by: oni-link <knil.ino@gmail.com>

[ci skip]
2015-03-27 22:53:52 -04:00
David Bürgin
d06b4933ed vim-patch:7.4.529 #2270
Problem:    No test for what 7.4.517 fixes.
Solution:   Adjust the tests for breakindent. (Christian Brabandt)

https://github.com/vim/vim/releases/tag/v7-4-529
2015-03-27 12:55:52 -04:00
David Bürgin
fa8ccda518 Vim patch: Add missing patch version 422 in version.c #2268
Completes #1332.
2015-03-27 12:13:07 -04:00
Harm te Hennepe
27ead64da0 Create new mode() value for terminal-mode ('t') #2287 2015-03-27 05:25:28 -04:00
Thiago de Arruda
41b05a0a3c tui: Fix reading when stdin is not a tty
Instead of selecting stderr on startup if stdin is not a tty, first try reading
from it and only switch to stderr when reading fails. With this behavior we
support commands like:

```
echo q | nvim -es
```

and

```
ls *.md | xargs nvim
```

Fixed small bugs in rstream.c to make this happen.
2015-03-26 22:06:57 -03:00
Michael Reed
c47e0d6210 doc: Introduce vim-differences #2141
This documents the differences between nvim and nvim.

Regarding the removal of references to 'renderoptions': it was never
added in the first place, so there's no need to mention its "removal".
2015-03-26 17:36:40 -04:00
Florian Walch
13f0ef66b4 doc: Document g:python_host_prog. #2205 2015-03-26 17:30:26 -04:00
Thiago de Arruda
a6e53a3797 Merge PR #2076 'Builtin terminal emulation' 2015-03-25 22:08:14 -03:00
Thiago de Arruda
2aa2513b8e test: Add terminal tests
- Modify tty-test to allow easier control over the terminal
- Add a new directory with various terminal tests/specifications
- Remove a pending job/pty test.
- Flush stdout in Screen:snapshot_util() (avoid waiting for the test to finish)
- Replace libuv sigwinch watcher by a sigaction handler. libuv randomly fails to
  deliver signals on OSX. Might be related to the problem fixed by
  @bbcddc55ee1e5605657592644be0102ed3a5f104 (under the hoods, libuv uses a pipe
  to deliver signals to the main thread, which might be blocking in some
  situations)
2015-03-25 18:57:36 -03:00