nano-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Nano-devel] Updated FIX for undo/redo (multibyte characters)


From: Mark Majeres
Subject: Re: [Nano-devel] Updated FIX for undo/redo (multibyte characters)
Date: Wed, 21 May 2014 13:24:14 -0700

> But then, after a lot of typing, back and forth, delete and add
> and backspace, after all the <M-U>s, a lone รบ remained, when
> I had started with nothing.  But I cannot reproduce it.

> So, the thing isn't perfect, but quite nearly so.  And if I find no
> more problem in the coming two days, I will install the patch.

Yeah, there's probably another location or two that assumes the next
character in the string is the next item in the char array.  The
trickier situation occurs when the index is subtracted by one, such
was the case with undo/redo ADD.  The function mbleft() can be useful
for this case, but it requires iterating from the start of the string,
so beware of the extra processing.

> Something else: when I started testing the undo/redo commands,
> I was a bit surprised and disappointed that a couple of ^Ks followed
> by an M-U did not put the cursor back in the position where it was
> when the first of the sequence of ^Ks was given.  I think it should
> do that.  It would make M-U different from ^U, and probably in some
> cases more useful.  This is of course not a criticism of your patch,
> the undo/redo code did that from the beginning.  I'm just... doing a
> feature request.  :)

I have attached an updated patch with this feature.

-Mark

Attachment: undoredo.v3.patch
Description: Text Data


reply via email to

[Prev in Thread] Current Thread [Next in Thread]