nano-devel
[Top][All Lists]
Advanced

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

Re: [Nano-devel] indent/unindent overhaul (including undo/redo support)


From: Benno Schulenberg
Subject: Re: [Nano-devel] indent/unindent overhaul (including undo/redo support)
Date: Tue, 11 Jul 2017 11:07:21 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.2.1


Op 11-07-2017 om 00:55 schreef David Ramsey:
Schulenberg <address@hidden> wrote:
0001:

The changes are massive.  I have no idea whether the code still does
the same as before.  :|

It should.  Since the rest of the patch set relies on the splitting of
do_indent() into separate functions for indent and unindent, I should
probably improve on that first, and get back to you on the rest (after
rebasing the rest on the newly-split version).

Is the attached new version of this (split into 8 steps) better?

Yes, much better, thanks.  This I can follow.  It's easy enough to
verify that the new do_unindent() is an exact copy of do_indent(),
and after that, each subsequent step is relatively easy to check.
(I would almost be tempted to push it to master right away.)

The two patches that change only whitespace can be a single one.

I would have done the changes in 0003 a bit differently (you add
an "if (!unindent)" twice when you already know what its value is;
I would leave out the first if, and leave out the whole if-then
block plus its comment in the second case), but fine, let it be.


+/* Indent the current line (or, if the mark is on, all lines
+ * covered by the mark) tabsize columns.

I would shorten this to:

 /* Indent the current line (or the marked lines) by tabsize columns. */

And the rest of the comment should be wrapped properly, as you've
changed the text:

+ * If the TABS_TO_SPACES flag is set, indent
+ * by tabsize spaces.  Otherwise, indent by
+ * a tab. */

I would write it like this:

 * Insert either a tab character or a tab's worth of spaces, depending
 * on whether --tabstospaces is in effect. */


Benno



reply via email to

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