[prev in list] [next in list] [prev in thread] [next in thread] 

List:       busybox
Subject:    [PATCH v3] Complete Undo command support for vi
From:       "jody () jodybruchon ! com" <jody () jodybruchon ! com>
Date:       2014-03-19 5:23:29
Message-ID: 1365288596.272907.1395206609544.open-xchange () email ! 1and1 ! com
[Download RAW message or body]

This is my latest patch to add 'u' (Undo) command support to BusyBox vi and it
is a major improvement over the previous two.

Improvements over v2:
* Seems to work with all editing functions I could test
* Find-and-replace undo now works; can reverse e.g. :1,3 s/foo/bar/
* Friendly constants for undo flags (UNDO_INS, ALLOW_UNDO, etc.)
* Removed dot_delete() (was only calling another function and only used once)
* Proper #if/#else/#endif (builds without undo don't waste a parameter now)
* Patch also uses file_modified in a MUCH more logical/sane manner

Tested on x86_64, probably works everywhere though. On x86_64, it only weighs in
at +1266 bytes of text with no change in data/bss. I feel that this patch is
largely complete; however, I would like to eventually implement some form of
input grouping so that it doesn't malloc() twice for every single action taken
including a single character being typed within insert mode (and it doubles for
replace mode), which is the biggest problem I can see. Fortunately, it is
unlikely that this will exhaust memory on systems with even a modest amount of
RAM.

I am very happy to be able to contribute something of value to BusyBox! :-)

Signed-off-by: Jody Bruchon <jody@jodybruchon.com>
["busybox_vi_undo_v3.patch" (application/octet-stream)]

_______________________________________________
busybox mailing list
busybox@busybox.net
http://lists.busybox.net/mailman/listinfo/busybox

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic