[Top][All Lists]

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

Re: [Nano-devel] wrap and justification

From: Mark Majeres
Subject: Re: [Nano-devel] wrap and justification
Date: Sun, 29 Jun 2014 13:34:34 -0700

On 6/29/14, Benno Schulenberg <address@hidden> wrote:
> Hi Mark,
> On Sat, Jun 28, 2014, at 22:31, Mark Majeres wrote:
>> I reworked the do_justify function to use do_wrap.  In the process
>> do_wrap underwent a few changes as well.  Everything seems to work ok
>> including undo/redo.
> Oof!  That is a major patch.  The do_wrap stuff could be made into
> a separate, independent first patch?

Yeah, I could do that.  It's not going to look much different though.  Most
of the patch is related to do_wrap.  The 'do_justify' portion is
almost entirely
deleting uneeded functions.  Let me know if that's how you want it, I'll split
it up.

>> The function beg_par is not working as expected and will cause a
>> discrepancy with the original functionality on occasion.  The
>> difference can be seen by justifying the entire Changelog.
> It seems to have become slightly more consistent when paragraphs
> have "erratic" indentation.  But maybe the rule of what constitutes
> a paragraph might be adjusted to include first lines with *less*
> indentation than the rest, to accomodate for bulletted lists?

If bulleted lists are to be considered as a seperate paragraph then a
bullet char needs to be identified.  I think this can be avoided though,
by either indenting a bullet list more than the surrounding lines, or
providing a blank line at the start and end.  This is typical of most
writing styles.

> One big difference is that it does not reduce any excess whitespace
> between words.  The current code will reduce any multiple spaces
> to a single one, except after a period, where it will preserve a
> double space (but it will not create a double space when rewrapping
> causes an end-of-line period to land in midline, which is inconsistent).

Yes, I didn't understand why the original code would delete spaces, they
were put there for a reason.  Having trailing spaces at the end of line
doesn't effect the wrap location.  And like you mention, the removed
spaces will be missing in future wraps, or justification.  Leading spaces
are always removed from a line before joining with the previous line.

> But... the biggest change is that now nano no longer correctly
> rewraps "quoted" text, that is text that is quoted in email style
> with leading ">" or other characters from quotestr.  For an editor
> that wants to be a replacement for Pico, this is essential.

I couldn't figure out what the 'quote length' was for.  Now that I have
an example I'll make adjustments..

--Mark Majeres

reply via email to

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