Skip to content

Commit 033e134

Browse files
authored
Merge pull request #2018 from h-east/update-diff
Update diff.{txt,jax}
2 parents b2098c5 + b92f3fb commit 033e134

File tree

2 files changed

+45
-10
lines changed

2 files changed

+45
-10
lines changed

doc/diff.jax

+22-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
*diff.txt* For Vim バージョン 9.1. Last change: 2024 Feb 01
1+
*diff.txt* For Vim バージョン 9.1. Last change: 2025 Mar 28
22

33

44
VIMリファレンスマニュアル by Bram Moolenaar
@@ -233,6 +233,27 @@ Vimは片方のウィンドウには存在しないがもう一方には存在
233233
だったとしても強調されることを意味する。ここで
234234
'diffopt' の "iwhite" と "icase" が適用され
235235
る。
236+
|hl-DiffText| DiffText 変更された行内の変更されたテキスト。正確な動作
237+
は、'diffopt'`inline:` 設定によって異なる。
238+
`inline:` が "simple" に設定されている場合、
239+
Vim は異なる最初の文字と異なる最後の文字を検索
240+
する (行末から検索する)。その間のテキストがハ
241+
イライトされる。つまり、中間の同じ部分はとにか
242+
くハイライトされる。ここでは、'diffopt' フラグ
243+
の "iwhite" と "icase" が使用される。
244+
`inline:` が "char" または "word" に設定されて
245+
いる場合、Vim は内部 diff ライブラリを使用し
246+
て、変更されたブロック間の詳細な diff を実行
247+
し、2 つのブロック間の正確な違いをハイライトす
248+
る。内部 diff に影響する 'diffopt' フラグを尊
249+
重する。
250+
`inline:` が "none" に設定されている場合は使用
251+
されない。
252+
|hl-DiffTextAdd| DiffTextAdd 変更された行内に追加されたテキスト。DiffText
253+
に似ているが、他のバッファに対応するテキストが
254+
ない場合に使用される。`inline:` が "simple" ま
255+
たは "none" に設定されている場合は使用されな
256+
い。
236257
|hl-DiffDelete| DiffDelete 削除された行。補充された行についても、実際その
237258
バッファには存在していないことから、このグルー
238259
プが適用される。

en/diff.txt

+23-9
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
*diff.txt* For Vim version 9.1. Last change: 2024 Feb 01
1+
*diff.txt* For Vim version 9.1. Last change: 2025 Mar 28
22

33

44
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -226,14 +226,28 @@ The diffs are highlighted with these groups:
226226
|hl-DiffAdd| DiffAdd Added (inserted) lines. These lines exist in
227227
this buffer but not in another.
228228
|hl-DiffChange| DiffChange Changed lines.
229-
|hl-DiffText| DiffText Changed text inside a Changed line. Vim
230-
finds the first character that is different,
231-
and the last character that is different
232-
(searching from the end of the line). The
233-
text in between is highlighted. This means
234-
that parts in the middle that are still the
235-
same are highlighted anyway. The 'diffopt'
236-
flags "iwhite" and "icase" are used here.
229+
|hl-DiffText| DiffText Changed text inside a Changed line. Exact
230+
behavior depends on the `inline:` setting in
231+
'diffopt'.
232+
With `inline:` set to "simple", Vim finds the
233+
first character that is different, and the
234+
last character that is different (searching
235+
from the end of the line). The text in
236+
between is highlighted. This means that parts
237+
in the middle that are still the same are
238+
highlighted anyway. The 'diffopt' flags
239+
"iwhite" and "icase" are used here.
240+
With `inline:` set to "char" or "word", Vim
241+
uses the internal diff library to perform a
242+
detailed diff between the changed blocks and
243+
highlight the exact difference between the
244+
two. Will respect any 'diffopt' flag that
245+
affects internal diff.
246+
Not used when `inline:` is set to "none".
247+
|hl-DiffTextAdd| DiffTextAdd Added text inside a Changed line. Similar to
248+
DiffText, but used when there is no
249+
corresponding text in other buffers. Not used
250+
when `inline:` is set to "simple" or "none".
237251
|hl-DiffDelete| DiffDelete Deleted lines. Also called filler lines,
238252
because they don't really exist in this
239253
buffer.

0 commit comments

Comments
 (0)