nano-devel
[Top][All Lists]
Advanced

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

Re: [Nano-devel] adding a word-completion feature to nano


From: Benno Schulenberg
Subject: Re: [Nano-devel] adding a word-completion feature to nano
Date: Wed, 02 Nov 2016 21:31:08 +0100

On Tue, Nov 1, 2016, at 17:03, Benno Schulenberg wrote:
> The current code works fine... as long as word wrap does not
> kick in.  To see what I mean, run this:
> 
>     MALLOC_CHECK_=2 src/nano --ignore --fill=10 +18 NEWS
> 
> and type: aa port
> then type five times ^], until "No further matches" appears,
> then type twice M-U.
> Result: Aborted.

The attached patch avoids the issue, by temporarily disabling
wrapping when trying completions.  The wrapping will take place
a little later, when the user accepts a completion and continues
to type more characters.  Only when the user types <Enter> after
the completion does the filling/justifying of the line not take
place.  If we can't come up with a fully correct solution, I
think this overshooting the right margin in the case of <Enter>
will be tolerable.

Benno

-- 
http://www.fastmail.com - Does exactly what it says on the tin

Attachment: waswrapping.patch
Description: Text Data


reply via email to

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