Jan Edmund Lazo
00e882e6f6
vim-patch:8.1.1394: not restoring t_F2 in registers test
...
Problem: Not restoring t_F2 in registers test.
Solution: Assign to &t_F2 instead of t_F2. (Andy Massimino, closes vim/vim#4434 )
a5e44600eb
2019-07-28 22:05:51 -04:00
Jan Edmund Lazo
c53e78e125
vim-patch:8.1.1005: test fails because t_F2 is not set
...
Problem: Test fails because t_F2 is not set.
Solution: Add try-catch.
55d81cd2a1
2019-07-28 22:05:51 -04:00
Ihor Antonov
1c74c7c446
lint: makemap
...
* if braces
* spaces
* post increments
* comment style
2019-07-28 21:10:49 -04:00
Ihor Antonov
ed5f891e83
pvs/V560: part of conditional expression is always false
...
makemap: same condition is used to skip outer loop cycle
2019-07-28 20:48:44 -04:00
Justin M. Keyes
caa8c06bae
vim-patch:8.1.1138: add CompleteChanged #10644
...
(This was originally a Neovim patch, but this commit merges some changes
from the Vim patch.)
d7f246c68c
2019-07-29 02:36:46 +02:00
erw7
505f47403b
vim-patch:8.1.0017: shell command completion has duplicates #10616
...
Problem: Shell command completion has duplicates. (Yegappan Lakshmanan)
Solution: Use a hash table to avoid duplicates. (Ozaki Kiichi, closes vim/vim#539 , closes vim/vim#2733 )
62fe66f251
2019-07-29 01:25:54 +02:00
Bartosz Miera
16727dcf1e
clang/"dead assignments" #10620
...
Also revert possibly-wrong change in f_sign_getplaced() from
652be3cb00
.
2019-07-29 00:52:24 +02:00
Jit
7cc2b723d4
TextYankPost: spurious/too-early dispatch during delete #10392
...
Problem: delete-with-register dispatches TextYankPost before updating yank registers
Solution: Add flag to op_yank().
Fixes #10225
2019-07-29 00:50:11 +02:00
Justin M. Keyes
4213492231
Merge #10643 from janlazo/vim-8.1.1765
...
vim-patch:8.1.{990,992,1765}
2019-07-29 00:34:47 +02:00
Ihor Antonov
00d915d021
PVS/V547: expression is always true/false #10640
...
Functions marked with FUNC_ATTR_NONNULL_RET do not return NULL.
Remove redundant checks.
2019-07-29 00:11:54 +02:00
Jan Edmund Lazo
b457a58e34
vim-patch:8.1.0990: floating point exception with "%= 0" and "/= 0"
...
Problem: Floating point exception with "%= 0" and "/= 0".
Solution: Avoid dividing by zero. (Dominique Pelle, closes vim/vim#4058 )
e21c1580b7
2019-07-28 17:19:20 -04:00
Ihor Antonov
f5b5f60b86
PVS/V512: memcpy overflow/underflow #10642
...
problem: bfredl: pvs thinks the type of the pointed
at item is too small.
solution: refactored address calculation.
2019-07-28 23:05:18 +02:00
Jan Edmund Lazo
98d389ce55
vim-patch:8.1.1765: get(func, dict, def) does not work properly
...
Problem: get(func, dict, def) does not work properly.
Solution: Handle NULL dict better. (Takuya Fujiwara, closes vim/vim#4734 )
f91aac5e3e
2019-07-28 16:11:54 -04:00
Ihor Antonov
fe2ada7375
PVS/V560: condition is always false #10638
...
* shorten_buf_name: condition inside outer if-branch with inverse condition
2019-07-28 21:28:53 +02:00
Ihor Antonov
3b82c075b3
vim-patch:8.0.1753: fix various warnings #10639
...
vim-patch:8.0.1753: various warnings from a static analyser
Problem: Various warnings from a static analyser
Solution: Remove unneeded conditions.
1c17ffa461
2019-07-28 21:26:17 +02:00
Justin M. Keyes
6953e151bb
context: shada_encode_regs(): init WriteMergerState #10637
...
- Check shada_pack_xx() result, abort on failure.
- Use xcalloc() to zero-initialize `wms`, fixes below ASAN failure.
ASAN failure (running vim_spec.lua in a loop):
../src/nvim/shada.c:1773:13: runtime error: load of value 224, which is not a valid value for type 'bool'
SUMMARY: UndefinedBehaviorSanitizer: undefined-behavior ../src/nvim/shada.c:1773:13
Adding an explicit check just before the ASAN failed line:
case kSDItemRegister: {
if (*((int *)(void *)&entry.data.reg.is_unnamed) != 1
&& *((int *)(void *)&entry.data.reg.is_unnamed) != 0) {
abort();
(gdb) p entry.data.reg
+p entry.data.reg
$5 = {name = 49 '1', type = kMTLineWise, contents = 0x60200000c250, is_unnamed = true, contents_size = 1, width = 0, additional_data = 0x0}
(gdb) p *((uint8_t *)(void *)&entry.data.reg.is_unnamed)
+p *((uint8_t *)(void *)&entry.data.reg.is_unnamed)
$7 = 2049
2019-07-28 19:39:03 +02:00
Ihor Antonov
cfa2759df6
PVS/V560: expression is always false/true #10623
2019-07-28 17:58:24 +02:00
Daniel Hahler
05fa1cb3f4
src/clint.py: flake8 fixes [ci skip] ( #10631 )
2019-07-28 11:48:24 +02:00
Justin M. Keyes
b5c44b66eb
Merge #10628 from notomo/vim-8.1.1759
2019-07-28 11:15:30 +02:00
Ihor Antonov
e0f2c36667
PVS/V560: condition is always true #10630
...
earlier condition leads to short-circuit of the loop
2019-07-28 11:08:41 +02: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
Ihor Antonov
5b47ee5b7a
pvs/V560: part of conditional expression is always true ( #10629 )
...
Since timed_out is pointer to int condition timed_out != NULL && timed_out makes no sense as both are effectively the same thing. Most likely the first check was meant to guard the dereference of the second.
Wrong import of Vim patch (8.0.0643).
2019-07-28 05:16:14 +02:00
notomo
32a6b5601b
Fix clint error
2019-07-28 09:22:46 +09:00
notomo
08c7e206cc
vim-patch:8.1.1759: no mode char for terminal mapping from maparg()
...
Problem: No mode char for terminal mapping from maparg().
Solution: Check for TERMINAL mode. (closes vim/vim#4735 )
14371ed697
2019-07-28 08:00:52 +09:00
cangscop
dedcd3ad1e
vim-patch:8.1.0053 use typval_T in the caller of call_vim_function
...
Problem: unreliable types for complete function arguments
Solution: fix argument type for functions w/ unreliable type conversion(Ozaki Kiichi)
vim/vim#2993
2019-07-28 00:19:41 +02:00
Daniel Hahler
7f5a113f65
vim-patch:8.1.1748: :args output is not aligned ( #10625 )
...
Problem: :args output is not aligned.
Solution: Output a line break after the last item in a row.
74da39373c
vim-patch:8.1.1750: depending on the terminal width :version may miss a line break
Problem: Depending on the terminal width :version may miss a line break.
Solution: Add a line break when needed.
8a5c29aee9
vim-patch:8.1.1760: extra line break for wrapping output of :args
Problem: Extra line break for wrapping output of :args.
Solution: Avoid the extra line break. (Daniel Hahler, closes vim/vim#4737 )
9800bfe0fc
2019-07-27 23:48:32 +02:00
Justin M. Keyes
8e6b0a73c9
Merge #10619 'API: context'
2019-07-27 22:56:05 +02:00
Abdelhakeem
b6278bbf12
API: Context: save/restore
2019-07-27 22:14:58 +02:00
Jan Edmund Lazo
0e23ee3cc7
vim-patch:8.1.0956: context:0 in 'diffopt' #10622
...
Problem: Using context:0 in 'diffopt' does not work well.
Solution: Make zero context do the same as one line context. (closes vim/vim#4005 )
b9ddda6c2d
2019-07-27 20:33:33 +02:00
Abdelhakeem
691deca2e8
eval: context: add ctx-family functions
2019-07-27 16:36:56 +02:00
Justin M. Keyes
411a06c8b6
API: Context
2019-07-27 16:36:57 +02:00
cangscop
0364e47ccb
vim-patch:8.1.53 use typval_T in the caller of call_vim_function
...
Problem: unreliable types for complete function arguments
Solution: fix argument type for functions w/ unreliable type conversion(Ozaki Kiichi)
vim/vim#2993
2019-07-27 16:25:33 +02:00
Daniel Hahler
709e87792f
tests: test_arglist.vim: align with Vim [ci skip] ( #10612 )
...
This just moves the test to where it is in Vim.
2019-07-27 01:47:12 +02:00
Justin M. Keyes
af01b347d8
Merge #10606 'vim-patch:8.1.0404'
2019-07-27 01:33:58 +02:00
Jan Edmund Lazo
2b731a388a
vim-patch:8.1.1747: unused variables #10605
...
Problem: Compiler warning for unused variables. (Tony Mechelynck)
Solution: Add #ifdef.
fbfb757d4c
2019-07-26 11:21:44 +02:00
Jan Edmund Lazo
0fb05b2c7d
Revert "vim-patch:8.1.0430: Xargadd file left behind after running test"
...
This reverts commit ce1b4f95fe
.
2019-07-26 05:19:05 -04:00
Jan Edmund Lazo
cbda383efe
vim-patch:8.1.0404: accessing invalid memory with long argument name
...
Problem: Accessing invalid memory with long argument name.
Solution: Use item_count instead of checking for a terminating NULL.
(Dominique Pelle, closes vim/vim#3444 )
e961cba3cb
2019-07-26 05:19:05 -04:00
Justin M. Keyes
2731080212
cleanup: remove mch_fopen in favor of os_fopen
2019-07-25 22:32:23 +02:00
Justin M. Keyes
bb3a0099c6
os/fs: introduce os_fopen()
...
Windows: Using fopen() directly may need UTF-16 filepath conversion. To
achieve that, os_fopen() goes through os_open().
fix #10586
2019-07-25 22:32:23 +02:00
Ihor Antonov
8a9c9a9963
PVS/V768: do use enum as bool #10582
...
Fix win_draw_end invocation, pass HLF symbol explicitly.
2019-07-25 21:57:58 +02:00
Jan Edmund Lazo
0925afcfcf
regexp: add function attributes
2019-07-25 03:34:26 -04:00
Jan Edmund Lazo
98fcf66b7a
vim-patch:8.1.0913: CI crashes when running out of memory
...
Problem: CI crashes when running out of memory.
Solution: Apply 'maxmempattern' also to new regexp engine.
688b3983d8
2019-07-25 03:02:22 -04:00
Jan Edmund Lazo
52488ea6fb
vim-patch:8.1.0910: crash with tricky search pattern
...
Problem: Crash with tricky search pattern. (Kuang-che Wu)
Solution: Check for runnning out of memory. (closes vim/vim#3950 )
15bbd6ec87
2019-07-25 02:39:24 -04:00
Jan Edmund Lazo
fb059a1741
vim-patch:8.1.0907: CI tests on AppVeyor are failing
...
Problem: CI tests on AppVeyor are failing.
Solution: Reduce the recursiveness limit for regexp.
5382f12c91
2019-07-25 02:21:32 -04:00
Jan Edmund Lazo
a77e5b3606
vim-patch:8.1.0905: complicated regexp causes a crash
...
Problem: Complicated regexp causes a crash. (Kuang-che Wu)
Solution: Limit the recursiveness of addstate(). (closes vim/vim#3941 )
5567ad48b6
2019-07-25 02:04:32 -04:00
Jan Edmund Lazo
8e490b98cc
regexp: use fixed types to avoid overflow
2019-07-24 21:50:16 -04:00
Gabriel
33ce6a7f62
Checks for overflow when parsing string to int
2019-07-24 21:43:04 -04:00
Jan Edmund Lazo
43f4e5d5be
vim-patch:8.1.0908: can't handle large value for %{nr}v in regexp
...
Problem: Can't handle large value for %{nr}v in regexp. (Kuang-che Wu)
Solution: Give an error if the value is too large. (closes vim/vim#3948 )
9403a2168d
2019-07-24 21:43:04 -04:00
Jan Edmund Lazo
9ea449085d
vim-patch:8.1.1746: ":dl" is seen as ":dlist" instead of ":delete"
...
Problem: ":dl" is seen as ":dlist" instead of ":delete".
Solution: Do not use cmdidxs2[] if the length is 1. (closes vim/vim#4721 )
94f82cbacf
2019-07-24 21:43:04 -04: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