Commit 4bb643d
authored
ed: save space in editor buffer
* The substitution s/\z/NEW/ produced the unwanted outcome of $lines[$x] containing two lines of text
* Address this by not including trailing newlines in the editor buffer anymore
* Introduce helper function get_terminated_line() which adds the newline
* Now s/\z/NEW/ is interpreted the same as s/$/NEW/, i.e. append NEW to end of line
* Bump version number in case of regressions
* Removing the newlines from the editor buffer also reduces memory usage, but that is not the main intent of this patch1 parent 85b3126 commit 4bb643d
1 file changed
+21
-17
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
100 | 100 | | |
101 | 101 | | |
102 | 102 | | |
103 | | - | |
| 103 | + | |
104 | 104 | | |
105 | 105 | | |
106 | 106 | | |
| |||
380 | 380 | | |
381 | 381 | | |
382 | 382 | | |
383 | | - | |
| 383 | + | |
384 | 384 | | |
385 | 385 | | |
386 | 386 | | |
| |||
390 | 390 | | |
391 | 391 | | |
392 | 392 | | |
393 | | - | |
| 393 | + | |
394 | 394 | | |
395 | 395 | | |
396 | 396 | | |
397 | 397 | | |
398 | 398 | | |
| 399 | + | |
| 400 | + | |
| 401 | + | |
| 402 | + | |
| 403 | + | |
399 | 404 | | |
400 | 405 | | |
401 | 406 | | |
| |||
433 | 438 | | |
434 | 439 | | |
435 | 440 | | |
436 | | - | |
437 | | - | |
438 | | - | |
439 | | - | |
440 | | - | |
441 | | - | |
442 | | - | |
443 | | - | |
444 | | - | |
| 441 | + | |
| 442 | + | |
| 443 | + | |
| 444 | + | |
| 445 | + | |
| 446 | + | |
445 | 447 | | |
446 | 448 | | |
447 | 449 | | |
| |||
669 | 671 | | |
670 | 672 | | |
671 | 673 | | |
672 | | - | |
| 674 | + | |
| 675 | + | |
673 | 676 | | |
674 | 677 | | |
675 | 678 | | |
| |||
814 | 817 | | |
815 | 818 | | |
816 | 819 | | |
817 | | - | |
818 | 820 | | |
819 | 821 | | |
| 822 | + | |
820 | 823 | | |
821 | 824 | | |
822 | 825 | | |
| |||
885 | 888 | | |
886 | 889 | | |
887 | 890 | | |
888 | | - | |
889 | | - | |
| 891 | + | |
| 892 | + | |
890 | 893 | | |
891 | 894 | | |
892 | 895 | | |
| |||
899 | 902 | | |
900 | 903 | | |
901 | 904 | | |
| 905 | + | |
902 | 906 | | |
903 | 907 | | |
904 | 908 | | |
| |||
950 | 954 | | |
951 | 955 | | |
952 | 956 | | |
953 | | - | |
| 957 | + | |
954 | 958 | | |
955 | 959 | | |
956 | 960 | | |
| |||
0 commit comments