nano-devel
[Top][All Lists]
Advanced

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

Re: [Nano-devel] Add function to convert leading whitespace to tabs


From: Mark Majeres
Subject: Re: [Nano-devel] Add function to convert leading whitespace to tabs
Date: Mon, 20 Oct 2014 08:54:25 -0700

It doesn't look like the indent/unindent code is paying any regards to
the undo/redo framework.  The function do_indent() is need of a
re-work too, it's buggy.

For both the indent/unindent and the conversion of spaces <--> tabs
please see the function do_wrap() and follow in the footsteps.

In the function do_wrap(), SPLIT_BEGIN and SPLIT_END are used as
markers for looping thru the linked list of undo objects.  All of the
"work" is done in the ADD undo type.  So surround the addition/removal
of characters on each line with add_undo(ADD) and update_undo(ADD).

-Mark Majeres



reply via email to

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