[Top][All Lists]

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

Re: [Nano-devel] wrap and justification

From: Benno Schulenberg
Subject: Re: [Nano-devel] wrap and justification
Date: Sun, 29 Jun 2014 12:40:46 +0200

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?

> 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?

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).

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.

For example, paste this into a file:
> > This is one paragraph and should stay 
> > one also when the full text is justified.

Then hit <M-J>.  Segfault.

That is, with your patch.  Without it, it gets justified fine.
Try reopining it with -r25, and see how <M-J> changes it to:

> > This is one paragraph 
> > and should stay one 
> > also when the full 
> > text is justified.


-- - Same, same, but different...

reply via email to

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