Jakub Łuczyński
5e815edece
rename: user_funcs -> userfunc
...
Lets stick with vim for now
2020-02-13 14:11:55 +01:00
Jakub Łuczyński
d50c1123d5
fix: includes
2020-02-13 14:11:53 +01:00
Jan Edmund Lazo
7dacab9afd
vim-patch:8.2.0033: make_extmatch() OOM #11602
...
Problem: Crash when make_extmatch() runs out of memory.
Solution: Check for NULL. (Dominique Pelle, closs vim/vim#5392 )
7c77b34967
2019-12-24 06:40:39 +01:00
Justin M. Keyes
6aae0e7c94
lint
2019-09-13 19:29:25 -07:00
Justin M. Keyes
3344cffe7b
getdigits: introduce strict
, def
parameters
...
Problem:
During a refactor long ago, we changed the `getdigits_*` familiy of
functions to abort on overflow. But this is often wrong, because many
of these codepaths are handling user input.
Solution:
Decide at each call-site whether to use "strict" mode.
fix #5555
2019-09-13 19:29:25 -07:00
Jan Edmund Lazo
f81619aafe
regexp: assert nonnull pointer for regnext()
2019-09-10 21:54:05 -04:00
Ihor Antonov
ce59a70f5b
PVS/V560: condition is always true #10624
...
* before changed line status variable is set to RA_FAIL in 2 places
line 3816 and 3826, both lead to short-circuit of the loop, making
comparing it to RA_FAIL useless
close #10624
2019-07-28 10:59:44 +02:00
Jan Edmund Lazo
80487b59c9
vim-patch:8.1.0903: struct uses more bytes than needed
...
Problem: Struct uses more bytes than needed.
Solution: Reorder members of regitem_S. (Dominique Pelle, closes vim/vim#3936 )
beb7574d6b
2019-07-24 19:46:09 -04:00
Jan Edmund Lazo
526dbcafd1
vim-patch:8.1.1720: crash with very long %[] pattern
...
Problem: Crash with very long %[] pattern. (Reza Mirzazade farkhani)
Solution: Check for reg_toolong. (closes vim/vim#4703 )
2a5b52758b
2019-07-20 17:28:45 -04:00
Justin M. Keyes
ae846b41df
vim-patch:8.0.1496: VIM_CLEAR()
...
Problem: Clearing a pointer takes two lines.
Solution: Add VIM_CLEAR() and replace vim_clear(). (Hirohito Higashi,
closes #2629 )
vim-patch:8.0.1481
2019-05-25 10:07:05 +02:00
Jan Edmund Lazo
bbc32fc831
lint
2019-04-23 00:03:47 -04:00
Jan Edmund Lazo
07a182c6b5
vim-patch:8.0.0647: syntax highlighting can make cause a freeze
...
Problem: Syntax highlighting can make cause a freeze.
Solution: Apply 'redrawtime' to syntax highlighting, per window.
06f1ed2f78
2019-04-23 00:03:47 -04:00
Jan Edmund Lazo
5c97bfb1e2
vim-patch:8.1.1025: checking NULL pointer after addition
...
Problem: Checking NULL pointer after addition. (Coverity)
Solution: First check for NULL, then add the column.
64c8ed366d
2019-03-21 07:44:52 -04:00
Justin M. Keyes
4352d41db0
Merge #9662 'vim-patch:8.0.{0643-0646}'
2019-03-08 13:21:11 +01:00
Billy Su
96e2c3945f
lint: fix coding style
2019-03-08 00:08:16 +08:00
Billy Su
0a471e009a
vim-patch:8.0.0646: the hlsearch test fails on fast systems
...
Problem: The hlsearch test fails on fast systems.
Solution: Make the search pattern slower. Fix that the old regexp engine
doesn't timeout properly.
0946326580
2019-03-08 00:06:28 +08:00
Billy Su
fbd8209286
vim-patch:8.0.0645: no error for illegal back reference in NFA engine
...
Problem: The new regexp engine does not give an error for using a back
reference where it is not allowed. (Dominique Pelle)
Solution: Check the back reference like the old engine. (closes vim/vim#1774 )
1ef9bbe215
2019-03-07 23:48:53 +08:00
Billy Su
241b905b13
vim-patch:8.0.0643: when a pattern search is slow Vim becomes unusable
...
Problem: When 'hlsearch' is set and matching with the last search pattern
is very slow, Vim becomes unusable. Cannot quit search by
pressing CTRL-C.
Solution: When the search times out set a flag and don't try again. Check
for timeout and CTRL-C in NFA loop that adds states.
fbd0b0af68
2019-03-07 23:27:19 +08:00
Jan Edmund Lazo
5f84b1dc41
vim-patch:8.1.0935: old regexp engine may use invalid buffer #9692
...
Problem: Old regexp engine may use invalid buffer for 'iskeyword' or
uninitialized buffer pointer. (Kuang-che Wu)
Solution: Set rex.reg_buf when compiling the pattern. (closes vim/vim#3972 )
8bfd9469ce
2019-03-07 12:05:22 +01:00
Justin M. Keyes
e116b0f61f
vim-patch:8.1.0973: pattern with syntax error gives threee error messages
...
Problem: Pattern with syntax error gives threee error messages. (Kuang-che
Wu)
Solution: Remove outdated internal error. Don't fall back to other engine
after an error.
cd62512c55
2019-03-01 01:56:17 +01:00
Justin M. Keyes
a66b1d4615
vim-patch:8.1.0985: crash with large number in regexp
...
Problem: Crash with large number in regexp. (Kuang-che Wu)
Solution: Check for long becoming negative int. (closes #)
ab350f89f9
2019-02-28 12:07:25 +01:00
Jan Edmund Lazo
486234ab3d
vim-patch:8.1.0937: invalid memory access in search pattern
...
Problem: Invalid memory access in search pattern. (Kuang-che Wu)
Solution: Check for incomplete collation element. (Dominique Pelle,
closes vim/vim#3985 )
f1b57ab2ab
2019-02-17 19:37:44 -05:00
Jan Edmund Lazo
279ecaff00
vim-patch:8.1.0934: invalid memory access in search pattern
...
Problem: Invalid memory access in search pattern. (Kuang-che Wu)
Solution: Check for incomplete equivalence class. (closes vim/vim#3970 )
985079c514
2019-02-17 19:35:41 -05:00
Justin M. Keyes
ce6a5fb94b
PVS/V560: expression is always true
...
This macro serves as a sanity-check / documentation.
2019-01-18 02:43:38 +01:00
Jan Edmund Lazo
772f4ce9f8
vim-patch:8.1.0677: look-behind match may use the wrong line number
...
Problem: Look-behind match may use the wrong line number. (Dominique Pelle)
Solution: Use the line number in regsave instead of the one in behind_pos,
we may be looking at the previous line. (closes vim/vim#3749 )
866f355814
2019-01-05 22:43:46 -05:00
Justin M. Keyes
5a752c97d5
vim-patch:8.1.0098: segfault when pattern with \z() is very slow ( #9283 )
...
Problem: Segfault when pattern with \z() is very slow.
Solution: Check for NULL regprog. Add "nfa_fail" to test_override() to be
able to test this. Fix that 'searchhl' resets called_emsg.
bcf9442307
closes #8788
2018-11-29 01:51:26 +01:00
Jan Edmund Lazo
01b2fa53f4
lint
2018-09-21 00:05:06 -04:00
Jan Edmund Lazo
300a7a4cf4
replace fallthrough comment with macro
...
Follow-up of vim-patch:8.0.1215
2018-09-21 00:05:06 -04:00
Jan Edmund Lazo
6a329b0548
vim-patch:8.0.1215: newer gcc warns for implicit fallthrough
...
Problem: Newer gcc warns for implicit fallthrough.
Solution: Consistently use a FALLTHROUGH comment. (Christian Brabandt)
2f40d129bf
2018-09-20 06:59:04 -04:00
ZviRackover
329cfc3303
lint: clean-up after parent commits
2018-09-09 10:45:50 +03:00
ZviRackover
ac13e65ae0
Remove has_mbytes local to lines changed in parent commit
2018-09-09 10:45:50 +03:00
ZviRackover
cbdbc4f63d
Refactor: Remove occurences of mb_char2bytes
2018-09-09 10:45:50 +03:00
ZviRackover
d110c6d790
lint: cleanup after parent commits
2018-08-16 07:39:48 +03:00
ZviRackover
2bddc4ca54
Remove occurences of mb_head_off
2018-08-15 22:02:33 +03:00
Jan Edmund Lazo
d6a25f89b8
regexp: drop has_mbyte check in regmatch()
...
has_mbyte is always true in nvim.
2018-08-11 17:45:18 -04:00
Jan Edmund Lazo
cb708d203b
vim-patch:8.0.1517: invalid memory acces with pattern using look-behind match
...
Problem: Invalid memory acces with pattern using look-behind match.
(Dominique Pelle)
Solution: Get a pointer to the right line.
bc197195b0
2018-08-11 14:32:59 -04:00
Jan Edmund Lazo
f7f65f5a82
vim-patch:8.0.1254: undefined left shift in gethexchrs()
...
Problem: Undefined left shift in gethexchrs(). (geeknik)
Solution: Use unsigned long. (idea by Christian Brabandt, closes vim/vim#2255 )
4c22a91d20
2018-08-11 14:32:59 -04:00
ZviRackover
5cecd7a93a
style: fixing minor issues noted in code review.
2018-08-06 22:27:10 +03:00
ZviRackover
071aab5148
Remove some occrrences of enc_utf8 and has_mbyte
...
Removing uses and related dead code in the locallity of changes of
the two parent commits.
2018-08-06 20:48:07 +03:00
ZviRackover
cd3b2e4b6b
lint: clean-up after parent commit
2018-08-06 20:48:07 +03:00
ZviRackover
10b6afd652
Remove all occurences of the mb_ptr2char macro
...
First step towards implemening issue #7401 .
The same can be done for all deprecated mb_ functions in follow-up
patches.
2018-08-06 20:48:07 +03:00
Jan Edmund Lazo
3c7ea8d619
vim-patch:8.0.0451: some macros are in lower case
...
Problem: Some macros are in lower case.
Solution: Make a few more macros upper case. Avoid lower case macros use an
argument twice.
91acfffc1e
2018-06-12 02:00:50 -04:00
KunMing Xie
7cc9d2b2b2
vim-patch:8.0.0520: using a function pointer while the function is known ( #8513 )
...
Problem: Using a function pointer instead of the actual function, which we
know.
Solution: Change mb_ functions to utf_ functions when already checked for
Unicode. (Dominique Pelle, closes vim/vim#1582 )
ace95989ed
2018-06-10 12:31:51 +02:00
Jan Edmund Lazo
2ab7165214
lint
2018-06-04 17:51:15 -04:00
Jan Edmund Lazo
21aa4bc428
vim-patch:8.0.0623: error for invalid regexp is not very informative
...
Problem: The message "Invalid range" is used for multiple errors.
Solution: Add two more specific error messages. (Itchyny, Ken Hamada)
966e58e413
2018-06-04 08:44:19 -04:00
KunMing Xie
49a497a67c
vim-patch:8.0.0519: character classes not well tested ( #8460 )
...
Problem: Character classes are not well tested. They can differ between
platforms.
Solution: Add tests. In the documentation make clear which classes depend
on what library function. Only use :cntrl: and :graph: for ASCII.
(Kazunobu Kuriyama, Dominique Pelle, closes vim/vim#1560 )
Update the documentation.
0c078fc7db
2018-06-01 19:57:22 +02:00
ZyX
9ea1752d60
*: Provide list length when allocating lists
2018-01-14 01:33:16 +03:00
ZyX
d2c01d529f
regexp: Fix linter errors
2017-12-23 15:47:04 +03:00
ZyX
7f3b9a4acc
Merge branch 'master' into hide-container-impl
2017-12-16 14:27:41 +03:00
James McCoy
dcb2780b83
lint
2017-12-15 15:57:38 -05:00