nano-devel
[Top][All Lists]
Advanced

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

Re: [Nano-devel] memory leak


From: David Lawrence Ramsey
Subject: Re: [Nano-devel] memory leak
Date: Sat, 6 Sep 2003 12:20:51 -0700 (PDT)

--- address@hidden wrote:
>nano is leaking memory or just doing too much allocation when modifying
>highlighted files. Pasting the perl definition from the nanorc.sample
>file caused nano to grow from 2952 1932 to 70696 69592 and it got
>slower with every pasted character.
>
>The ChangeLog and BUGS files in cvs don't mention this problem so it
>probably still exists. Should I start digging through the source or is
>this already being worked on?

The color syntax highlighting in nano is known to be slow.  I haven't
been able to work on it yet, and afaik nobody else has either (correct
me if I'm wrong).  If you want to hack on it to speed it up, go right
ahead.

>I've modified the nanorc syntax to handle the "color
>foreground,background" and some other tweaks. My nanorc definition
>isn't the problem, it also happens with the default definition.
>
>And nano treats "foreground,(bright)background" as
>"(bright)foreground,background". It should generate an error when
>bright is used on the background.

Thanks for the report; I just fixed it in CVS a little while ago.

>And why does Alt-E no longer toggle regular expression searches?

IIRC, it was because back when Alt-E was used, it wasn't possible to
have non-global shortcuts.  Once that was possible, sometime in 1.1.x,
it was moved to Alt-R at the search prompt.

<snip>

>syntax "nanorc" "(\.|/)?nanorc$"
>color brightwhite "^ *(set|unset|syntax|color).*$"
>color cyan "^ *(set|unset)
>(autoindent|backup|const|cut|fill|historylog|multibuffer|noconvert|nofo
>llow|nohelp|nowrap|operatingdir|preserve|quotestr|rebinddelete|regexp|s
>mooth|speller|suspend|tabsize|tempfile|view)"
>color green "^ *(set|unset|syntax)\>"
>color yellow "^ *color
>(bright)?(white|black|red|blue|green|yellow|magenta|cyan)(,(white|black
>|red|blue|green|yellow|magenta|cyan))?\>"
>color magenta "^ *color\>" "\<(start|end)="
>color white "\"(\\.|[^\"])*\""
>color blue "^ *#.*$"

I've tried this out, and it appears to be a bit better than the current
nanorc syntaxes in nanorc.sample, especially since it apparently
displays erroneous lines in bright white.  After some testing, I've put
it into nanorc.sample, with a few minor tweaks to account for extra
spacing between keywords like "set" and their arguments, which is still
valid.

By the way, in the future, please send things like this as attachments;
my mailer screwed up the long lines as you can see from the quoted text,
and I had to manually fix it.


_____________________________________________________________
Sluggy.Net: The Sluggy Freelance Community!




reply via email to

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