Jan Edmund Lazo
73dc9e943c
vim-patch:8.1.2378: using old C style comments
...
Problem: Using old C style comments.
Solution: Use // comments where appropriate.
5d18efecfd
2020-04-12 15:56:40 -04:00
Justin M. Keyes
f8f41d088b
diff.c: fix sprintf call
...
fix #11975
2020-03-03 00:26:21 -08:00
Matthieu Coudron
1a2be57da3
foldcolumn: allow auto:X
...
Similar to signcolumn, allow foldcolumn to adapt itself to the number of
folds.
Regression:
vim supports a maximum fdc of 12, this limits it to 9.
2020-02-29 20:27:22 +01:00
erw7
4813ad48cd
vim-patch:8.1.0027: difficult to make a plugin that feeds a line to a job
...
Problem: Difficult to make a plugin that feeds a line to a job.
Solution: Add the nitial code for the "prompt" buftype.
f273245f64
2020-02-12 15:16:32 +09:00
Björn Linse
ca1a00edd6
extmarks/bufhl: reimplement using new marktree data structure
...
Add new "splice" interface for tracking buffer changes at the byte
level. This will later be reused for byte-resolution buffer updates.
(Implementation has been started, but using undocumented "_on_bytes"
option now as interface hasn't been finalized).
Use this interface to improve many edge cases of extmark adjustment.
Changed tests indicate previously incorrect behavior. Adding tests for
more edge cases will be follow-up work (overlaps on_bytes tests)
Don't consider creation/deletion of marks an undoable event by itself.
This behavior was never documented, and imposes complexity for little gain.
Add nvim__buf_add_decoration temporary API for direct access to the new
implementation. This should be refactored into a proper API for
decorations, probably involving a huge dict.
fixes #11598
2020-01-16 12:36:10 +01:00
Jan Edmund Lazo
b83027858a
vim-patch:8.1.2289: after :diffsplit closing the window does not disable diff
...
Problem: After :diffsplit closing the window does not disable diff.
Solution: Add "closeoff" to 'diffopt' and add it to the default.
c823477979
2019-11-16 16:40:25 -05:00
Jan Edmund Lazo
7274f5c177
vim-patch:8.1.1922: in diff mode global operations can be very slow
...
Problem: In diff mode global operations can be very slow.
Solution: Do not call diff_redraw() many times, call it once when redrawing.
And also don't update folds multiple times.
4f57eefe1e
2019-11-16 16:40:24 -05:00
timeyyy
a9065a5051
nsmarks: initial commit
2019-11-11 19:43:15 +01:00
Jan Edmund Lazo
97cdfdcde2
Remove dead code
2019-10-06 21:22:02 -04:00
Jan Edmund Lazo
09232958ff
vim-patch:8.1.2120: some MB_ macros are more complicated than necessary
...
Problem: Some MB_ macros are more complicated than necessary. (Dominique
Pelle)
Solution: Simplify the macros. Expand inline.
1614a14901
2019-10-06 21:11:38 -04: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
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