[Toybox] [PATCH] vi: added backspace
Jarno Mäkipää
jmakip87 at gmail.com
Wed Feb 1 14:02:37 PST 2023
On Wed, Feb 1, 2023 at 11:19 PM enh <enh at google.com> wrote:
>
> heh, to be clear: i wasn't "dissing" drive-by patching. it accounts
> for at least 80% of my entire career :-)
>
Yeah I understood that. Just made joke since this will probably be
just one off patch unless I actually gather some motivation somewhere
to actually work on this again :)
I just happened to have file open and remembered that insert mode was
very wonky for typical "arrow keys user" and already knew how to fix
it. I was intending this as quality of life update with minimum
effort.
> i use the term just to acknowledge that for some things -- like this
> -- there isn't anyone else who's actually working on the thing full
> time, which is my personal rationale for wanting "the simplest thing
> that could possibly work", and why my definition of "simple" is
> something like "the most easily understood by an average programmer
> who hasn't seen this particular code before".
Implementing gap buffer wold simplify some aspects of program. Mainly
by allowing some direct usage of familliar standard c library
functions for string manipulation and searching.
But I think best way to keep it simple is just to limit features.
>
> (and, yes, in addition to the open() error -- which at least led to a
> small simplification of the code -- i've shot myself in the foot by
> forgetting that there even are vi tests, not running them, and
> breaking them with my recent commit, which i'll have to do something
> about before i can sync to AOSP. i'll admit i'm very tempted to just
> locally ignore those tests for now so i can get people kicking the
> `tar --sort=name` tires asap, and coming back to worry about vi
> later!)
>
> On Wed, Feb 1, 2023 at 12:52 PM Jarno Mäkipää <jmakip87 at gmail.com> wrote:
> >
> > Drive by patching :)
> >
> > Added better backspace support, now cuts in both insert and normal
> > mode and also original text and not just what is in temporary buffer.
> > Fix arrow key behavior on insert mode slightly by inserting what ever
> > has been typed before moving.
> >
> > -Jarno
> > _______________________________________________
> > Toybox mailing list
> > Toybox at lists.landley.net
> > http://lists.landley.net/listinfo.cgi/toybox-landley.net
More information about the Toybox
mailing list