aboutsummaryrefslogtreecommitdiff
path: root/arch
diff options
context:
space:
mode:
authorRon Yorston <rmy@pobox.com>2024-07-18 14:59:30 +0100
committerDenys Vlasenko <vda.linux@googlemail.com>2024-09-27 20:14:04 +0200
commit26895db35d4b9160ff5f2fe1f942e1ddbf58747d (patch)
tree54a821f6771edcb2de66869fb75c6eceba79cfea /arch
parent480a07bd6828285628abbbe3fe8e5e3b25ce1a92 (diff)
downloadbusybox-w32-26895db35d4b9160ff5f2fe1f942e1ddbf58747d.tar.gz
busybox-w32-26895db35d4b9160ff5f2fe1f942e1ddbf58747d.tar.bz2
busybox-w32-26895db35d4b9160ff5f2fe1f942e1ddbf58747d.zip
ed: fix line insertion before current line. Closes 15081
When text is inserted by insertLine() the lines following the insertion are moved down and the insertion point is made the new current line. To avoid too much scanning of the linked list of lines setCurNum() may use the position of the old current line to determine the location of the new current line. If the insertion point is before the old current line in the file the latter will have been moved down, so its line pointer needs to be adjusted. function old new delta insertLine 162 180 +18 ------------------------------------------------------------------------------ (add/remove: 0/0 grow/shrink: 1/0 up/down: 18/0) Total: 18 bytes Signed-off-by: Ron Yorston <rmy@pobox.com> Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
Diffstat (limited to 'arch')
0 files changed, 0 insertions, 0 deletions