nano-devel
[Top][All Lists]
Advanced

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

Re: [Nano-devel] [BUGS?] indenting shift selections


From: Brand Huntsman
Subject: Re: [Nano-devel] [BUGS?] indenting shift selections
Date: Fri, 8 Dec 2017 15:20:52 -0700

On Fri, 8 Dec 2017 20:33:45 +0100
Benno Schulenberg <address@hidden> wrote:

> and have thought a bit about how to do this, and have come up with the
> attached trick.

That patch solves the first problem and even works for do_comment().


> But... maybe an exception
> could/should be made when the mark/cursor are at the head of a line?

It should also work if only whitespace is before the top cursor, because the 
bottom cursor moves to encompass its indent, so should the top. But only for 
do_indent(). And only if the top cursor is at the head of the line for 
do_comment().

It looks like nano inserts/removes tabs or spaces at/from start of each line. 
So code with a mixture of 4-wide tabs and spaces would insert a tab or spaces 
at start of line and then move top cursor backwards 1 tab or 4 spaces, which 
might not be the same as what it inserted at the head. That probably shouldn't 
matter because the selection got some sort of indent. And such code probably 
already has sloppy mixed indentation all over the place.

I also just noticed that nano's indent/unindent feature can't be used on its 
own source code due to its 8 wide tabs and 4-wide spaces. Is there an option to 
enable this?




reply via email to

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