[Top][All Lists]

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

Re: [Nano-devel] Quoted justify

From: David Benbennick
Subject: Re: [Nano-devel] Quoted justify
Date: Thu, 20 Jun 2002 03:19:40 -0400
User-agent: Mutt/1.2.5i

I have finished a patch.  It is 196K, so I have put it on the web, at

In it, I have improved the quoted-justify patch I sent on May 18.  Also,
I fix a bunch of bugs:

First, two that I caused with earlier patches:

1) Without ENABLE_COLOR, with the mark set and typing before it, it
displays in the wrong place.  Problem in nano.c:do_char() line 729.

2) Segfault in nano.c:do_wrap() line 1091.

Bugs I didn't cause:

3) Failure to set placewewant in nano.c:do_backspace().  Make a file with
exactly two non-empty lines, go to the start of the second, backspace,
down, up.

4) Put the cursor at the beginning of the second "foo" below, and type
The cursor goes back too far.

5) Also, doing ^Space or M-Space with the mark set doesn't paint the
highlight correctly if the cursor moves more than one line, and some
intervening line is not blank.

6) The status bar no longer overwrites its row.  It also can handle
arbitrarily long messages, the only limit being the window width.

7) Nano complains about the "requested fill size -8 too small" with
        set fill -8
in the nanorc file.

8) Also, your -r fill choice gets trashed when you resize the window.  The
problem was in nano.c:handle_sigwinch() line 2067.

9) Resize the window with Nano suspended.  When it returns, now Nano
checks the new window size.

9) In search.c:searchinit line 118, if strlen(last_search) == COLS / 3 + 1
then buf is overwritten by 1 character.

10) Open a file in nano, M-P repeatedly.  Eventually it will probably

11) With 
        color brightblue start="/\*" end="\*/"
in the nanorc file, the file
        here /* is a test
        of /*
        something */
displays "here" and "of" in white, and other text in blue.

12) Also, various other bugs in winio.c:edit_add with coloring.  For
example, with the same color expression, open nano.c in a narrow
window, go down 1 then left 1.  Another example, the line
        /* Here is */ another /* test */
has only one blue chunk.  Another, with
        color red "^float"
in the nanorc, and "floatfloat" starting a line, both words are red.

Also, I fixed some memory leaks.
        cut.c:cut_marked_segment, line 106 if !destructive.

        files.c:do_insertfile line 432 (tmp never freed)
                write_file line 1243 and 1249 (buf and realname never freed)
                do_writeout line 1610 (tmp never freed)
                do_writeout line 1675 (cutbuffer never freed)

Finally, the bells-n-whistles version is 3K smaller now, and if
DISABLE_JUSTIFY then it is 4K smaller.

Question: suppose you set
        color red "\^"
in your nanorc file, then open a binary file.  Do we want to color the
carets red, even though there are no ^ characters?  If so, note that this
feature does not work with multiline tests, like
        color red start="\^L" end="\^N"
where a ^L character appears on a line before a ^N character.  Opinions?

Attachment: pgpli7Q0oU5xV.pgp
Description: PGP signature

reply via email to

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