2010-04-02 Chris Allegretta <chrisa@asty.org>
* files.c (do_writeout): Previous fixes should not cause a crash
when saving a new file. Discovered by Mike Frysinger <vapier@gentoo.org>.
2010-04-07 Chris Allegretta <chrisa@asty.org>
* doc/man/nano.1,nanorc.5: Add warnings about using backup
mode as root due to the Dan Rosenberg security analysis.
2010-04-02 Chris Allegretta <chrisa@asty.org>
* files.c (do_writeout): Expand modification check to include both the
original file's device ID and inode number as reasons to warn the
user that the file has been modified. Based on security article on nano
by Dan Rosenberg.
Chris Allegretta [Sun, 21 Mar 2010 05:31:43 +0000 (05:31 +0000)]
2010-03-21 Chris Allegretta <chrisa@asty.org>
* nano.c (page_stdin et al): Don't attempt to reset/reopen the terminal
settings when reading stdin if it was aborted with SIGINT. May fix Savannah
bug 29114 reported by Mike Frysinger.
Chris Allegretta [Sun, 21 Mar 2010 04:35:17 +0000 (04:35 +0000)]
* move.c (do_page_up): Explicitly set current_y to 0 when paging up when not in
smooth scroll mode, as previous fixes would otherwise cause the cursor to not
really be moved to the stop of the screen.
2010-03-07 Chris Allegretta <chrisa@asty.org>
* configure.ac, nano.c (handle_sigwinch): Create check for whether LINES and
COLS can safely be redefined. Fixes compilation issues with cygwin, and likely
with newer versions of ncurses, fixes Savannah bug 28984 repoted by Andy Koppe
and Eric Oliver via mailing list.
* winio.c (get_mouseinput) - fix stray semicolon in code, also reported in
bug 28984.
Chris Allegretta [Fri, 29 Jan 2010 03:40:58 +0000 (03:40 +0000)]
2010-01-28 Chris Allegretta <chrisa@asty.org>
* move.c (do_page_up, do_page_down): Fix for smooth mode not preserving cusor
position. Part one of fix for Savannah bug 21178 by Mike Frysinger.
Chris Allegretta [Sun, 17 Jan 2010 05:30:22 +0000 (05:30 +0000)]
2010-01-17 Chris Allegretta <chrisa@asty.org>
* nano.c (main), prompt.c (do_statusbar_input): Handle problems with an unmapped
function due to key rebinding, fixes crashes on FreeBSD repoted by Eitan
Adler <eitanadlerlist@gmail.com>.
Chris Allegretta [Thu, 14 Jan 2010 06:32:37 +0000 (06:32 +0000)]
2010-01-14 Chris Allegretta <chrisa@asty.org>
* files.c (do_writeout): Fix for crash / incorrect external modification warning
due to earlier fix in r4467.
Chris Allegretta [Wed, 13 Jan 2010 03:21:19 +0000 (03:21 +0000)]
2010-01-12 Chris Allegretta <chrisa@asty.org>
* move.c (do_page_up, do_page_down): Fix issues with not enough scrolling down/up
and cursor centering.
* winio.c (edit_scroll): Remove lots of needless checking of line length for
soft wrapping code.
* winio.c (edit_update) - Remove extra code for when updating with old_current outside
of the new buffer boundary and centering issues.
2010-01-04 Chris Allegretta <chrisa@asty.org>
* winio.c: edit_update, edit_redraw - Fix search not scrolling to the middle of the screen
(reported by alpha@qzx.com) and places where we rely on maxrows but should not.
Chris Allegretta [Wed, 23 Dec 2009 05:03:09 +0000 (05:03 +0000)]
2009-12-22 Chris Allegretta <chrisa@asty.org>
* files.c (write_file): Fix compatibility with previous stat fix and tiny mode.
2009-12-22 David Lawrence Ramsey <pooka109@gmail.com>
* global.c: Add new strings for forward/back in the file browser. New variables
nano_forwardfile_msg and nano_backfile_msg.
Chris Allegretta [Sun, 20 Dec 2009 05:55:41 +0000 (05:55 +0000)]
2009-12-20 Chris Allegretta <chrisa@asty.org>
* files.c (is_file_writable): remove assert check for f, since it's not
initialized at the time. Fixes Savannah bug 28309, reported by Zoltan Kovacs.
Chris Allegretta [Sun, 20 Dec 2009 05:46:35 +0000 (05:46 +0000)]
2009-12-20 Brian Szymanski <skibrianski via Savannah>
* src/files.c (write_file): Check stat struct exists, and if not use just obtained stat data.
Fixes Ubuntu bug 471568, "reproducible crash in nano on trying to save to a file
different than the one specified on the command line".
Chris Allegretta [Tue, 15 Dec 2009 18:07:17 +0000 (18:07 +0000)]
2009-12-15 Chris Allegretta <chrisa@asty.org>
* doc/nanorc.sample.in - Remove erroneous 'set suspendenable' as it's actually a
key binding (e.g. 'bind M-Z suspendenable all') and not a settable flag. Fixes
Savannah bug 28299 reported by Mike Frysinger.
Chris Allegretta [Sat, 12 Dec 2009 22:21:20 +0000 (22:21 +0000)]
2009-12-12 Chris Allegretta <chrisa@asty.org>
* text.c (do_delete), nano.c (do_output): Add check for length of current line
before and after adding/deleting text, and do full refresh if it is now
a different multiple of COLS. Also get rid of superfluous do_refresh
vars now that we have edit_refresh_needed.
2009-12-07 David Lawrence Ramsey <pooka109@gmail.com>
* global.c (shortcut_init), browser.c (do_browser): Fix M-W not being bound to
research in either main menu or browser.
2009-12-09 Chris Allegretta <chrisa@asty.org>
* files.c (read_file) - Add parameter for whether we should even try to check
file writability, as the message is useless when we're inserting into an
existing buffer. Fixes Savannah bug 28219.
2009-12-07 David Lawrence Ramsey <pooka109@gmail.com>
* global.c (shortcut_init): Many fixes for keybindings code oversights, including
restore page up/down and GotoDir to browser,
* browser.c (do_browser): Fix breaking out of a submenu (e.g. gotodir) breaks out
of browser altogether.
* doc/nanorc.sample.in: Add missing entries for fortran/ObjC/OCaml entries.
2009-12-03 David Lawrence Ramsey <pooka109@gmail.com>
* global.c (shortcut_init) - Remove help shortcut from help shortcut list :-) Tweaked
to reorder exit shortcut to end of list to not mess up prev/next shortcut symmetry.
2009-12-03 Eitan Adler <eitanadlerlist@gmail.com>
* doc/syntax/makefile.nanorc - Fix poor regex for all alpha characters which sometimes leads to
error messages, reported by gibboris@gmail.com.
2009-12-02 Chris Allegretta <chrisa@asty.org>
* text.c (add_undo, do_undo, do_redo) - Do not execute cases for SPLIT when DISABLE_WRAPPING
is defined. Fixes Savannah bug 28151 (anon).
2009-12-01 David Lawrence Ramsey <pooka109@gmail.com>
* Update documentation for 2.2 features including sample nanorc file, texinfo
file, man pages, UPGRADE file, and update copyright noticed for the current year.
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.