|
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 |
2 | 2 |
|
3 | 3 |
|
4 | 4 | VIM REFERENCE MANUAL by Bram Moolenaar
|
@@ -304,18 +304,20 @@ that the buffers will be equal within the specified range.
|
304 | 304 |
|
305 | 305 |
|
306 | 306 | 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. |
309 | 311 |
|
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]. |
313 | 315 |
|
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: > |
317 | 319 |
|
318 |
| - :1,$+1diffget |
| 320 | + :0,$+1diffget |
319 | 321 |
|
320 | 322 | Note that deleted lines are displayed, but not counted as text lines. You
|
321 | 323 | can't move the cursor into them. To fill the deleted lines with the lines
|
|
0 commit comments