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
Daniel Hahler
0e3b9ea74d
includes
2019-08-07 14:21:23 +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
Justin M. Keyes
2731080212
cleanup: remove mch_fopen in favor of os_fopen
2019-07-25 22:32:23 +02: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
Justin M. Keyes
dca0da4e3f
PVS/V501: diff.c: silence warning
...
False positive: vim_fgets has side effects.
ref 8586770e1f
2019-01-18 00:09:50 +01:00
Justin M. Keyes
2d1214ef46
PVS/V501: diff.c: silence warning
...
False positive: vim_fgets has side effects.
ref 8586770e1f
2019-01-05 23:19:23 +01:00
Justin M. Keyes
6a432d4a0d
PVS/V547: diff.c: xmalloc() never returns NULL
...
Normally we consider OOM to be fatal, but the diff module has extra
functionality to handle OOM in case huge files are compared. Use
try_malloc instead of xmalloc in that case.
2019-01-04 02:29:22 +01:00
Justin M. Keyes
a1e97b18f1
PVS/V547: diff.c: Expression is always true
2019-01-04 02:29:17 +01:00
Justin M. Keyes
8586770e1f
PVS/V501: diff.c: silence warning
...
False positive: vim_fgets has side effects.
2019-01-04 02:29:11 +01:00
Anatolii Sakhnik
4e29810817
vim-patch:8.1.0562: parsing of 'diffopt' is slightly wrong
...
Problem: Parsing of 'diffopt' is slightly wrong.
Solution: Fix the parsing and add a test. (Jason Franklin, Christian
Brabandt)
b6fc72851c
2018-12-09 22:19:41 +02:00
Anatolii Sakhnik
f273e43cb8
vim-patch:8.1.0513: no error for set diffopt+=algorithm:
...
Problem: No error for set diffopt+=algorithm:.
Solution: Check for missing argument. (Hirohito Higashi, closes #3598 )
d0721058f4
2018-12-09 22:19:41 +02:00
Anatolii Sakhnik
89eba72792
vim-patch:8.1.0502: internal diff fails when diffing a context diff
...
Problem: Internal diff fails when diffing a context diff. (Hirohito Higashi)
Solution: Only use callback calls with one line. (closes #3581 )
f080d70a82
2018-12-09 22:19:41 +02:00
Anatolii Sakhnik
8f20c22e10
vim-patch:8.1.0497: :%diffput changes order of lines
...
Problem: :%diffput changes order of lines. (Markus Braun)
Solution: Do adjust marks when using internal diff.
5f57bdcab7
2018-12-09 20:05:53 +02:00
Anatolii Sakhnik
e104228b1c
vim-patch:8.1.0458: ml_get error and crash when using "do"
...
Problem: Ml_get error and crash when using "do".
Solution: Adjust cursor position also when diffupdate is not needed.
(Hirohito Higashi)
df77cef92e
2018-12-09 19:55:08 +02:00
Anatolii Sakhnik
fe0114ec41
vim-patch:8.1.0402: the DiffUpdate event isn't triggered for :diffput
...
Problem: The DiffUpdate event isn't triggered for :diffput.
Solution: Also trigger DiffUpdate for :diffget and :diffput.
198fa066b2
2018-12-09 19:45:56 +02:00
Anatolii Sakhnik
271249a48a
vim-patch:8.1.0400: using freed memory with :diffget
...
Problem: Using freed memory with :diffget.
Solution: Skip ex_diffupdate() while updating diffs. (closes #3442 )
d2b58c0a2c
2018-12-09 19:45:56 +02:00
Anatolii Sakhnik
2c92a4d0c8
vim-patch:8.1.0397: no event triggered after updating diffs
...
Problem: No event triggered after updating diffs.
Solution: Add the DiffUpdated event.
e8fa05b5bc
2018-12-09 19:45:56 +02:00
Anatolii Sakhnik
b7f2c7dd1d
vim-patch:8.1.0395: compiler warning on 64-bit MS-Windows
...
Problem: Compiler warning on 64-bit MS-Windows.
Solution: Add type cast. (Mike Williams)
6e272acc82
2018-12-09 19:45:56 +02:00
Anatolii Sakhnik
7b6c92eac1
vim-patch:8.1.0394: diffs are not always updated correctly
...
Problem: Diffs are not always updated correctly.
Solution: When using internal diff update for any changes properly.
e3521d9cbb
2018-12-09 19:45:56 +02:00
Anatolii Sakhnik
972ad11195
vim-patch:8.1.0393: not all white space difference options available
...
Problem: Not all white space difference options available.
Solution: Add "iblank", "iwhiteall" and "iwhiteeol" to 'diffopt'.
785fc6567f
2018-12-09 19:45:56 +02:00
Anatolii Sakhnik
72c5a9db70
vim-patch:8.1.0375: cannot use diff mode with Cygwin diff.exe
...
Problem: Cannot use diff mode with Cygwin diff.exe. (Igor Forca)
Solution: Skip over unrecognized lines in the diff output.
3b8defd0a5
2018-12-09 19:45:56 +02:00
Anatolii Sakhnik
cf1ffa9166
vim-patch:8.1.0360: using an external diff program is slow and inflexible
...
Problem: Using an external diff program is slow and inflexible.
Solution: Include the xdiff library. (Christian Brabandt)
Use it by default.
e828b7621c
vim-patch:8.1.0360
vim-patch:8.1.0364
vim-patch:8.1.0366
vim-patch:8.1.0370
vim-patch:8.1.0377
vim-patch:8.1.0378
vim-patch:8.1.0381
vim-patch:8.1.0396
vim-patch:8.1.0432
2018-12-09 19:45:56 +02:00
ZviRackover
30392b6356
Remove has_mbyte from lines near changes in parent commit
2018-08-16 06:03:49 +03:00
ZviRackover
2bddc4ca54
Remove occurences of mb_head_off
2018-08-15 22:02:33 +03:00
Jan Edmund Lazo
594536a1e7
vim-patch:8.0.1361: some users don't want to diff with hidden buffers
...
Problem: Some users don't want to diff with hidden buffers.
Solution: Add the "hiddenoff" item to 'diffopt'. (Alisue, closes vim/vim#2394 )
97ce419201
2018-08-11 15:06:07 -04:00
Jan Edmund Lazo
90128843f6
diff: drop enc_utf8 check in diff_equal_char()
...
enc_utf8 is always true for nvim.
2018-08-11 14:54:48 -04:00
Jan Edmund Lazo
fd334ec2a8
vim-patch:8.0.1046: code duplication in diff mode
...
Problem: Code duplication in diff mode.
Solution: Use diff_equal_char() also in diff_cmp(). (Rick Howe)
ae96b8d058
2018-08-11 14:54:39 -04:00
Jan Edmund Lazo
4f93d05d39
vim-patch:8.0.1037: "icase" of 'diffopt' is not used for highlighting
...
Problem: "icase" of 'diffopt' is not used for highlighting differences.
Solution: Also use "icase". (Rick Howe)
da22b8cc8b
2018-08-11 14:54:39 -04:00
Jan Edmund Lazo
3de785e7b5
fold: add const to hasFoldingWin() variables
...
cache is bool so update callers to pass true/false, not TRUE/FALSE.
2018-08-02 08:44:42 -04:00
Jan Edmund Lazo
9e20398908
diff: refactor diff_a_works to use TriState
2018-08-01 15:28:44 -04:00
Peter Hodge
edcc73e766
API: Implement buffer updates
...
Originally written by @phodge in
https://github.com/neovim/neovim/pull/5269 .
2018-05-23 22:07:27 +02:00
ZyX
ef57cd81fe
diff: Fix PVS/V547: remove no longer needed OOM handler
2018-04-10 01:12:38 +03:00
Justin M. Keyes
61f9a7b0d0
vim-patch:8.0.0736: OptionSet not triggered when entering diff mode
...
Problem: The OptionSet autocommand event is not triggered when entering
diff mode.
Solution: use set_option_value() instead of setting the option directly.
Change the tests from old to new style. (Christian Brabandt)
04f62f881c
2018-02-11 15:27:56 +01:00
Justin M. Keyes
538361955d
exit: annotate FUNC_ATTR_NORETURN functions #7954 ( #7954 )
...
This should fix a particular false positive from clang 5.0.0 scan-build,
which thinks that nlua_init() can continue after preserve_exit().
2018-02-07 02:32:50 +01:00
KunMing Xie
8728a5d50b
vim-patch:8.0.0448: some macros are lower case ( #7936 )
...
Problem: Some macros are in lower case, which can be confusing.
Solution: Make a few lower case macros upper case.
b5aedf3e22
ref #6297
2018-01-30 20:29:15 +01:00
Justin M. Keyes
6f4c4be952
ex_diffpatch: don't need redraw_later(CLEAR), Nvim uses pipes
2018-01-28 12:33:22 +01:00
Justin M. Keyes
ab279c6fb8
vim-patch:8.0.0444: diffpatch fails when the file name has a quote
...
Problem: Diffpatch fails when the file name has a quote.
Solution: Escape the name properly. (zetzei)
a95ab32120
2018-01-21 12:21:48 +01:00
Justin M. Keyes
456cf72974
vim-patch:8.0.0442: patch shell command not well escaped
...
Problem: Patch shell command uses double quotes around the argument, which
allows for $HOME to be expanded. (Etienne)
Solution: Use single quotes on Unix. (closes vim/vim#1543 )
1ef73e33c9
2018-01-21 12:21:47 +01:00
Justin M. Keyes
9c92eed86f
vim-patch:8.0.0599: diff mode is insufficiently tested
...
Problem: diff mode is insufficiently tested
Solution: Add more test cases. (Dominique Pelle, closes vim/vim#1685 )
79a213d6a4
NA / already applied:
---------------------
vim-patch:8.0.0421: diff mode wrong when adding line at end of buffer
Problem: Diff mode is displayed wrong when adding a line at the end of a
buffer.
Solution: Adjust marks in diff mode. (James McCoy, closes vim/vim#1329 )
f58a8475e1
2018-01-21 12:21:47 +01:00
KunMing Xie
d2cbc31185
Vim-patch 8.0.0300 ( #7258 )
...
vim-patch:8.0.0300
Problem: Cannot stop diffing hidden buffers. (Daniel Hahler)
Solution: When using :diffoff! make the whole list if diffed buffers empty.
(closes vim/vim#736 )
25ea054458
2017-09-11 10:17:41 -04:00
ckelsel
8dddf55907
vim-patch:8.0.0044
...
Problem: In diff mode the cursor may end up below the last line, resulting
in an ml_get error.
Solution: Check the line to be valid.
025e3e0baf
2017-08-16 12:48:58 -04:00
Björn Linse
8b375cf471
bufhl: fix move
2017-06-24 11:09:10 +02:00
ZyX
c2f3e361c5
*: Add comment to all C files
2017-04-19 19:11:50 +03:00
ZyX
a096766ee3
diff: Silence -V519
...
Not exactly a false positive, but previous assignment is a part of the pattern
“change global, run code which uses it, change global back”.
2017-04-16 19:27:17 +03:00
ZyX
e18a578308
*: Move some dictionary functions to typval.h and use char*
...
Also fixes buffer reusage in setmatches() and complete().
2017-03-29 10:07:42 +03:00
lonerover
3de3340132
vim-patch:7.4.2135
...
Problem: Various tiny issues.
Solution: Update comments, white space, etc.
89eaa4185e
2017-03-11 18:26:03 +08:00
lonerover
67eae93557
vim-patch:7.4.2279
...
Problem: Starting diff mode with the cursor in the last line might end up
only showing one closed fold. (John Beckett)
Solution: Scroll the window to show the same relative cursor position.
46328f9a1c
2017-02-09 08:24:43 +08:00
lonerover
7629176fb1
vim-patch:7.4.2275
...
Problem: ":diffoff!" does not remove filler lines.
Solution: Force a redraw and invalidate the cursor. (closes vim/vim#1014 )
e67d546f3c
2017-02-07 15:47:28 +08:00
Marco Hinz
c05e7f0fdd
vim-patch:7.4.2024
...
Problem: More buf_valid() calls can be optimized.
Solution: Use bufref_valid() instead.
NOTE: Some changes related to channels and the Python and Netbeans interfaces
were obviously left out.
7c0a2f367f
2017-02-04 17:55:46 -05:00