Commit Graph

3172 Commits

Author SHA1 Message Date
David Bürgin
9a6a311f35 tests: Migrate legacy tests 44 and 99 #2366
Consolidates the old test44 and test99 tests into one busted spec.
2015-04-07 18:54:27 -04:00
Eliseo Martínez
6881d9705b Merge #2228: Enable -Wconversion. (2)
Reviewed-by: oni-link <knil.ino@gmail.com>
2015-04-07 19:21:50 +02:00
Eliseo Martínez
402c6fd939 Enable -Wconversion: move.c. 2015-04-07 12:56:28 +02:00
Eliseo Martínez
fa2fcf13aa Enable -Wconversion: fold.c.
Refactor summary:
- foldinfo_T.fi_lnum: int --> linenr_T
                      Reorder field for optimal packing.
- foldAddMarker(..., markerlen): int --> size_t
    * foldstartmarkerlen: int --> size_t
        - foldDelMarker(..., markerlen): int --> size_t
            * foldendmarkerlen: int --> size_t

Helped-by: oni-link <knil.ino@gmail.com>
2015-04-07 12:56:28 +02:00
Eliseo Martínez
c5d7fa615d Enable -Wconversion: popupmnu.c.
Helped-by: oni-link <knil.ino@gmail.com>
2015-04-07 12:56:27 +02:00
Eliseo Martínez
2cd78638d4 Enable -Wconversion: farsi.c: Cleanup.
No semantic changes. Just some reformatting to save lines.
2015-04-07 12:56:27 +02:00
Eliseo Martínez
0601da3ef1 Enable -Wconversion: farsi.c: Solve issues.
Refactor summary:
- toF_TyB: int fn(int) --> char_u fn(int)
- put_and_redo: void fn(int) --> void fn(char_u)
    * put_curr_and_l_to_X: void fn(int) --> void fn(char_u)
        - toF_TyA: int fn(int) --> char_u fn(char_u)
    * toF_Xor_X_: int fn(int) --> char_u fn(int)
- toF_leading: int fn(int) --> char_u fn(char_u)
- toF_Rjoin: int fn(int) --> char_u fn(char_u)
- toF_ending: int fn(int) --> char_u fn(char_u)
- canF_Ljoin: bool fn(int) --> bool fn(char_u)
- canF_Rjoin: bool fn(int) --> bool fn(char_u)
- F_isterm: bool fn(int) --> bool fn(char_u)

Helped-by: oni-link <knil.ino@gmail.com>
2015-04-07 12:56:27 +02:00
Scott Prager
5f3eeadd03 Merge pull request #2348 from mhinz/job-control-mouse
[RFC] Job control: enable mouse after foregrounding
2015-04-06 22:37:52 -04:00
rhysd
6322a48173 Remove duplicates in BACKERS.md #2363 2015-04-06 15:43:31 -04:00
Marco Hinz
9a7b071e64 Job control: reset mouse support after foregrounding
Reset mouse support to whatever was used before the process was suspended.

References #2335.
2015-04-06 20:26:21 +02:00
Anton Ovchinnikov
98908853b9 Remove redundant NULL checks
menu_text() never returns NULL, because vim_strsave() and vim_strnsave()
never return NULL.
2015-04-06 13:05:40 +02:00
David Bürgin
0af7c8f624 legacy tests: Remove legacy tests for Lua (test85) #2357 2015-04-06 01:49:36 -04:00
David Bürgin
4657cd53d3 legacy tests: Remove legacy tests for MzScheme (test70) 2015-04-06 01:48:31 -04:00
David Bürgin
d41322fafb tests: Migrate legacy tests 92 and 93 #2261 2015-04-05 22:14:10 -04:00
David Bürgin
7a5a85d2c4 vim-patch:7.4.636 #2267
Problem:    A search with end offset gets stuck at end of file. (Gary Johnson)
Solution:   When a search doesn't move the cursor repeat it with a higher
            count. (Christian Brabandt)

https://github.com/vim/vim/releases/tag/v7-4-636
2015-04-05 21:35:17 -04:00
Justin M. Keyes
23425a3a6e Merge #2240 'Fix problem with coverity/105568 fix'
Closes #2230
2015-04-05 20:27:46 -04:00
oni-link
8ee6f90bf8 Fix problem with coverity/105568 fix.
The original fix 3db0a40d69
does not work for more than one loop iteration, because memory allocated
in the previous iteration could be reused in the current iteration.

Because expand_wildcards() never reads the variables *num_file
and *file before the first assignment to them, the initial
values for these variables can be anything. So instead of
calling expand_shellcmd() with *file = "" we set *file = NULL.
That should help coverity see, that not a array-typed value
is freed.

Helped-by: Eliseo Martínez <eliseomarmol@gmail.com>
2015-04-05 20:27:46 -04:00
oni-link
adb3ec2026 Update comments for expand_wildcards functions.
Be more specific in the description of mch_expand_wildcards():
This function will never free memory pointed to by its arguments.
If OK is returned, *file will always point to allocated memory.
*num_file is set to the number of pointers in *file.
If FAIL is returned *file is set to NULL and *num_file to 0.

If gen_expand_wildcards() returns FAIL, no memory allocation in this
function needs to be undone.

If expand_wildcards() returns FAIL, no memory allocation in this
function needs to be undone.

Helped-by: Eliseo Martínez <eliseomarmol@gmail.com>
Helped-by: Michael Reed <m.reed@mykolab.com>
2015-04-05 20:27:46 -04:00
David Bürgin
d3bb177f1e vim-patch:7.4.497 #2295
Problem:    With some regexp patterns the NFA engine uses many states and
            becomes very slow.  To the user it looks like Vim freezes.
Solution:   When the number of states reaches a limit fall back to the old
            engine. (Christian Brabandt)

https://github.com/vim/vim/releases/tag/v7-4-497

Helped-by: David Bürgin <676c7473@gmail.com>
Helped-by: Justin M. Keyes <justinkz@gmail.com>
Helped-by: Scott Prager <splinterofchaos@gmail.com>
2015-04-05 19:24:58 -04:00
John Szakmeister
a69e464f70 Remove swap file accidentally committed in 34dba3d7.
Also expand the rule in .gitignore to block other forms of swap files.
2015-04-05 09:41:50 -04:00
Florian Walch
abf9bb63fe Merge pull request #2341 from jalvesaq/r-runtime-update
Update R runtime files
2015-04-05 15:55:43 +03:00
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
Jakson Alves de Aquino
bd30ae53cb Update R runtime files
indent/r.vim      : change shiftwidth to 2 and minor bug fixes.
indent/rhelp.vim  : move the position of the test if the script was already sourced
indent/rmd.vim    : minor bug fix
indent/rnoweb.vim : minor bug fix
syntax/r.vim      : minor bug fixes and improvement (distinguish = from ==)
2015-04-03 10:44:18 -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