0
0
mirror of https://github.com/vim/vim.git synced 2025-07-04 23:07:33 -04:00

91 Commits

Author SHA1 Message Date
Hirohito Higashi
20393bc02d
runtime(doc): update last change date for diff.txt
related: #16997

Signed-off-by: Hirohito Higashi <h.east.727@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-03-30 15:39:41 +02:00
zeertzjq
5a307c361c
patch 9.1.1252: typos in code and docs related to 'diffopt' "inline:"
Problem:  Typos in code and docs related to 'diffopt' "inline:".
          (after v9.1.1243)
Solution: Fix typos and slightly improve the docs.
          (zeertzjq)

closes: #16997

Signed-off-by: zeertzjq <zeertzjq@outlook.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-03-28 19:04:06 +01:00
Yee Cheng Chin
9943d4790e
patch 9.1.1243: diff mode is lacking for changes within lines
Problem:  Diff mode's inline highlighting is lackluster. It only
          performs a line-by-line comparison, and calculates a single
          shortest range within a line that could encompass all the
          changes. In lines with multiple changes, or those that span
          multiple lines, this approach tends to end up highlighting
          much more than necessary.

Solution: Implement new inline highlighting modes by doing per-character
          or per-word diff within the diff block, and highlight only the
          relevant parts, add "inline:simple" to the defaults (which is
          the old behaviour)

This change introduces a new diffopt option "inline:<type>". Setting to
"none" will disable all inline highlighting, "simple" (the default) will
use the old behavior, "char" / "word" will perform a character/word-wise
diff of the texts within each diff block and only highlight the
differences.

The new char/word inline diff only use the internal xdiff, and will
respect diff options such as algorithm choice, icase, and misc iwhite
options. indent-heuristics is always on to perform better sliding.

For character highlight, a post-process of the diff results is first
applied before we show the highlight. This is because a naive diff will
create a result with a lot of small diff chunks and gaps, due to the
repetitive nature of individual characters. The post-process is a
heuristic-based refinement that attempts to merge adjacent diff blocks
if they are separated by a short gap (1-3 characters), and can be
further tuned in the future for better results. This process results in
more characters than necessary being highlighted but overall less visual
noise.

For word highlight, always use first buffer's iskeyword definition.
Otherwise if each buffer has different iskeyword settings we would not
be able to group words properly.

The char/word diffing is always per-diff block, not per line, meaning
that changes that span multiple lines will show up correctly.
Added/removed newlines are not shown by default, but if the user has
'list' set (with "eol" listchar defined), the eol character will be be
highlighted correctly for the specific newline characters.

Also, add a new "DiffTextAdd" highlight group linked to "DiffText" by
default. It allows color schemes to use different colors for texts that
have been added within a line versus modified.

This doesn't interact with linematch perfectly currently. The linematch
feature splits up diff blocks into multiple smaller blocks for better
visual matching, which makes inline highlight less useful especially for
multi-line change (e.g. a line is broken into two lines). This could be
addressed in the future.

As a side change, this also removes the bounds checking introduced to
diff_read() as they were added to mask existing logic bugs that were
properly fixed in #16768.

closes: #16881

Signed-off-by: Yee Cheng Chin <ychin.git@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-03-26 19:46:09 +01:00
Yegappan Lakshmanan
a0010a186d
patch 9.1.0099: Not able to use diff() with 'diffexpr'
Problem:  Not able to use diff() with 'diffexpr'
          (rickhowe, after v9.1.0096)
Solution: Use a default context length of 0, update diff() help text,
          add a test for using diff() with 'diffexpr'
          (Yegappan Lakshmanan)

closes: #14013

Signed-off-by: Yegappan Lakshmanan <yegappan@yahoo.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-02-12 20:24:56 +01:00
Yegappan Lakshmanan
fa37835b8c
patch 9.1.0071: Need a diff() Vim script function
Problem:  Need a diff() Vim script function
Solution: Add the diff() Vim script function using the
          xdiff internal diff library, add support for
          "unified" and "indices" mode.
          (Yegappan Lakshmanan)

fixes: #4241
closes: #12321

Signed-off-by: Yegappan Lakshmanan <yegappan@yahoo.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-02-01 22:05:27 +01:00
Christian Brabandt
b4ddc6c11e
patch 9.1.0000: Vim 9.1 release
Problem:  Need a new release
Solution: Release Vim 9.1

Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-01-02 16:51:11 +01:00
Bram Moolenaar
71badf9547 Update runtime files 2023-04-22 22:40:14 +01:00
Bram Moolenaar
938ae280c7 Update runtime files. 2023-02-20 20:44:55 +00:00
Bram Moolenaar
be4e01637e Update runtime files. 2023-02-02 13:59:48 +00:00
Bram Moolenaar
f1dcd14fc5 Update runtime files 2022-12-31 15:30:45 +00:00
Bram Moolenaar
f269eabc6c Update runtime files 2022-10-03 18:04:35 +01:00
Bram Moolenaar
a4e0b9785e patch 9.0.0634: evaluating "expr" options has more overhead than needed
Problem:    Evaluating "expr" options has more overhead than needed.
Solution:   Use call_simple_func() for 'foldtext', 'includeexpr', 'printexpr',
            "expr" of 'spellsuggest', 'diffexpr', 'patchexpr', 'balloonexpr',
            'formatexpr', 'indentexpr' and 'charconvert'.
2022-10-01 19:43:52 +01:00
Bram Moolenaar
eb49041875 release version 9.0
Problem:    About time to release Vim 9.0.
Solution:   Update the version number everywhere.
2022-06-28 13:44:46 +01:00
Bram Moolenaar
c51cf03298 Update runtime files. 2022-02-26 12:25:45 +00:00
Bram Moolenaar
6f4754b9f7 Update runtime files 2022-01-23 12:07:04 +00:00
Yegappan Lakshmanan
8bb65f230d patch 8.2.3900: it is not easy to use a script-local function for an option
Problem:    It is not easy to use a script-local function for an option.
Solution:   recognize s: and <SID> at the start of the expression. (Yegappan
            Lakshmanan, closes #9401)
2021-12-26 10:51:39 +00:00
Bram Moolenaar
d2ea7cf10a Update runtime files 2021-05-30 20:54:13 +02:00
Bram Moolenaar
942db23c9c Update runtime files 2021-02-13 18:14:48 +01:00
Bram Moolenaar
4223d43c0f patch 8.2.2490: 'wrap' option is always reset when starting diff mode
Problem:    'wrap' option is always reset when starting diff mode.
Solution:   Add the "followwrap" item in 'diffopt'. (Rick Howe, closes #7797)
2021-02-10 13:18:17 +01:00
Bram Moolenaar
98056533b9 Vim 8.2 release 2019-12-12 14:18:35 +01:00
Bram Moolenaar
5ef1c6a483 Update runtime files 2019-11-10 22:09:11 +01:00
Bram Moolenaar
5477506a9f Update runtime files. 2019-07-31 21:07:14 +02:00
Bram Moolenaar
61da1bfa6c Update runtime files. 2019-06-06 12:14:49 +02:00
Bram Moolenaar
25c9c680ec patch 8.1.1280: remarks about functionality not in Vi clutters the help
Problem:    Remarks about functionality not in Vi clutters the help.
Solution:   Move all info about what is new in Vim or already existed in Vi to
            vi_diff.txt.  Remove {not in Vi} remarks. (closes #4268) Add
            "noet" to the help files modeline.  Also include many other help
            file improvements.
2019-05-05 18:13:34 +02:00
Bram Moolenaar
26967617a3 Update runtime files. 2019-03-17 17:13:16 +01:00
Bram Moolenaar
e828b7621c 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, closes #2732)
            Use it by default.
2018-09-10 17:51:58 +02:00
Bram Moolenaar
d473c8c101 Update runtime files. 2018-08-11 18:00:22 +02:00
Bram Moolenaar
91f84f6e11 Update runtime files. 2018-07-29 15:07:52 +02:00
Bram Moolenaar
b1c9198afb Vim 8.1 release
Update version number and information.  Fix a couple of tests.
2018-05-17 17:04:55 +02:00
Bram Moolenaar
01164a6546 Long overdue runtime update. 2017-11-02 22:58:42 +01:00
Bram Moolenaar
24a98a0eb7 Update runtime files 2017-09-27 22:23:55 +02:00
Bram Moolenaar
37c64c78fd Update runtime files. 2017-09-19 22:06:03 +02:00
Bram Moolenaar
3df0173fa6 Updated runtime files. 2017-02-17 22:47:16 +01:00
Bram Moolenaar
bb76f24af2 Vim 8.0 release 2016-09-12 14:24:39 +02:00
Bram Moolenaar
015efc32c1 patch 7.4.2251
Problem:    In rare cases diffing 4 buffers is not enough.
Solution:   Raise the limit to 8. (closes #1000)
2016-08-24 22:34:33 +02:00
Bram Moolenaar
b4ff518d95 Updated runtime files. 2015-11-10 21:15:48 +01:00
Bram Moolenaar
86ae720d75 Updated runtime files. 2015-07-10 19:31:35 +02:00
Bram Moolenaar
0122c4070f Update runtime files. 2015-02-03 19:13:34 +01:00
Bram Moolenaar
32efaf6154 Update runtime files. 2014-11-05 17:02:17 +01:00
Bram Moolenaar
13600303c5 Runtime file updates. 2014-05-22 18:26:40 +02:00
Bram Moolenaar
baca7f705b Update runtime files. Add support for J. 2013-09-22 14:42:24 +02:00
Bram Moolenaar
3b1db36689 release version 7.4 2013-08-10 15:00:24 +02:00
Bram Moolenaar
1a42b4befb Update files for the 7.4b BETA release. 2013-07-28 18:29:08 +02:00
Bram Moolenaar
dd007ed585 Updated runtime files. Fix NL translations. 2013-07-09 15:44:17 +02:00
Bram Moolenaar
913df81e74 Vim 7.4a BETA release. 2013-07-06 15:44:11 +02:00
Bram Moolenaar
fa13eef3c9 Updated runtime files. 2013-02-06 17:34:04 +01:00
Bram Moolenaar
d09acef44b Updated runtime files. 2012-09-21 14:54:30 +02:00
Bram Moolenaar
9b4512500a Update runtime files. 2012-08-15 17:43:31 +02:00
Bram Moolenaar
8e52a59376 Fix more 'cpo' issues in runtime files. 2012-05-18 21:49:28 +02:00
Bram Moolenaar
bd1d560895 updated for version 7.3.523
Problem:    ":diffupdate" doesn't check for files changed elsewhere.
Solution:   Add the ! flag. (Christian Brabandt)
2012-05-18 18:47:17 +02:00