diff options
author | Ron Yorston | 2021-04-15 12:00:50 +0100 |
---|---|---|
committer | Denys Vlasenko | 2021-04-15 13:09:12 +0200 |
commit | 9b2a3895eedb3c46179b1ed923b0f1214da04c5b (patch) | |
tree | e6ef6bdf04d1e1aa46e426bcf50b6fd29ad3c5e7 /networking/nc.c | |
parent | c0943ac451051b734711b0c95731ae7c515dbb31 (diff) | |
download | busybox-9b2a3895eedb3c46179b1ed923b0f1214da04c5b.zip busybox-9b2a3895eedb3c46179b1ed923b0f1214da04c5b.tar.gz |
vi: correctly record deleted characters
The undo queue didn't record deleted characters properly. For
example, insert some text, backspace over a couple of characters
then exit insert mode. At this point undo will restore two nulls
instead of the deleted characters.
The fix is in undo_push(): record the state of the UNDO_USE_SPOS
flag and clear it before using 'u_type'.
Also, update the comments to reflect the fact that UNDO_QUEUED_FLAG
isn't actually used.
function old new delta
undo_push 443 435 -8
------------------------------------------------------------------------------
(add/remove: 0/0 grow/shrink: 0/1 up/down: 0/-8) Total: -8 bytes
Signed-off-by: Ron Yorston <rmy@pobox.com>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
Diffstat (limited to 'networking/nc.c')
0 files changed, 0 insertions, 0 deletions