Commit Graph

5338 Commits

Author SHA1 Message Date
Lucas Hoffmann
e78fc534dd tests: Migrate recent patches of legacy eval test.
As the work of this migration did take quite some time, some changes where
made in master after this branch was started.  These are ported to the new
test file.
2016-01-27 12:54:45 +01:00
Lucas Hoffmann
4b13cbc76d tests: Comments and typos after review.
Helped-by: Justin M. Keyes <justinkz@gmail.com>
2016-01-27 12:52:13 +01:00
Lucas Hoffmann
fb3a6b925b tests: Resurrect unused part of legacy eval test.
The old test_eval.in file did a `:wq` on line 168.  The following 60 lines
where not used and there was no expected output for them in test_eval.ok.
This test code is now used in several test cases in the new test file.
2016-01-27 12:48:20 +01:00
Lucas Hoffmann
c13dc2b762 tests: Split converted eval test into it() blocks. 2016-01-27 12:43:53 +01:00
Lucas Hoffmann
8cfef01193 tests: Debug converted eval test. 2016-01-27 12:40:41 +01:00
Lucas Hoffmann
3571fdac6f tests: Migrate legacy eval test. 2016-01-27 12:37:56 +01:00
Justin M. Keyes
765d394f18 vim-patch:ac809999
ac80999985
2016-01-27 03:20:07 -05:00
Justin M. Keyes
c15e796211 coverity/125476: RI: Null pointer dereference 2016-01-27 02:39:42 -05:00
Justin M. Keyes
130611fca3 Merge pull request #4107 from oni-link/remove.strlen
search.c: searchit(): Remove strlen() check
2016-01-27 01:31:21 -05:00
oni-link
18ca2035fe search.c: searchit(): Remove strlen() check
While in the `while` loop at line 603 of function searchit(), memory
address ptr+matchpos is always valid. The strlen() check should not be
necessary to verify this.

Also added a check to prevent reading a line after the end of the
buffer.
2016-01-26 19:04:18 +01:00
Justin M. Keyes
9b0b3a0883 Merge pull request #4093 from oni-link/fix.issue.3486
regexp_nfa.c: Speed up find_match_text()
2016-01-26 10:18:06 -05:00
Jason Schulz
1937c6e480 vim_str2nr: cleanup #4104
Fixes unused assignments found by clang-scan.
2016-01-26 09:15:25 -05:00
Justin Gassner
299044d4ef vim-patch:7.4.656
Problem:    Missing changes for glob() in one file.
Solution:   Add the missing changes.

d8b77f7dc0
2016-01-25 21:45:26 +01:00
Justin M. Keyes
45b378259e Merge pull request #2710 from lucc/test83
Migrate legacy test 83.
2016-01-25 14:14:06 -05:00
Justin M. Keyes
ce0e66260f Merge pull request #4039 from cacplate/pr-3696
window.c: change return types to bool (adoption of #3696)
2016-01-25 14:12:12 -05:00
Felipe Morales
e74fa00c38 Merge pull request #4097 from fmoralesc/4071
plugin/tutor: Fix locale handling
2016-01-25 19:11:05 +01:00
Felipe Morales
1715b79d39 plugin/tutor: Fix locale handling
Fixes issue #4071
2016-01-25 17:44:46 +01:00
Charles Joachim
2772144cbf window.c: change return types to bool
Co-authored-by: Wayne Rowcliffe (@war1025)
2016-01-25 08:47:31 -05:00
Lucas Hoffmann
91a1680205 tests: Improve test 83 and add pending() call.
If nvim was compiled without `has("iconv")` this test is skipped.
2016-01-25 09:51:39 +01:00
Lucas Hoffmann
66f89ae321 tests: Migrate legacy test 83. 2016-01-25 09:39:59 +01:00
Justin M. Keyes
63d0f6e94a Merge pull request #4095 from justinmk/coverity134885
coverity/134885: Using uninitialized value
2016-01-25 00:02:12 -05:00
Justin M. Keyes
41434e6881 coverity/134885: Using uninitialized value
Case: (dobin > 1) && (pre != 0)
2016-01-24 23:17:13 -05:00
Justin M. Keyes
b5f6f43095 cmake: Linux: define _GNU_SOURCE.
Closes #4042
2016-01-24 21:18:44 -05:00
oni-link
291495a7b0 regexp_nfa.c: Speed up find_match_text()
An extra test in commit 0a116c828d was
introduced, to check for end of string with a call to strlen(). This was
necessary, because an incorrect length for invalid byte sequences was
used to step through the string. This slowed down find_match_text()
compared to vim's version.

To speed up things, the extra check was removed and a sequence length
of 1 for invalid byte sequences is used.

Fixes issue #3486
2016-01-24 23:38:38 +01:00
Justin M. Keyes
e1d81178cc Merge pull request #4069 from jusga/vim-7.4.680
vim-patch:7.4.680
2016-01-24 16:14:53 -05:00
Justin M. Keyes
31047607f8 Merge pull request #4073 from jbradaric/vim-7.4.654
vim-patch:7.4.654
2016-01-24 16:05:20 -05:00
Florian Walch
a15cfb4d52 Merge pull request #4089 from jbradaric/vim-7.4.722
vim-patch:7.4.722
2016-01-24 13:02:14 +01:00
Florian Walch
c5f37c0fc0 Merge pull request #4090 from jbradaric/vim-7.4.739
vim-patch:7.4.739
2016-01-24 12:58:44 +01:00
Jurica Bradaric
7c94b2c343 vim-patch:7.4.739
Problem:    In a string "\U" only takes 4 digits, while after CTRL-V U eight
            digits can be used.
Solution:   Make "\U" also take eight digits. (Christian Brabandt)

acc39888cd
2016-01-24 10:31:53 +01:00
Jurica Bradaric
3915ac2409 vim-patch:7.4.722
Problem:    0x202f is not recognized as a non-breaking space character.
Solution:   Add 0x202f to the list. (Christian Brabandt)

73284b973a
2016-01-24 09:55:40 +01:00
Jurica Bradaric
4d0c511354 strings: Change order of operands in condition.
utf_ptr2char only needs to be called for l > 1.
2016-01-24 09:16:34 +01:00
Jurica Bradaric
d22a821ce3 regexp: Remove a leftover line.
It was replaced with `case 0xc3: case 0xc4: case 0xc5:`.
2016-01-24 09:15:59 +01:00
Jurica Bradaric
ee56470157 vim-patch:7.4.704
Problem:    Searching for a character matches an illegal byte and causes
            invalid memory access. (Dominique Pelle)
Solution:   Do not match an invalid byte when search for a character in a
            string.  Fix equivalence classes using negative numbers, which
            result in illegal bytes.

d82a2a990b
2016-01-24 09:15:30 +01:00
Justin M. Keyes
4172ce4eb0 Merge pull request #4072 from jbradaric/vim-7.4.642
vim-patch:7.4.642
2016-01-23 14:47:45 -05:00
Justin M. Keyes
d4430dc3eb Merge pull request #4007 from brcolow/vim-7.4.718
vim-patch:7.4.718
2016-01-23 14:37:31 -05:00
Justin M. Keyes
c8b487ae40 Merge pull request #4078 from jbradaric/vim-7.4.685
vim-patch:7.4.685
2016-01-23 10:07:24 -05:00
Justin Gassner
50c4c56967 vim-patch:dbcf19d
Add test files for patch 7.4.680.

dbcf19dc49
2016-01-23 15:33:31 +01:00
Jurica Bradaric
f583e51209 vim-patch:7.4.685
Problem:    When there are illegal utf-8 characters the old regexp engine may
            go past the end of a string.
Solution:   Only advance to the end of the string. (Dominique Pelle)

0e462411ca
2016-01-23 13:57:07 +01:00
Justin Gassner
0ccd1ef725 vim-patch:5837f1f #4066
Update runtime files.

5837f1f447
2016-01-23 12:05:15 +01:00
James McCoy
feb70192a8 cmake: Search for both libmsgpackc and libmsgpack #4075
libmsgpack was the old C++ library provided by msgpack-c.  The C library
is libmsgpackc.

The C++ support became header-only, but there was a bug
(msgpack/msgpack-c#395) wherein using msgpack-c's CMake build system
would only install libmsgpack instead of libmsgpackc.

Searching for both libraries, but preferring libmsgpackc, allows for
building against older msgpack-c releases and prepares for the upcoming
msgpack-c release which fixes the aforementioned issues.

Signed-off-by: James McCoy <jamessan@jamessan.com>
2016-01-22 23:03:14 +01:00
Jurica Bradaric
ce17037e3e window: Skip backslash only if followed by space 2016-01-22 21:06:20 +01:00
Michael Ennen
8048699f7d vim-patch:7.4.718
Problem:    Autocommands triggered by quickfix cannot get the current title
            value.
Solution:   Set w:quickfix_title earlier. (Yannick)
            Also move the check for a title into the function.

81278efadf
2016-01-22 12:52:01 -07:00
Jurica Bradaric
34904efd9d window: Fix code style. 2016-01-22 19:48:52 +01:00
Jurica Bradaric
b8ed507e3b window: Fix linter errors. 2016-01-22 19:28:17 +01:00
Jurica Bradaric
8b86f1103a vim-patch:7.4.642
Problem:    When using "gf" escaped spaces are not handled.
Solution:   Recognize escaped spaces.

d45c07ac74
2016-01-22 19:28:17 +01:00
Jurica Bradaric
22230196cb vim-patch:7.4.654
Problem:    glob() and globpath() cannot include links to non-existing files.
            (Charles Campbell)
Solution:   Add an argument to include all links with glob(). (James McCoy)
            Also for globpath().

a245bc79b4
2016-01-22 19:26:23 +01:00
Justin Gassner
f1aec23c09 vim-patch:7.4.680
Problem:    CTRL-W in Insert mode does not work well for multi-byte
            characters.
Solution:   Use mb_get_class(). (Yasuhiro Matsumoto)

310f2d59b2
2016-01-22 11:55:00 +01:00
oni-link
15cd8916df cs_print_tags_priv: Clean up function.
* Style changes
* Variable removal
* Comment update
2016-01-21 17:24:12 +01:00
oni-link
dd0b358af5 cs_print_tags_priv: Clear first output line to screen end
Using `:cscope find s <cword>` with the cursor on a very short word like
`key` does not output the first line on the screen correctly: Output is
`Cscope tag: keyrd>` instead of
`Cscope tag: key`.

To fix this, clear the screen line after the first line was printed.
2016-01-21 16:52:50 +01:00
oni-link
a649299e76 coverity/133892: Resource leak
Variable tbuf going out of scope leaks the storage it points to.

We don't have to use the copy tbuf of a match. Because matches are always in
ctags style, we can operate on them directly.
2016-01-21 16:37:58 +01:00