2009-02-02 Chris Allegretta <chrisa@asty.org>
* New color precalculation code for mult-line regexes. New function precalc_multicolorinfo(),
new structure multidata for keeping track of where regexes start/stop. More
performance improvements forthcoming.
Chris Allegretta [Sat, 31 Jan 2009 23:36:00 +0000 (23:36 +0000)]
2009-01-29 Chris Allegretta <chrisa@asty.org>
* nano.c (move_to_filestruct) - properky initialize new fileage for multiswatching, sigh.
Fix cut sefaults discovered by Mike Frysinger.
Chris Allegretta [Fri, 30 Jan 2009 08:34:27 +0000 (08:34 +0000)]
2009-01-29 Chris Allegretta <chrisa@asty.org>
* nano.c (main): Add support for nano acting like a pager when invoked with - as first
file argument. Not yet perfect (garbles screen state on exit) but it's something.
Chris Allegretta [Mon, 26 Jan 2009 08:48:22 +0000 (08:48 +0000)]
2009-01-25 Chris Allegretta <chrisa@asty.org>
* files.c (open_file), nanorc.c (parse_include): Don't get_full_path on
included rc files, due to it potentially impacting the ability
to read files in nano's cwd(). Fixes Savnanah bug #25297 reported by Mike
Frysinger)
Chris Allegretta [Sat, 24 Jan 2009 22:40:41 +0000 (22:40 +0000)]
2009-01-24 Chris Allegretta <chrisa@asty.org>
* Add interruptability to search functions. New functions enable_nodelay and
disable_nodelay and changes to the routines to handle checking for pending
searches. Fixes Savnnah bug 24946: Need interrrupt for search.
Chris Allegretta [Mon, 19 Jan 2009 19:10:39 +0000 (19:10 +0000)]
2009-01-19 Chris Allegretta <chrisa@asty.org>
* Change funcion definitions to shorts instead of (void *)s. New mapping function
iso_me_harder_funcmap(). Fixes compilation complaints with -pedantic,
reported by Eitan Adler <eitanadlerlist@gmail.com>.
Chris Allegretta [Tue, 21 Oct 2008 10:20:07 +0000 (10:20 +0000)]
2008-10-20 Chris Allegretta <chrisa@asty.org>
* files.c (do_writeout): Add check for file modification when saving
the file so the user can at least know they may be blowing away changes.
Chris Allegretta [Tue, 14 Oct 2008 16:46:58 +0000 (16:46 +0000)]
2008-10-14 Chris Allegretta <chrisa@asty.org>
* nanorc.5: Fix redo man page entry and update explanation, reported by
Eitan Adler <eitanadlerlist@gmail.com>
Chris Allegretta [Tue, 14 Oct 2008 04:34:56 +0000 (04:34 +0000)]
Eliminate linescut variable from undo structure as its an unneeded pain in the ass.
Also initialize to_end, because for some reason it seems to be not getting set even when
type == CUT in add_undo (?!)
Chris Allegretta [Tue, 14 Oct 2008 01:14:12 +0000 (01:14 +0000)]
2008-10-13 Chris Allegretta <chrisa@asty.org>
* Remove CUTTOEND as an undo type as it's unneeded, fix u->to_end logic in undo struct.
* undo.c (update_undo): Don't free cutbuffer if NULL, fix for Savannah bug #24499
2008-10-04 Chris Allegretta <chrisa@asty.org>
* cut.c (Add_undo): Save last cut undo information so it can be used for next uncut, fixes
Savannah bug 24183.
Chris Allegretta [Sun, 21 Sep 2008 23:02:30 +0000 (23:02 +0000)]
2008-09-21 Chris Allegretta <chrisa@asty.org>
* rcfile.c, color.c, nano.h: Add new capability for matching a syntax type by the "header" (1st line)
of a file being edited. Based on Savannah bug 24197 and inital proof of concept by Dave Geering
<dgeering@toshiba-tap.com>
Chris Allegretta [Tue, 16 Sep 2008 21:35:19 +0000 (21:35 +0000)]
2008-09-16 Chris Allegretta <chrisa@asty.org>
* text.c: Add support for undoing a text uncut. Split out the undo and redo of a text cut
in order to avoid code duplication.
Chris Allegretta [Sat, 30 Aug 2008 21:00:00 +0000 (21:00 +0000)]
* global.c, help.c, browser.c, files.c, proto.h: Fix several compipation and programmatic
issues with --disable-help, especially that do-writeout was treating ^G the same as ^M.
Chris Allegretta [Sat, 30 Aug 2008 05:16:20 +0000 (05:16 +0000)]
2008-08-29 Chris Allegretta <chrisa@asty.org>
* configure.ac, color.c, rcfile.c, utils.c: 1st attempt at supporting systems which don't support
GNU-style word boundaries. New function fixbounds() to translate from GNU-style to
BSD-style, autoconf option GNU_WORDBOUNDS.
Chris Allegretta [Thu, 28 Aug 2008 06:13:05 +0000 (06:13 +0000)]
2008-08-28 Chris Allegretta <chrisa@asty.org>
* configure.ac, rcfile.c: Add support for an alternate rcfilename at configure time. Maybe this
should become a command line option some day, but I don't see the need currently. Start of
fix for Savannah bug #24128: Add nanorc support to win32 platform.
Chris Allegretta [Thu, 21 Aug 2008 04:21:06 +0000 (04:21 +0000)]
2008-08-21 Chris Allegretta <chrisa@asty.org>
* text.c: Change error messages where we may possibly get into a bad state and urge
the user to save when this happens. Originally by Benno Schulenberg <bensberg@justemail.net>
Chris Allegretta [Sun, 17 Aug 2008 16:25:40 +0000 (16:25 +0000)]
2008-08-08 Magnus Granberg <zorry@ume.nu> / Adam Conrad <?>
* files.c: (write_file): Add needed flags to open() calls when writing out files. Fixes Savannah bug
#23827: Compilation fails with -D_FORTIFY_SOURCE=2
Chris Allegretta [Sat, 16 Aug 2008 23:54:15 +0000 (23:54 +0000)]
* files.c (write_file): Check exit code of fclose(), since in certain out of space conditions the OS will
happily report successful fwrite()s until you try and close the file. Fix for Savannah bug
#24000: no free space on partition - nano claims successful write - file empty
* text.c: Reset openfile-> to OTHER after an undo or redo so we don't mistakenly
mistakenly think this is an update when it's really an add. Also
Fix an extra ; after an if statement which makes nano try to free a struct which
may be NULL
- Change add_undo and current_undo to only take action arg, as openfilestruct arg is always openfile
- Add ability to undo a file/cmd insert, needed to add undoable flag to read_file and open_buffer as a result
- When undoing a cut, set cutbuffer to NULL after freeing the current one
- When updating a normal consecutive ^K cut, bail from add_undo since it's not an add, and in update_undo free the old cutbuffer before copying it again.
Chris Allegretta [Sun, 13 Jul 2008 16:44:19 +0000 (16:44 +0000)]
Allow backspace to be bound to keys in .nanorc
Allow kdel to be rebound
Add note about rebinding kdel to backspace for those using OSX or PuTTY to connect to remote Linux machines in nanorc.sample.in
When undoing text deletes, move current_x to proper location
Chris Allegretta [Sat, 12 Jul 2008 02:20:16 +0000 (02:20 +0000)]
2008-07-11 Michael Haubenwallner <michael.haubenwallner@salomon.at>
* global.c: include proto.h earlier in file to fix AIX compilation
(Savannah patch 6559)
Chris Allegretta [Sat, 12 Jul 2008 02:13:22 +0000 (02:13 +0000)]
2008-07-11 Michael Haubenwallner <michael.haubenwallner@salomon.at>
* global.c: include proto.h earlier in file to fix AIX compilation
(Savannah patch 6559)
Chris Allegretta [Thu, 10 Jul 2008 20:13:04 +0000 (20:13 +0000)]
Add beginning undo feature, since I want to start fixing bugs from savannah and don't want to manager another checking, and the code basically works for some operations.
Chris Allegretta [Sat, 31 May 2008 21:55:21 +0000 (21:55 +0000)]
New syntax highlighting from Mike F. Credits:
awk.nanorc by Donnie Berkholz <dberkholz@gentoo.org>
css.nanorc by Simon Rupf <simon.rupf@int-ag.ch>
xml.nanorc by Josef 'Jupp' Schugt <jupp@rubyforge.org>
Slight tweak by chrisa on the CSS file to make the brightwhite section end on line boundary due to matching too greedily on valid CSS
(see digg's css/111/global.css as an example)
Chris Allegretta [Thu, 20 Mar 2008 05:52:08 +0000 (05:52 +0000)]
Wow, I somehow did not run into the "invalid range" error
until after I committed, how does that work? Anyway, fix
the range error message for debian.nanorc.