Nano Patches

nano is a console-based text editor.

New error messages are formatted as _("-- the error --") so they can be easily found and changed if needed.

[unknown]nano-1.3.0-color-2.1.patch  11.2kBThis patch requires patches 0 through 2.
  • David Lawrence Ramsey's nano-1.3.0-color-0-2-dlr patch.
    • Restructured rcfile.c:parse_include().
    • Fixed errors displayed when -Wall is enabled.
    • Cosmetic changes.
  • Fixed segfault bug when resizing the window.
[unknown]nano-1.3.0-color-0-2.patch  33.8kBPatches 0 through 2.
[unknown]nano-1.3.0-color-2.patch  11.8kBThis patch requires patches 0 through 1.
  • Fixed a "*" in --displaysyntax that should've been changed to "default" in the nano-1.3.0-color-0.patch patch.
  • Disallows syntaxes named "none".
  • '-Y none' disables syntax highlighting.
  • New 'default-color' directive defines a color for all unmatched text. Can be used to catch errors in simple syntaxes, such as nanorc.
  • --displaysyntax now displays syntax extensions.
  • Aborts the current color when a zero length match is found instead of continuing to look for more matches with what is probably a bad regular expression.
[unknown]nano-1.3.0-color-1.patch  9.9kBThis patch requires patch 0.
  • Fixed the regexec() memory leak in edit_add() by freeing and recompiling each regexp every 100 calls.
  • Minor changes to edit_add().
[unknown]nano-1.3.0-color-0.patch  21.4kB
  • David Lawrence Ramsey's port of nano-1.2.2-color.patch to 1.3.0.
    • --display-syntax and -d renamed to --displaysyntax and -P.
  • Removed the error message for extensionless syntaxes.
  • Fixed segfault when a syntax followed a default syntax.
  • Default and normal syntaxes can now be overridden instead of producing an error.
  • --displaysyntax now displays 'icolor' for insensitive regular expressions and 'default' instead of '*' for default syntaxes.
  • Disallows syntaxes named "default".
  • Fixed segfault when using -Y with an unknown syntax.
  • '-Y default' now uses the default syntax.
[unknown]nano-1.2.2-color.patch  20.9kB
  • Errors when a syntax name is redefined.
  • Uses syntax override when present even when a definition exists for the file extension.
  • New 'default-syntax' directive, applied to files that don't match a syntax.
  • New 'icolor' directive for case-insensitive matches, same format as color directive.
  • New 'include' directive based on the nanovarcinsert patch. Modified to only include files containing color and icolor directives. Errors when called outside of a syntax directive.
  • New '-d' and '--display-syntax' options to display syntaxes for testing purposes and then quit. Displayed in a grep'able format `nano -d |grep "^html:"`
  • Only stores compiled regular expressions for syntaxes that are in use.
  • The new regular expression code reduced the memory footprint by 1.3meg with my nanorc file. I used it to write most of the code in this patch and I had no problems. This patch does not fix the regexec() memory leak.