nano-devel
[Top][All Lists]
Advanced

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

Re: [Nano-devel] The undo feature


From: Erik Lundin
Subject: Re: [Nano-devel] The undo feature
Date: Thu, 30 Oct 2014 20:48:14 +0100

On Thu, 2014-10-30 at 09:43 -0700, Mark Majeres wrote:
> Erik,
> 
> I forgot to mention that sequential calls to do_delete() will result
> in only a single undo object being added to the list.  All of the
> deleted spaces will be restored in one call to do_undo().  So either
> way should work just fine.
> 
> --Mark Majeres

I've attached my implementation of the do_unindent() function with the
current undo technique.

If i add 4 lines as follows (with whitespace display on):
»   »   »   »   test
»   »   »   »   test
»   »   »   »   test
»   »   »   »   test

If i then mark all 4 lines and unindent them 4 times it removes all the
indentation as expected:
test
test
test
test

If i then undo one time i get:
»   »   »   »   test
»   »   »   »   test
»   »   »   »   test
»   »   »   »   test

What i would expect from one undo is:
»   »   »   test
»   »   »   test
»   »   »   test
»   »   »   test

Do you have any suggestions on how to make it behave like expected
without writing any specialized undo code in do_undo()?

-- 
Erik Lundin <address@hidden>

Attachment: do_unindent.patch
Description: Text Data


reply via email to

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