Commit 522c898
authored
ed: simplify edMove()
* The code was more complicated than it needed to be
* Copy & delete operations can always be done in the same order; first copy, then delete
* Delete happens for "m" command but not for "t" command
* If lines were copied before the start address, the address of the lines to be delete was increased by the number of lines copied
* test1: 17,18m5 --> after copy, original lines to delete are now at 19,20
* test2: 17,18m29 --> no address adjustment needed before deleting original lines1 parent 5c0679f commit 522c898
1 file changed
+5
-7
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
485 | 485 | | |
486 | 486 | | |
487 | 487 | | |
488 | | - | |
489 | | - | |
490 | | - | |
491 | | - | |
492 | | - | |
493 | | - | |
494 | | - | |
| 488 | + | |
| 489 | + | |
| 490 | + | |
| 491 | + | |
| 492 | + | |
495 | 493 | | |
496 | 494 | | |
497 | 495 | | |
| |||
0 commit comments