Commit Graph

3150 Commits

Author SHA1 Message Date
Björn Linse
8c25ad6cf5 clipboard: missing return NULL when provider not available 2015-04-05 14:31:59 +02:00
Björn Linse
5e67f0b5b1 Merge pull request #2244 from bfredl/registers
Restore clipboard support for `:registers` and `:put` and `:<c-r>*`, don't clobber `"0` on paste and update tests.
2015-04-05 12:42:23 +02:00
Björn Linse
adcf268a72 clipboard: handle clipboard reading directly in get_yank_register
This makes :<c-r>* work as expected and
avoids clobbering zero register ("0) when pasting unnamed clipboard

Helped-By: Scott Prager <splinterofchaos@gmail.com>
Helped-By: Michael Reed <m.reed@mykolab.com>
2015-04-05 11:34:14 +02:00
Björn Linse
db92fcdba3 test/clipboard: more clipboard test cleanups 2015-04-05 11:34:13 +02:00
Björn Linse
7422843f5c clipboard: improve the handling of newlines in get_clipboard
This makes the interpretion consistent with the way newlines are used in
the VIMENC format, while keeping the same fallback behaviour when
regtype is unspecified. Also check both cases explicitly in the tests.
2015-04-05 11:34:13 +02:00
Björn Linse
34dba3d7cd clipboard: reallow :put 2015-04-05 11:34:13 +02:00
Björn Linse
5600b80c1f clipboard: show "* and "+ in :registers
Helped-by: Robin Allen <r@foon.uk>
Helped-by: Scott Prager <splinterofchaos@gmail.com>
2015-04-05 11:34:13 +02:00
Björn Linse
638ceea092 test/clipboard: split unrelated subtests 2015-04-05 11:34:13 +02:00
Michael Reed
73bf0551f8 doc/vim_diff.txt: Remove redundant :terminal ref
Stated at the top of the section:
"See |nvim-intro| for a list of Nvim's largest new features."

It's now mentioned in `:h nvim_terminal_emulator.txt`.
2015-04-04 18:31:57 -04:00
John Szakmeister
4f7d515be4 Merge pull request #2320 from richchurcher/fix_path_test
Use lfs.currentdir() to fix symlink test fail.
2015-04-04 15:04:58 -04:00
Thiago de Arruda
94153ab975 Merge PR #2221 'tests/ui: Fix indeterminism in Screen:wait' 2015-04-03 09:05:26 -03:00
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