Skip to content

Commit 29aa0c0

Browse files
authored
Merge pull request #2109 from h-east/update-diff
Update diff.{txt,jax}
2 parents fbf4c52 + c826ca8 commit 29aa0c0

File tree

2 files changed

+24
-20
lines changed

2 files changed

+24
-20
lines changed

doc/diff.jax

Lines changed: 12 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
*diff.txt* For Vim バージョン 9.1. Last change: 2025 Mar 28
1+
*diff.txt* For Vim バージョン 9.1. Last change: 2025 Jun 20
22

33

44
VIMリファレンスマニュアル by Bram Moolenaar
@@ -310,18 +310,20 @@ Vimは片方のウィンドウには存在しないがもう一方には存在
310310
として用いられる。
311311

312312

313-
[range]が与えられない場合にはカーソルの位置かその上の差分が適用される。[range]
314-
が使われた時にはその範囲だけを適用(put/get)しようと試みる。削除された場合には
315-
必ずしも可能なわけではない。
313+
[range] が指定されていない場合、カーソル位置またはそのすぐ上の差分が影響を受け
314+
る。バッファの最終行の下に削除された行がある場合がある。カーソルがバッファの最
315+
終行にあり、その行より上に差分がなく、[range] が指定されていない場合は、カーソ
316+
ル位置より下の差分が代わりに使用される。
316317

317-
バッファの最後の行のさらに下方に削除された行があることも考えられる。そのとき
318-
カーソルが最終行にあり、最終行より上に差異がないとき、":diffget" と "do" コマ
319-
ンドはそれらの行を取得する
318+
[range] を使用すると、Vim は指定された行のみを put または get しようとする。削
319+
除された行がある場合、それらの行が [range] で指定された行の間にある場合にのみ
320+
使用される
320321

321-
超えた位置の行をもう一方のバッファから取得するには、最終行+1の行番号を指定す
322-
る。次のコマンドはもう一方のバッファから完全な差分情報を受け取る: >
322+
[range] 内の行を別のバッファに送ったり、別のバッファから取得したりするには、0
323+
と最終行番号に 1 を加えた値を使用できる。このコマンドは、他のバッファからすべ
324+
ての差分を取得する: >
323325
324-
:1,$+1diffget
326+
:0,$+1diffget
325327
326328
削除された行は画面に表示こそされているが、テキストラインとしては数えられていな
327329
いことに注意。消された範囲にカーソルを移動することはできない。もう一方のバッ

en/diff.txt

Lines changed: 12 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
*diff.txt* For Vim version 9.1. Last change: 2025 Mar 28
1+
*diff.txt* For Vim version 9.1. Last change: 2025 Jun 20
22

33

44
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -304,18 +304,20 @@ that the buffers will be equal within the specified range.
304304

305305

306306
When no [range] is given, the diff at the cursor position or just above it is
307-
affected. When [range] is used, Vim tries to only put or get the specified
308-
lines. When there are deleted lines, this may not always be possible.
307+
affected. There can be deleted lines below the last line of the buffer. When
308+
the cursor is on the last line in the buffer and there is no diff above this
309+
line, and no [range] is given, the diff below the cursor position will be used
310+
instead.
309311

310-
There can be deleted lines below the last line of the buffer. When the cursor
311-
is on the last line in the buffer and there is no diff above this line, the
312-
":diffget" and "do" commands will obtain lines from the other buffer.
312+
When [range] is used, Vim tries to only put or get the specified lines. When
313+
there are deleted lines, they will be used if they are between the lines
314+
specified by [range].
313315

314-
To be able to get those lines from another buffer in a [range] it's allowed to
315-
use the last line number plus one. This command gets all diffs from the other
316-
buffer: >
316+
To be able to put or get those lines to/from another buffer in a [range] it's
317+
allowed to use 0 and the last line number plus one. This command gets all
318+
diffs from the other buffer: >
317319
318-
:1,$+1diffget
320+
:0,$+1diffget
319321
320322
Note that deleted lines are displayed, but not counted as text lines. You
321323
can't move the cursor into them. To fill the deleted lines with the lines

0 commit comments

Comments
 (0)