diff --git a/doc/diff.jax b/doc/diff.jax index 25797f769..8f2ee6b0c 100644 --- a/doc/diff.jax +++ b/doc/diff.jax @@ -1,4 +1,4 @@ -*diff.txt* For Vim バージョン 9.1. Last change: 2024 Feb 01 +*diff.txt* For Vim バージョン 9.1. Last change: 2025 Mar 28 VIMリファレンスマニュアル by Bram Moolenaar @@ -233,6 +233,27 @@ Vimは片方のウィンドウには存在しないがもう一方には存在 だったとしても強調されることを意味する。ここで は 'diffopt' の "iwhite" と "icase" が適用され る。 +|hl-DiffText| DiffText 変更された行内の変更されたテキスト。正確な動作 + は、'diffopt' の `inline:` 設定によって異なる。 + `inline:` が "simple" に設定されている場合、 + Vim は異なる最初の文字と異なる最後の文字を検索 + する (行末から検索する)。その間のテキストがハ + イライトされる。つまり、中間の同じ部分はとにか + くハイライトされる。ここでは、'diffopt' フラグ + の "iwhite" と "icase" が使用される。 + `inline:` が "char" または "word" に設定されて + いる場合、Vim は内部 diff ライブラリを使用し + て、変更されたブロック間の詳細な diff を実行 + し、2 つのブロック間の正確な違いをハイライトす + る。内部 diff に影響する 'diffopt' フラグを尊 + 重する。 + `inline:` が "none" に設定されている場合は使用 + されない。 +|hl-DiffTextAdd| DiffTextAdd 変更された行内に追加されたテキスト。DiffText + に似ているが、他のバッファに対応するテキストが + ない場合に使用される。`inline:` が "simple" ま + たは "none" に設定されている場合は使用されな + い。 |hl-DiffDelete| DiffDelete 削除された行。補充された行についても、実際その バッファには存在していないことから、このグルー プが適用される。 diff --git a/en/diff.txt b/en/diff.txt index e3abbdeff..81564664e 100644 --- a/en/diff.txt +++ b/en/diff.txt @@ -1,4 +1,4 @@ -*diff.txt* For Vim version 9.1. Last change: 2024 Feb 01 +*diff.txt* For Vim version 9.1. Last change: 2025 Mar 28 VIM REFERENCE MANUAL by Bram Moolenaar @@ -226,14 +226,28 @@ The diffs are highlighted with these groups: |hl-DiffAdd| DiffAdd Added (inserted) lines. These lines exist in this buffer but not in another. |hl-DiffChange| DiffChange Changed lines. -|hl-DiffText| DiffText Changed text inside a Changed line. Vim - finds the first character that is different, - and the last character that is different - (searching from the end of the line). The - text in between is highlighted. This means - that parts in the middle that are still the - same are highlighted anyway. The 'diffopt' - flags "iwhite" and "icase" are used here. +|hl-DiffText| DiffText Changed text inside a Changed line. Exact + behavior depends on the `inline:` setting in + 'diffopt'. + With `inline:` set to "simple", Vim finds the + first character that is different, and the + last character that is different (searching + from the end of the line). The text in + between is highlighted. This means that parts + in the middle that are still the same are + highlighted anyway. The 'diffopt' flags + "iwhite" and "icase" are used here. + With `inline:` set to "char" or "word", Vim + uses the internal diff library to perform a + detailed diff between the changed blocks and + highlight the exact difference between the + two. Will respect any 'diffopt' flag that + affects internal diff. + Not used when `inline:` is set to "none". +|hl-DiffTextAdd| DiffTextAdd Added text inside a Changed line. Similar to + DiffText, but used when there is no + corresponding text in other buffers. Not used + when `inline:` is set to "simple" or "none". |hl-DiffDelete| DiffDelete Deleted lines. Also called filler lines, because they don't really exist in this buffer.