2009-12-01 Kamil Dudka <kdudka@redhat.com>
* chars.c, file.c - Better handle unused results for things like mbtowc(), new
macro IGNORE_CALL_RESULT.
2009-12-01 Chris Allegretta <chrisa@asty.org>
* global.c (shortcut_init) - Remove redundant entries for ^Y/^V reported by
Christian Weisgerber.
* doc/man/nanorc.5 - Fix typo in Meta documentation, reported by gibboris@gmail.com.
2009-11-29 David Lawrence Ramsey <pooka109@gmail.com>
* global.c (shortcut_init) - Add support for ^P and ^N in the help menu.
Chris Allegretta [Sun, 29 Nov 2009 06:24:10 +0000 (06:24 +0000)]
2009-11-29 David Lawrence Ramsey <pooka109@gmail.com>
* global.c: Fix replace and insert file initializations for proper compilation options.
* nano.c (do_suspend): Update comments to reflect actual code path, bad Chris and thanks for
noticing Jordi.
* configure.ac: Fix typos
Chris Allegretta [Sun, 29 Nov 2009 06:13:22 +0000 (06:13 +0000)]
2009-11-29 Chris Allegretta <chrisa@asty.org>
* prompt.c (get_prompt_string) - Universally handle help key when is disabled. Fixes Savannah
bug 28117 by David Lawrence Ramsey <pooka109@gmail.com>.
* chars.c, files.c: Add junk vars to silence the compiler. Sigh.
2009-11-29 David Lawrence Ramsey <pooka109@gmail.com>
* Change several *chars to const char, additional cleanups and casts to make compilers happier.
Chris Allegretta [Sat, 28 Nov 2009 03:01:30 +0000 (03:01 +0000)]
2009-11-27 Chris Allegretta <chrisa@asty.org>
* nano.c (do_suspend): Don't clear the screen but do move the cursor down to the last line
first in an effort to not corrupt the screen, which contradicts Pico but is consistent
with almost all other text editors. Fixes Savannah bug 28110/Debian bug 460510
reported by Tim Connors <reportbug@rather.puzzling.org>.
Chris Allegretta [Tue, 24 Nov 2009 17:15:53 +0000 (17:15 +0000)]
2009-11-24 Chris Allegretta <chrisa@asty.org>
* move.c (do_page_up, do_page_down): Make these functions work better with soft
line wrapping.
* winio.c (compute_maxrows): Make maxrows calculation more accurate when all lines are > COLS.
Chris Allegretta [Sun, 22 Nov 2009 21:35:56 +0000 (21:35 +0000)]
2009-11-22 Chris Allegretta <chrisa@asty.org>
* nano.c (main): Allow edit_refresh_needed to take effect when using --enable-tiny
(fixes Savannah bug 28076 reported by David Lawrence Ramsey).
2009-11-22 David Lawrence Ramsey <pooka109@gmail.com>
* nano.c (move_to_filestruct): Fix bug 71 (cut at top of line recenters)
* Fix compilation with --enable-tiny
Chris Allegretta [Fri, 20 Nov 2009 05:09:12 +0000 (05:09 +0000)]
2009-11-19 Chris Allegretta <chrisa@asty.org>
* nano.c (die_save_file) Try nd match the permissions of the file we were
editing but only make a minimal effort to do so. Fixes Savannah bug 27273
reported by Mike Frysinger.
Chris Allegretta [Mon, 16 Nov 2009 00:15:45 +0000 (00:15 +0000)]
2009-11-15 Chris Allegretta <chrisa@asty.org>
* winio.c (edit_refresh): Always computer maxsize regardless of whether smooth scrolling
is enabled. Fixes Savannah bug 28024 by Mike Frysinger.
Chris Allegretta [Wed, 11 Nov 2009 06:00:33 +0000 (06:00 +0000)]
2009-11-11 Chris Allegretta <chrisa@asty.org>
* winio.c: Large tweaking of cursor and text display based on COLS not COLS - 1,
due to finally understanding that display_string wasn't being called properly
when softwrap was enabled. Fixes Savnnah bug 27603, Return key doesn't scroll
viewport reported by Hannes Schueller.
* - Fix size_t formatting issues with -pedantic by converting vals to long unsigned
for printing.
2009-11-07 Chris Allegretta <chrisa@asty.org>
* nano.h - Add bogus value at begin of flags enumeration because it
causes casesens rcfile option to misbehave, reported by Helmut
Jarausch <jarausch@igpm.rwth-aachen.de>
* rcfile.c - Add in specific check for UNDOABLE and fix declaration as
to what flag it toggles. Fixes undo mode being able to be called from
the rc file, reported by Helmut Jarausch <jarausch@igpm.rwth-aachen.de>
Chris Allegretta [Tue, 27 Oct 2009 04:09:27 +0000 (04:09 +0000)]
2009-10-27 Chris Allegretta <chrisa@asty.org>
* browser.c (browser_init): Set column width to something sane when
initializing in a directory with no file entries. Fixes Savannah
bug 24163 found (and initial patch) by Paul Wise.
Chris Allegretta [Sun, 13 Sep 2009 04:50:44 +0000 (04:50 +0000)]
2009-09-12 Chris Allegretta <chrisa@asty.org>
* winio.c (edit_update) - properly update edittop when using soft wrapping.
Fixes lack of centering for searching for off-screen answers, found by
Hannes <mr_creosote@mutantwatch.de>.
2009-09-03 Chris Allegretta <chrisa@asty.org>
* global.c (shortcut_init): Fix up/down keys not responding in the file browser,
discovered by Hannes <mr_creosote@mutantwatch.de>.
* move.c (do_up) - Fix another scrolling issue with softwrap when the
cursor is beyond COLS, discovered by Hannes <mr_creosote@mutantwatch.de>.
2009-09-02 Chris Allegretta <chrisa@asty.org>
* Attempt to check file writability and emit a warning on the status bar
if nano doesn't think the file can be written to. Feature originally
requested by Damien Jolders <madamien@skullsquad.com> et al.
Chris Allegretta [Sun, 30 Aug 2009 03:50:16 +0000 (03:50 +0000)]
2009-08-29 Chris Allegretta <chrisa@asty.org>
* Fix more soft wrapping issues, particularly with soft scrolling,
discovered by Hannes <mr_creosote@mutantwatch.de>.
Chris Allegretta [Wed, 19 Aug 2009 05:38:07 +0000 (05:38 +0000)]
2009-08-19 Chris Allegretta <chrisa@asty.org>
* Fix issue with soft wrapping not displaying the last character of each line,
fixed bug discovered by Hannes <mr_creosote@mutantwatch.de>.
Chris Allegretta [Mon, 17 Aug 2009 07:52:10 +0000 (07:52 +0000)]
2009-08-17 Chris Allegretta <chrisa@asty.org>
* Initial soft line wrapping implementation. Command line flags
-$ or --softwrap.
* nano.c, text.c: Clean up some fprintf warnings in debug mode due to printing
a size_t without using the zd specifier.
Chris Allegretta [Fri, 14 Aug 2009 03:18:29 +0000 (03:18 +0000)]
2009-08-13 Chris Allegretta <chrisa@asty.org>
* New global flag implementation courtesy of Adam Wysocki <gophi@arcabit.pl>, allows
previous undo flag to be implemented consistent with other flags.
Chris Allegretta [Mon, 27 Jul 2009 04:16:44 +0000 (04:16 +0000)]
2009-07-27 Chris Allegretta <chrisa@asty.org>
* text.c (undo_cut, redo_cut): Don't actually try and undo/redo an empty cut, i.e. the magicline.
Fixes crash on cutting last line discovered by Eitan Adler <eitanadlerlist@gmail.com>.
Chris Allegretta [Sun, 12 Jul 2009 03:36:58 +0000 (03:36 +0000)]
2009-07-11 Chris Allegretta <chrisa@asty.org>
* nano-regress: Small tweaks
* Change undo code to off unless unabled via a command line option (-u/--undo). Until this code
stabilizes this is the only responsible way to treat it.
Chris Allegretta [Thu, 26 Mar 2009 01:01:48 +0000 (01:01 +0000)]
First pass at fixing the line splitting undo since it's currently broken beyond belief.
I believe more is broken but committing will motivate me to get closer to a real fix :)
2009-03-08 Chris Allegretta <chrisa@asty.org>
* TODO - Break out some targets for various features into 2.2
and 2.4 series for things which are feasible.
2009-02-28 Chris Allegretta <chrisa@asty.org>
* configure.ac: Add check for whether _XOPEN_SOURCE_EXTENDED is needed for
curses to work w/color. Fixes compilation on HP-UX with older GCC,
reported by jay.krell@cornell.edu.
Chris Allegretta [Wed, 25 Feb 2009 04:32:15 +0000 (04:32 +0000)]
2009-02-23 Chris Allegretta <chrisa@asty.org>
* rcfile.c (parse_keybinding) - Define a var before tryung to use it. Whoops!
* fix some redefinitions causing compiler warnings, from Eitan Adler. Other
(hopefully) fixes for uncasted malloc()s, reported by the same.
Chris Allegretta [Mon, 16 Feb 2009 23:06:09 +0000 (23:06 +0000)]
Okay that will not work. Revert forcing reset_multis on !viewok as it's too expensive
for things like deleting text. Will have to go back and force inside functions.
Add check in reset_multis for CNONE type since that's slowing us down and is dumb
to leave out.
Chris Allegretta [Mon, 16 Feb 2009 21:04:00 +0000 (21:04 +0000)]
2009-02-16 Chris Allegretta <chrisa@asty.org>
* Add new argument to reset_multis for force redraws without attempting to
guess whether we need to, force updates when running a non-viewok function.
New utility function color.c:reset_multis_for_id(). Fixes e.g. incorrect
highlighting when cutting text.
Chris Allegretta [Sun, 15 Feb 2009 19:16:18 +0000 (19:16 +0000)]
2009-02-15 Chris Allegretta <chrisa@asty.org>
* configure.ac, doc/man/Makefile.am - Add check for HTML output support in GNU
groff. Fixes Savannah bug #24461: build traps on groff. Also, add installation
of html-ized man pages to $datadir/nano/man-html, since we should probably
install files we went to all the trouble of generating.
Chris Allegretta [Sun, 15 Feb 2009 02:40:16 +0000 (02:40 +0000)]
2009-02-14 Chris Allegretta <chrisa@asty.org>
* nano.c (precalc_multicolorinfo) - Add debugging so we have a better clue if further
issues arise. Also start at the beginning of later lines when trying to match the
end of a multi-line regex. Fixes more overly aggressive highlighting found by
Mike Frysinger. Finally, advance to the match end for performance.
Chris Allegretta [Wed, 11 Feb 2009 05:45:57 +0000 (05:45 +0000)]
2009-02-11 Chris Allegretta <chrisa@asty.org>
* nanorc.c (parse_include): Do call real_dir_from_tilde() on included
files in .nanorc, but still avoiding bug #25297. Fixes ~ and ~user
specifications for nanorc include files, as reported by Eitan Adler.
2009-02-09 Chris Allegretta <chrisa@asty.org>
* New option -q, --quiet, rcfile option "quiet" implemented. Skips printing
errors about the rcfile and asking user to press enter. Also, nano should
now only ask for one enter press when there is an error when not using -q.
Based on discussion between Eitan Adler and Mike Frysinger.
* rcfile.c (parse_keybinding) - Significant cleanups and fixes for
detecting and reporting errors in key bindings code.
* Make reset_multidata reset more lines, since contrary to previous problems the
syntax highlting is now too *un*ambitious, causing display glitches when
deleting a regex boundary.
2009-02-08 Chris Allegretta <chrisa@asty.org>
* Add more multidata initliazers for new buffers and 'magic lines'. Fixes segfaults
with syntax highlighting in new buffers, initially reported by Mike Frysinger.
Renumber multidataflags to not start at 0 in case it confuses alloc_multidata_if_needed().
Add alloc_multidata_if_needed() call in edit_draw as the last defense against a crash.
2009-02-06 Chris Allegretta <chrisa@asty.org>
* rcfile.c (parse_include): Abort on being unable to open an included rcfile. Fixes
Savannah bug 25490, nanorc: "include"ing a file which doesn't exist causes nano to segfault.
2009-02-05 Chris Allegretta <chrisa@asty.org>
* More color syntax speedups: Determine in reset_multis() whether we really need to call
edit_refresh(). Additional global var edit_refresh_needed() to hopefully reduce
repeated calls to the function. New helper funcs reset_multis_before() and
reset_multis_after().
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>.