Commit Graph

850 Commits (3e5fcec76c12b45a5dd12cb731e160c8e8fb1e0c)

Author SHA1 Message Date
David Lawrence Ramsey f3318a9c05 remove unneeded whitespace
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@4183 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2007-12-03 18:40:33 +00:00
David Lawrence Ramsey d8a1d37161 update copyright notices, as Chris Allegretta's copyrights have now been
assigned to the Free Software Foundation; also, make copyright notices
consistent in style


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@4173 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2007-10-11 05:01:32 +00:00
David Lawrence Ramsey c9694b7636 update copyright notices, as my copyrights have now been assigned to the
Free Software Foundation


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@4172 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2007-10-05 16:44:45 +00:00
David Lawrence Ramsey 64b8f423b2 properly handle more cases of inserting a file/uncutting text with the
mark on


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@4158 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2007-08-16 14:45:17 +00:00
David Lawrence Ramsey 1b2e77e4ff fix breakage
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@4157 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2007-08-16 04:05:05 +00:00
David Lawrence Ramsey ee89418102 more fixes for uncutting text/inserting files with the mark on
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@4156 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2007-08-16 03:23:30 +00:00
David Lawrence Ramsey d0035b4ab2 convert to GPLv3 or later
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@4147 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2007-08-11 05:17:36 +00:00
David Lawrence Ramsey d5a9800fb6 still more cosmetic fixes
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@4143 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2007-08-08 00:05:49 +00:00
David Lawrence Ramsey f03171917f simplify
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@4142 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2007-08-07 23:51:05 +00:00
David Lawrence Ramsey d1ab89a929 in copy_from_file(), fix potential segfault after uncutting one line of
text with the mark on by properly preserving the beginning of the mark;
also, make sure the mark is always properly positioned after uncutting
one line of text with the mark on


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@4141 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2007-08-07 20:21:39 +00:00
David Lawrence Ramsey 884ca5373b cosmetic fixes
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@4140 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2007-08-07 19:55:06 +00:00
David Lawrence Ramsey 129dfb6323 in version(), display copyright notices
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@4138 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2007-08-01 12:49:57 +00:00
David Lawrence Ramsey 1904f51fb5 more cosmetic fixes
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@4120 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2007-07-01 21:33:17 +00:00
David Lawrence Ramsey ebc38fd106 further simplify processing of mouse events by consolidating if clauses
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@4113 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2007-06-28 16:00:50 +00:00
David Lawrence Ramsey a78b4354bb replace the current hackish check for a UTF-8 locale with a proper call
to nl_langinfo()


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@4110 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2007-05-25 14:39:40 +00:00
David Lawrence Ramsey bc65313104 more various mouse support-related simplifications
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@4109 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2007-05-22 17:20:28 +00:00
David Lawrence Ramsey 3a5eaeb401 various mouse support-related simplifications, improvements, and fixes
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@4107 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2007-05-20 23:41:56 +00:00
David Lawrence Ramsey 817cb9e01f per Benno Schulenberg's patch, in usage(), reword the description of the
-S/--smooth command line option in order to differentiate it from the
associated toggle description


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@4063 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2007-02-01 15:25:29 +00:00
David Lawrence Ramsey 0e1df431a8 cosmetic fixes
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@4036 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2007-01-12 02:58:12 +00:00
David Lawrence Ramsey e44cd2dfba yet more miscellaneous comment fixes
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@4032 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2007-01-11 22:54:55 +00:00
David Lawrence Ramsey 9e7b2d572c more miscellaneous minor fixes
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@4031 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2007-01-11 22:46:22 +00:00
David Lawrence Ramsey 4154d08362 miscellaneous minor fixes
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@4028 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2007-01-11 21:36:29 +00:00
David Lawrence Ramsey cb04b56c92 more miscellaneous comment fixes
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@4022 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2007-01-09 22:56:56 +00:00
David Lawrence Ramsey 6335fb54d5 miscellaneous comment fixes
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@4012 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2007-01-01 05:15:32 +00:00
David Lawrence Ramsey 4fd1ca07a7 more comment fixes
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@3976 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2006-11-27 05:09:16 +00:00
David Lawrence Ramsey 81371020bb revert erroneous changes
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@3973 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2006-11-27 04:56:16 +00:00
David Lawrence Ramsey 50d78a6f9a don't allow filenames entered at the "Write File" prompt or the "Insert
File" prompt to contain nulls


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@3971 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2006-11-27 02:41:59 +00:00
David Lawrence Ramsey cb801d63a3 cosmetic copyright notice fixes
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@3950 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2006-11-10 02:47:11 +00:00
David Lawrence Ramsey 0c0cafbc19 comment fix
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@3915 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2006-10-26 15:55:39 +00:00
David Lawrence Ramsey a1b6997066 comment fix
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@3868 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2006-08-29 21:18:24 +00:00
David Lawrence Ramsey 9054e3a2ae fix breakage
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@3867 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2006-08-29 21:14:12 +00:00
David Lawrence Ramsey 1b3e4e117a fix misplaced do_prompt_abort()
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@3866 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2006-08-29 21:11:27 +00:00
David Lawrence Ramsey 3879528945 make sure that the statusbar cursor position is always properly reset
when we get out of all statusbar prompts


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@3865 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2006-08-29 20:54:38 +00:00
David Lawrence Ramsey 89ca96bd88 in handle_sigwinch(), just in case we're in the statusbar prompt, reset
the statusbar cursor position when resizing the window


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@3859 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2006-08-28 14:31:29 +00:00
David Lawrence Ramsey 0bbd290168 cosmetic fixes
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@3844 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2006-08-21 14:04:28 +00:00
David Lawrence Ramsey 7b0531aa0b per Benno Schulenberg's patch with a few tweaks by me, add various
clarifications to translated strings


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@3828 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2006-07-31 01:30:31 +00:00
David Lawrence Ramsey 4ac129c4bf when using slang 2.x, call SLutf8_enable() with an argument of 1 instead
of TRUE, as that's the proper way to force its UTF-8 support on


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@3799 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2006-07-19 19:40:54 +00:00
David Lawrence Ramsey e53e12559f rename the DISABLE_ROOTWRAP #define to DISABLE_ROOTWRAPPING
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@3798 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2006-07-19 15:50:19 +00:00
David Lawrence Ramsey 23994bd8a0 miscellaneous minor fixes
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@3797 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2006-07-19 13:34:55 +00:00
David Lawrence Ramsey 935594b14a add various cosmetic and #ifdef fixes
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@3790 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2006-07-18 18:16:30 +00:00
David Lawrence Ramsey 0d8feb9a85 remove unneeded blank lines
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@3783 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2006-07-12 19:30:54 +00:00
David Lawrence Ramsey 82697f2fcd don't include sys/ioctl.h in nano.c when NANO_TINY is defined, as
ioctl() is never used then


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@3780 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2006-07-12 18:57:04 +00:00
David Lawrence Ramsey 51b7b0e7d8 in browser_refresh() and titlebar(), don't display overly long filenames
with ellipses if the number of columns is extremely small; also, in
certain places, call wnoutrefresh(bottomwin) after calling
blank_statusbar(), in order to ensure that the statusbar is actually
blanked


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@3751 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2006-07-05 06:38:47 +00:00
David Lawrence Ramsey 98e4d4f3b1 fix mouse support so that it really ignores everything except releases
of button 1 (i.e, left clicks)


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@3686 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2006-06-28 21:54:55 +00:00
David Lawrence Ramsey 74d8ebc041 add various option description fixes
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@3683 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2006-06-26 04:39:31 +00:00
David Lawrence Ramsey 1df1c9e4c0 fix #ifdefs
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@3679 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2006-06-25 17:25:13 +00:00
David Lawrence Ramsey 503bad02fe disable mouse support while suspended
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@3655 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2006-06-09 18:24:37 +00:00
David Lawrence Ramsey 9134781eaf typo fix
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@3654 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2006-06-09 17:27:17 +00:00
David Lawrence Ramsey f073884e03 more comment fixes
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@3653 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2006-06-09 17:22:32 +00:00
David Lawrence Ramsey f9d13f02f3 comment fix
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@3652 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2006-06-09 17:10:45 +00:00
David Lawrence Ramsey b5e66d05cb make the changed suspend/continue routines work properly under slang
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@3650 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2006-06-09 16:57:41 +00:00
David Lawrence Ramsey 85c775a3a3 make suspension clear the screen and put the cursor on the last line
before displaying anything, as Pico does


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@3648 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2006-06-09 16:04:19 +00:00
David Lawrence Ramsey 8d42a3bfaa remove erroneous #ifdefs
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@3647 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2006-06-09 15:52:00 +00:00
David Lawrence Ramsey 69395f457d yet more wording fixes
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@3639 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2006-06-08 02:55:42 +00:00
David Lawrence Ramsey fed0195f2d still more wording fixes
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@3638 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2006-06-08 02:54:20 +00:00
David Lawrence Ramsey 69e1ce56df per Benno Schulenberg's patch with a few tweaks by me, add minor wording
fixes to various messages


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@3635 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2006-06-08 02:37:45 +00:00
David Lawrence Ramsey 96dce26401 various minor include fixes
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@3627 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2006-06-06 18:41:58 +00:00
David Lawrence Ramsey 888bc14416 amother cosmetic fix
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@3619 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2006-06-04 13:40:39 +00:00
David Lawrence Ramsey 106c1bf3d1 beep when we get an unhandled shortcut or toggle, as Pico does
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@3616 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2006-06-03 19:36:02 +00:00
David Lawrence Ramsey f70f67bd10 more miscellaneous minor fixes
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@3615 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2006-06-03 17:31:52 +00:00
David Lawrence Ramsey 5031ddf8ea don't display "Unknown Command" after a mouse click
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@3611 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2006-06-02 03:09:27 +00:00
David Lawrence Ramsey 1f5cf0d111 redundancy fix
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@3597 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2006-06-01 01:15:06 +00:00
David Lawrence Ramsey 6fb6689f0f various input/output fixes: allow normal typing of high-bit control
characters, as Pico does; in do_verbatim_input(), unconditionally blank
the statusbar as soon as we're finished getting input; and in
parse_verbatim_kbinput(), don't include the ability to enter a Unicode
sequence via verbatim input mode if ENABLE_UTF8 isn't defined


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@3584 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2006-05-27 17:39:19 +00:00
David Lawrence Ramsey d6eb17515d in parse_kbinput(), if we get Escape followed by an escape sequence,
interpret the escape sequence for consistency; also ignore unhandled
function keys for consistency


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@3565 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2006-05-25 21:39:25 +00:00
David Lawrence Ramsey 305d889e9d more cleanly ignore unhandled meta key sequences and escape sequences;
to get this to work properly, add a shortcut for moving to the next
search/replace string


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@3559 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2006-05-24 19:48:03 +00:00
David Lawrence Ramsey 8aa9ac3657 don't call wrap_reset() if we use verbatim input
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@3558 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2006-05-24 18:36:38 +00:00
David Lawrence Ramsey b4428a0268 fix breakage
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@3556 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2006-05-24 18:10:41 +00:00
David Lawrence Ramsey 592f46bf35 capitalization fixes
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@3555 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2006-05-24 17:37:39 +00:00
David Lawrence Ramsey 8e341e1b22 ignore unhandled meta key sequences and escape sequences, and indicate
it on the statusbar when we get an unhandled shortcut or toggle, as Pico
does


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@3554 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2006-05-24 17:36:00 +00:00
David Lawrence Ramsey 9133cbe258 add missing #ifdef
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@3549 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2006-05-22 15:45:24 +00:00
David Lawrence Ramsey ef0d5a7637 handle prepending of wrapped text in one place instead of many, so that
it always works consistently


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@3547 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2006-05-22 02:08:49 +00:00
David Lawrence Ramsey 41b8972dc9 various miscellaneous cutting fixes
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@3540 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2006-05-21 20:03:43 +00:00
David Lawrence Ramsey 83635c2155 in do_input(), don't blow away the cutbuffer when the shortcut we get is
do_cut_till_end()


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@3539 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2006-05-21 17:58:08 +00:00
David Lawrence Ramsey 75e9dfe5a4 comment fixes
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@3525 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2006-05-18 17:50:08 +00:00
David Lawrence Ramsey e77ebfa3fa more documentation updates from Benno Schulenberg, with a few tweaks and
additions by me


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@3513 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2006-05-14 15:19:38 +00:00
David Lawrence Ramsey 9dbd0d26c2 fix bad #ifdef
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@3508 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2006-05-13 13:02:14 +00:00
David Lawrence Ramsey b7d8926209 typo fix
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@3507 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2006-05-12 23:59:01 +00:00
David Lawrence Ramsey 660e05be3d miscellaneous cosmetic fixes
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@3506 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2006-05-12 19:30:28 +00:00
David Lawrence Ramsey 1c5af644b5 avoid unnecessary state saving for when we resize
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@3496 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2006-05-10 15:15:06 +00:00
David Lawrence Ramsey fc0f8f8c57 allow unjustifying if we resize the window immediately after justifying,
as Pico does, and make input handling across resizes more consistent


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@3495 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2006-05-10 13:41:53 +00:00
David Lawrence Ramsey d29e861376 in do_(statusbar_)?input(), remove redundant check for allow_funcs'
being TRUE when we get KEY_MOUSE


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@3494 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2006-05-10 13:06:58 +00:00
David Lawrence Ramsey 8992d0adaa formatting fixes
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@3493 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2006-05-10 12:48:47 +00:00
David Lawrence Ramsey 560e83f143 in usage(), fix inaccuracies in the usage example
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@3486 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2006-05-08 19:55:18 +00:00
David Lawrence Ramsey 5f274c4b49 handle NANO_CONTROL_8 even better by doing it in parse_kbinput()
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@3452 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2006-04-28 19:27:41 +00:00
David Lawrence Ramsey fbf46a5d88 in do_(statusbar_)?input(), if we get NANO_CONTROL_8, handle it instead
of ignoring it, for consistency


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@3451 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2006-04-28 18:59:34 +00:00
David Lawrence Ramsey c87e0c0965 add the ability to copy text into the cutbuffer without cutting it, via
Meta-^ (Meta-6); note that this is disabled when NANO_TINY is defined


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@3429 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2006-04-25 02:23:28 +00:00
David Lawrence Ramsey 9adc445c5c add missing #ifdef
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@3423 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2006-04-24 20:17:50 +00:00
David Lawrence Ramsey 18dae628d2 reduce NO_RCFILE to a static bool in nano.c, since it's only used there
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@3421 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2006-04-24 18:54:29 +00:00
David Lawrence Ramsey e904888324 in renumber(), remove invalid assert
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@3396 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2006-04-20 03:02:33 +00:00
David Lawrence Ramsey 4d72de73b1 add the ability to use bold text instead of reverse video text, via the
-D/--boldtext command line option and the "boldtext" rcfile option, and
reduce USE_UTF8 to a static bool in chars.c


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@3368 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2006-04-12 15:27:40 +00:00
David Lawrence Ramsey 9b33d51774 in get_key_buffer(), simplify the check for a lost input source, since
the errno check is unreliable


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@3311 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2006-03-20 04:46:48 +00:00
David Lawrence Ramsey d89617fb17 allow specifying matching bracket characters other than the default via
the "matchbrackets" rcfile option


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@3259 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2006-01-06 21:51:10 +00:00
David Lawrence Ramsey 5329f23345 sort the default strings for brackets and punct, and the "or" atom in
the default regex string for quotestr, in order according to ASCII, and
add minor related documentation updates


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@3256 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2006-01-03 04:53:41 +00:00
David Lawrence Ramsey ce029f2b11 remove unnecessary #ifdef around termios.h #include in nano.c
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@3250 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-12-28 05:01:00 +00:00
David Lawrence Ramsey 6d6a36c647 add descriptive comments to pretty much all functions and major
variables that don't have them, plus a few miscellaneous minor fixes


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@3237 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-12-08 07:09:08 +00:00
David Lawrence Ramsey 034b994eb5 since proto.h includes nano.h, and nano.h includes config.h first,
include proto.h first and remove redundant includes of config.h in all
non-header source files


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@3236 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-12-08 02:47:10 +00:00
David Lawrence Ramsey 8befda6490 readd RETSIGTYPE return types for signal handlers, since any problems
with its being defined as the wrong type aren't nano's fault


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@3235 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-12-06 19:39:56 +00:00
David Lawrence Ramsey 5453b0accf in version(), if DISABLE_WRAPPING is defined, the code in
DISABLE_ROOTWRAP #ifdefs isn't included, so don't display
"--disable-wrapping-as-root" in that case


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@3216 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-11-29 04:16:43 +00:00
David Lawrence Ramsey 315eb3280a adjust copyright notices in all source files to account for Chris'
reassigning the 2005-2006 copyright on nano to me


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@3215 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-11-28 19:35:29 +00:00
David Lawrence Ramsey ebe3425f9f rename the NANO_SMALL #define to NANO_TINY
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@3176 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-11-15 03:17:35 +00:00
David Lawrence Ramsey e19449ec50 actually use statusbar_pww in the statusbar prompt code to cut down on
redundant updates, add related functions to do that, and rename a few of
the statusbar prompt functions for consistency


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@3099 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-11-07 21:45:44 +00:00
David Lawrence Ramsey 37ddfa9dbd move do_verbatim_input() from nano.c to text.c, since it's an advanced
text-based operation


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@3096 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-11-07 06:06:05 +00:00
David Lawrence Ramsey a0168ca896 add new -L/--nonewlines command line option, and new "nonewlines" rcfile
option, to control whether nano adds magiclines to the ends of files


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@3091 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-11-05 17:35:44 +00:00
David Lawrence Ramsey 4eeff48c5f cosmetic fixes
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@3088 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-11-05 04:59:00 +00:00
David Lawrence Ramsey 2ffdea4fc1 tweak a few functions to remove the assumption that the file always ends
in a magicline, and to rely on fileage and filebot instead of NULL for
their checks to detect the top or bottom of the file


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@3080 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-11-03 21:08:39 +00:00
David Lawrence Ramsey 7e2d673b5f move functions specific to the help browser to their own source file,
help.c, and adjust related variables accordingly


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@3072 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-11-01 19:32:45 +00:00
David Lawrence Ramsey 3d12f0f53d refactor nanoget_repaint() to split out the new function
get_statusbar_page_start(), the statusbar prompt's equivalent of
get_page_start(); also make sure that the minimum allowed terminal size
in columns is 4, as the statusbar prompt code relies on this assumption
and will crash otherwise


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@3051 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-10-26 23:14:59 +00:00
David Lawrence Ramsey 93bef536f7 minor documentation fixes
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@3010 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-09-02 04:42:44 +00:00
David Lawrence Ramsey e4e6173389 in move_to_filestruct(), fix problem where edittop wouldn't be reset
properly if it was inside the text moved to another filestruct; also add
comment fixes and miscellaneous cleanups to it and
copy_from_filestruct()


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@3009 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-09-02 04:35:58 +00:00
David Lawrence Ramsey be614ec3b4 formatting fix
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@3008 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-09-02 03:08:09 +00:00
David Lawrence Ramsey e014fbda80 fix compilation with -pedantic
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@3007 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-08-29 19:11:26 +00:00
David Lawrence Ramsey 84fdb90e52 use doupdate() instead of refresh() to reenter curses mode
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2990 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-08-14 20:08:49 +00:00
David Lawrence Ramsey 31de105eec turn the keypad on in topwin again, and clean up do_credits() a bit
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2989 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-08-14 19:25:16 +00:00
David Lawrence Ramsey 4f03daff91 add new -W/--wordbounds command line option, and new "wordbounds" rcfile
option, to control whether the word movement functions treat punctuation
characters as part of a word


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2983 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-08-10 22:12:28 +00:00
David Lawrence Ramsey 6a3ac36420 in usage(), remove unneeded translation of "--quickblank"
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2982 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-08-10 21:52:59 +00:00
David Lawrence Ramsey 057edf7384 readd the option to turn the keypad off by default from nano 1.2.x, with
a few tweaks


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2980 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-08-10 21:22:15 +00:00
David Lawrence Ramsey 3f4520b348 fix display breakage
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2946 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-07-29 03:28:09 +00:00
David Lawrence Ramsey 6d8e495c37 remove still more redundant screen updates; change all wrefresh() calls
to wnoutrefresh() calls, except for those in total_update() and
do_credits(); call doupdate() just before using blocking input, since
nano spends the most time using it, for blocking input; and only do
constant sursor position display if we're just about to use blocking
input


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2943 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-07-26 14:42:57 +00:00
David Lawrence Ramsey 96452cb60c handle invalid multibyte characters more efficiently
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2941 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-07-26 06:13:45 +00:00
David Lawrence Ramsey d4defccded comment fix
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2940 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-07-26 05:20:02 +00:00
David Lawrence Ramsey 3f12ada4ef add various fill-related cleanups, plus some related cosmetic and
formatting fixes


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2934 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-07-25 22:54:16 +00:00
David Lawrence Ramsey 520a90c8d9 since the total number of lines in a file is the same as the number of
its last line when all its lines are numbered properly, use that in
place of openfile->totlines, and eliminate references to
openfile->totlines


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2933 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-07-25 21:23:11 +00:00
David Lawrence Ramsey 94d7cb6826 *really* fix mouse support breakage
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2932 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-07-25 20:36:27 +00:00
David Lawrence Ramsey 56d083779f really fix mouse support breakage
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2931 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-07-25 20:28:21 +00:00
David Lawrence Ramsey c35e351dd0 fix mouse support breakage
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2930 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-07-25 20:08:18 +00:00
David Lawrence Ramsey 22ae034f2d add more miscellaneous mouse support-related fixes, and move
do_statusbar_output() after do_statusbar_mouse(), to match do_output()'s
being after do_mouse() in nano.c


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2929 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-07-25 20:01:57 +00:00
David Lawrence Ramsey 3d5e94560d in do_mouse(), avoid redundant screen updates by using edit_redraw()
instead of edit_refresh(), and remove now-erroneous code that disables
setting the mark while in view mode


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2928 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-07-25 19:04:20 +00:00
David Lawrence Ramsey 7ea09e540f move mark setting, deleting, backspacing, tabbing, and entering of
newlines to text.c too


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2923 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-07-25 02:41:59 +00:00
David Lawrence Ramsey 4e5e1ae1a3 remove erroneous static declaration of fill; it's global now, since
text.c needs it too


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2920 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-07-24 19:59:54 +00:00
David Lawrence Ramsey 691698a954 move advanced text operations (command execution in a buffer, wrapping,
spell checking, justifying, and word counting) to their own source file,
text.c


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2919 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-07-24 19:57:51 +00:00
David Lawrence Ramsey c00513b65e fix alternate spell checker breakage: don't lose colors after using it
on a file


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2913 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-07-23 00:41:45 +00:00
David Lawrence Ramsey d1dc23bd78 cosmetic fixes
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2907 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-07-21 17:52:36 +00:00
David Lawrence Ramsey 7f343a6dc4 add comment and formatting fixes, and remove now-useless global-specific code
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2906 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-07-21 05:56:42 +00:00
David Lawrence Ramsey c4037f3055 move do_(next|prev)_word(_void())? to move.c too
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2904 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-07-20 21:31:19 +00:00
David Lawrence Ramsey e99494f21a add miscellaneous color and openfilestruct cleanups, and move the
openfilestruct functions to nano.c, since they're no longer specific to
file operations


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2903 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-07-20 21:08:38 +00:00
David Lawrence Ramsey ca62f9fa2b move the paragraph-searching functions to move.c, as they're movement
functions, and make them call check_statusblank() too; also reorder some
other movement functions


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2902 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-07-20 19:24:11 +00:00
David Lawrence Ramsey 826fbea8e1 add missing blank lines
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2895 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-07-19 04:50:55 +00:00
David Lawrence Ramsey 4c221675a8 comment fixes
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2883 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-07-17 15:40:49 +00:00
David Lawrence Ramsey 50a33dbbb7 per DB'S patch, in do_spell(), when displaying an error message from
do_(int|alt)_speller(), don't display the error message corresponding to
errno if errno is zero


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2882 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-07-17 03:50:22 +00:00
David Lawrence Ramsey 7eb30a8353 change NANO_WIDE #define to ENABLE_UTF8, as the latter is clearer
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2881 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-07-17 02:40:07 +00:00
David Lawrence Ramsey c104ef15a6 simplify get_totals() (renamed get_totsize()) to only get the total
number of characters, and eliminate dependence on its old ability to get
the total number of lines by renumber()ing when necessary and using the
number of the last line of a filestruct


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2879 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-07-17 01:44:35 +00:00
David Lawrence Ramsey 157ce9120b speed up character output, and fix edit_refresh() breakage
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2877 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-07-16 23:36:10 +00:00
David Lawrence Ramsey 8f4762a842 cosmetic and #ifdef fixes
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2874 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-07-16 22:35:11 +00:00
David Lawrence Ramsey 8f1afee813 fix color breakage; also, in main(), when opening files with
"+LINE,COLUMN" arguments on the command line, don't update the screen
when moving to their specified lines and columns


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2873 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-07-16 07:06:36 +00:00
David Lawrence Ramsey 26ee759503 add one last breakage fix
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2865 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-07-15 00:08:23 +00:00
David Lawrence Ramsey 0532296a10 more miscellaneous minor fixes
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2864 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-07-14 23:51:52 +00:00
David Lawrence Ramsey 443a766fe2 more miscellaneous breakage fixes
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2863 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-07-14 23:06:22 +00:00
David Lawrence Ramsey db95802a18 add breakage fixes, type fixes, and as-needed color regex compilation
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2854 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-07-13 20:18:46 +00:00
David Lawrence Ramsey e5c7e928c9 still more breakage fixes
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2852 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-07-12 23:06:22 +00:00
David Lawrence Ramsey 222b201afe miscellaneous minor fixes
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2851 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-07-12 20:09:24 +00:00
David Lawrence Ramsey 5128de8308 fix marking breakage
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2850 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-07-12 17:40:16 +00:00
David Lawrence Ramsey 112620432a per Ken Tyler's suggestion, simplify do_gotoline_msg further; also, in
usage(), properly mention the support for "[+LINE,COLUMN]" at the
command line when HAVE_GETOPT_LONG isn't defined


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2848 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-07-11 20:19:59 +00:00
David Lawrence Ramsey b386a905e6 use blank_line() instead of hblank/mvwhline(), and fix more breakage
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2844 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-07-10 02:37:38 +00:00
David Lawrence Ramsey b1ce64a375 remove redundancy
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2843 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-07-09 05:52:08 +00:00
David Lawrence Ramsey 2d705caec7 fix still more breakage caused by the overhaul
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2842 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-07-09 05:38:21 +00:00
David Lawrence Ramsey 56001845cd yet more breakage fixes
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2839 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-07-09 04:42:47 +00:00
David Lawrence Ramsey dbcaa3b1fb fix some breakage caused by the restructuring
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2836 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-07-08 20:59:24 +00:00
David Lawrence Ramsey 6ad59cd29b restructure things so that every file has its own openfilestruct, and so
that the values in it are used directly instead of being periodically
synced up with the globals; accordingly, remove the globals; this
changes pretty much every function


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2835 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-07-08 20:09:16 +00:00
David Lawrence Ramsey 64661ac140 rename filebuffer to openfile. as it's shorter
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2834 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-07-08 19:57:25 +00:00
David Lawrence Ramsey 9d8396d340 miscellaneous minor fixes
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2833 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-07-08 04:53:51 +00:00
David Lawrence Ramsey f8cb832b50 another formatting fix
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2832 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-07-08 03:15:09 +00:00
David Lawrence Ramsey 503f278547 rename variable open_files filebuffer, for consistency
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2831 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-07-08 02:51:58 +00:00
David Lawrence Ramsey 90573296ea reorder some functions for consistency
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2830 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-07-08 02:47:05 +00:00
David Lawrence Ramsey 826ab5a4fe formatting fix
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2829 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-07-08 02:36:16 +00:00
David Lawrence Ramsey d41b468975 more cosmetic fixes
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2828 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-07-08 02:18:23 +00:00
David Lawrence Ramsey 3e0f523d59 cosmetic fix
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2827 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-07-08 02:05:39 +00:00
David Lawrence Ramsey de03989e86 add more int -> ssize_t line number fixes, plus one formatting fix
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2826 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-07-08 02:01:07 +00:00
David Lawrence Ramsey 757f739367 reword an error message for consistency
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2825 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-07-08 01:49:43 +00:00
David Lawrence Ramsey 1228699f2c fix renumber_all() as well as renumber()
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2824 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-07-08 01:11:27 +00:00
David Lawrence Ramsey d72bdf17f4 in renumber(), when renumbering, properly use a ssize_t instead of an
int


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2823 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-07-08 01:08:25 +00:00
David Lawrence Ramsey 405ed0f822 typo fix
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2816 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-07-05 00:54:40 +00:00
David Lawrence Ramsey e927ce59d1 more minor variable tweaks
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2814 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-07-04 03:55:13 +00:00
David Lawrence Ramsey 892396bb7d in do_alt_speller(), if we can't invoke the spell checker, use sprintf()
instead of snprintf() to write the error string we return, as
altspell_error will always be long enough to hold it


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2813 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-07-04 03:43:54 +00:00
David Lawrence Ramsey 658f7e6630 minor variable tweaks
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2812 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-07-04 03:26:43 +00:00
David Lawrence Ramsey 9c3249c893 minor cosmetic and constant cursor position display fixes
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2806 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-07-01 22:58:47 +00:00
David Lawrence Ramsey 85c0b3c37e improve version()'s output
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2795 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-06-29 17:10:58 +00:00
David Lawrence Ramsey f816119b36 in find_paragraph(), reset placewewant as well as current_x to 0, in
order to avoid a potential screen update problem


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2793 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-06-29 01:27:33 +00:00
David Lawrence Ramsey a96c819b50 more comment fixes
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2790 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-06-28 19:56:14 +00:00
David Lawrence Ramsey 9e21c62c68 formatting fix
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2787 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-06-28 17:51:28 +00:00
David Lawrence Ramsey 2cf6d717f1 add various type changes to avoid problems on systems where int and
ssize_t are different sizes.  Make filestruct->lineno a ssize_t (so that
we can avoid negative line numbers at the "Go To Line" prompt),
current_y a ssize_t (in order to hold the maximum difference between two
filestruct->lineno's), totlines a size_t, and change related variables
to match


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2782 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-06-28 06:25:34 +00:00
David Lawrence Ramsey 6ad6b85862 more miscellaneous minor fixes
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2781 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-06-28 06:16:30 +00:00
David Lawrence Ramsey 18d6a7ae1a in do_justify(), save placewewant, and restore it if we unjustify, in
order to avoid a potential screen update problem


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2780 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-06-28 06:05:54 +00:00
David Lawrence Ramsey d4471ebe0e in do_toggle(), properly treat color syntax highlighting as enabled by
default, and only treat wrapping as enabled by default when
DISABLE_WRAPPING isn't defined


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2767 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-06-26 20:05:01 +00:00
David Lawrence Ramsey a8824a197e per Mike Frysinger's suggestion, change the word detection functions'
behavior back to what it was before (for now, until there's a way for
the user to control it), as their new behavior makes them harder to use
when editing source code; by the same token, leave word count's behavior
the way it is, since it's generally not used when editing source code


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2765 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-06-26 19:03:48 +00:00
David Lawrence Ramsey fe7d53e51e last-minute comment fixes
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2761 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-06-25 20:56:36 +00:00
David Lawrence Ramsey 5e50e2f51e in disable_flow_control() and enable_flow_control(), only turn off flow
control on input, as it might be needed for output on slow terminals


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2760 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-06-23 22:28:56 +00:00
David Lawrence Ramsey 7a3f49c019 remove all instances of charcpy() and replace them with strncpy(), for
ease of maintenance


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2758 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-06-22 00:24:11 +00:00
David Lawrence Ramsey 6c25819c34 cosmetic fixes
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2742 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-06-21 01:41:46 +00:00
David Lawrence Ramsey bd11c0171b recover properly when the alternate spell checker fails
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2741 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-06-21 01:33:31 +00:00
David Lawrence Ramsey 90d505cc4a comment and indentation fixes
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2732 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-06-18 22:33:55 +00:00
David Lawrence Ramsey c54c4d1eea rename total_update() total_redraw() for consistency
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2725 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-06-18 15:49:17 +00:00
David Lawrence Ramsey 166da9c893 fix still more minor display update problems
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2723 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-06-18 14:30:40 +00:00
David Lawrence Ramsey cd0210ff3e fix more minor screen update problems
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2722 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-06-18 14:05:21 +00:00
David Lawrence Ramsey 84635cd8e8 change the short option for --restricted from -Z to -R
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2717 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-06-17 22:53:41 +00:00
David Lawrence Ramsey 03987abebd fix misplaced long option
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2716 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-06-17 22:50:55 +00:00
David Lawrence Ramsey 3435a0ff64 rename the CONSTUPDATE flag to CONST_UPDATE, and clarify its description
in the help text


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2711 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-06-17 21:08:13 +00:00
David Lawrence Ramsey 66357b5462 add missing #ifdef
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2710 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-06-17 19:09:18 +00:00
David Lawrence Ramsey e29111f7ec add -U/--quickblank option, a Meta-U toggle, and a "quickblank" rcfile
option to blank the statusbar after 1 keystroke instead of 25; note that
this is disabled when NANO_SMALL is defined


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2709 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-06-17 19:06:25 +00:00
David Lawrence Ramsey 18a89a6cef more cosmetic fixes
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2704 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-06-17 17:37:46 +00:00
David Lawrence Ramsey f3ecffd24d add the "regexp" rcfile option back in at DB's suggestion, the
"casesensitive" and "backwards" rcfile options for consistency,
documentation updates, and related cleanups


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2700 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-06-16 18:48:30 +00:00
David Lawrence Ramsey d1cc007136 in usage(), remove inaccurate default listed for -Q/--quotestr
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2698 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-06-16 17:26:01 +00:00
David Lawrence Ramsey 25fb1025e9 fix assert
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2697 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-06-16 12:43:08 +00:00
David Lawrence Ramsey a9a3f4f599 fix compilation with --enable-debug
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2696 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-06-16 12:17:23 +00:00
David Lawrence Ramsey b2b6976bd9 change the SMOOTHSCROLL flag to the SMOOTH_SCROLL flag
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2692 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-06-16 02:13:10 +00:00
David Lawrence Ramsey 7a4aaa53a1 change the NO_UTF8 flag to the USE_UTF8 flag, and reverse its meaning
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2691 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-06-16 02:09:57 +00:00
David Lawrence Ramsey c1b960947e comment fix
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2689 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-06-16 01:37:13 +00:00
David Lawrence Ramsey 4846ce7a6a fix memory leak
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2688 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-06-16 01:36:10 +00:00
David Lawrence Ramsey a2ea733e3b comment fix
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2684 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-06-15 23:35:53 +00:00
David Lawrence Ramsey 40ad177210 revert erroneous help_init() changes
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2683 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-06-15 23:33:54 +00:00
David Lawrence Ramsey 6f143c8124 add the ability to convert (non-verbatim input) typed tabs to spaces
using the -E/--tabstospaces command line options, the "tabstospaces"
rcfile option, and the toggle Meta-E; also, change the short command
line option for --backupdir from -E to -C


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2682 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-06-15 23:20:56 +00:00
David Lawrence Ramsey 072f86c5f9 in do_spell(), if the spell-checker printed any error messages onscreen,
make sure they're cleared off


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2681 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-06-15 20:21:02 +00:00
David Lawrence Ramsey f271f9c962 cosmetic fix
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2680 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-06-15 19:26:48 +00:00
David Lawrence Ramsey 5a6caf0ca8 in do_int_spell_fix(), display highlighted misspelled words using
display_string(), as do_replace_loop() does


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2679 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-06-15 19:21:04 +00:00
David Lawrence Ramsey a01690c410 comment fixes
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2674 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-06-15 07:38:25 +00:00
David Lawrence Ramsey ff1a0ea32b cosmetic fix
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2673 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-06-15 07:34:09 +00:00
David Lawrence Ramsey 9c06f34ef9 more miscellaneous minor fixes
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2671 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-06-15 07:18:30 +00:00
David Lawrence Ramsey d1323e4e35 formatting and comment fixes
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2668 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-06-15 03:56:36 +00:00
David Lawrence Ramsey 7ae1a79641 formatting fixes
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2667 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-06-15 03:15:45 +00:00
David Lawrence Ramsey e221311f2e don't count punctuation when searching for a whole word in
is_whole_word()


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2666 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-06-15 03:03:45 +00:00
David Lawrence Ramsey 1e64db6629 more miscellaneous fixes
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2664 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-06-14 23:38:41 +00:00
David Lawrence Ramsey ce9d299c47 revert the changes to the behavior of Esc Esc [3-digit number from 000
to 255], as it still won't let us type all possible bytes


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2663 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-06-14 23:38:08 +00:00
David Lawrence Ramsey bfc183ba10 more cosmetic fixes
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2659 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-06-14 02:24:25 +00:00
David Lawrence Ramsey 399fe939f9 change the behavior of Esc Esc [3-digit number from 000 to 255] so that
it enters the byte with that value regardless of whether we're in UTF-8
mode or not, and update the help text to mention this; this will allow
searching for and replacing raw bytes with their equivalent multibyte
sequences as entered using verbatim input


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2653 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-06-13 17:26:19 +00:00
David Lawrence Ramsey 6a0d5b8fec miscellaneous minor fixes
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2649 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-06-13 14:00:22 +00:00
David Lawrence Ramsey 67287088dc detect words more accurately by taking punctuation into account, and
convert all word-detecting functions to use the same wrapper function
for ease of maintenance


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2640 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-06-13 02:40:04 +00:00
David Lawrence Ramsey e90f0b8a33 when the mark is on, only do a word count on the marked text
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2635 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-06-12 23:20:20 +00:00
David Lawrence Ramsey d232fa2fc3 remove unnecessary screen update
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2634 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-06-12 22:40:09 +00:00
David Lawrence Ramsey e010edd1f8 implement word count via Meta-D at the main window
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2633 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-06-12 22:31:03 +00:00
David Lawrence Ramsey 6315e2ff39 in do_tab(), remove unneeded variable kbinput
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2630 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-06-12 16:45:37 +00:00
David Lawrence Ramsey 068edf44fc more formatting fixes
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2629 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-06-12 16:13:44 +00:00
David Lawrence Ramsey aeeb96e628 cosmetic and formatting fixes
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2628 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-06-12 16:00:09 +00:00
David Lawrence Ramsey 3db0dc3d8d add macro charset(), a wrapper that calls memset(), and use it in
resize_variables()


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2627 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-06-12 15:24:36 +00:00
David Lawrence Ramsey c00f658026 in resize_variables(), use sizeof(char) in the memset() that initializes
hblank instead of assuming that the size of a char is 1


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2626 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-06-12 15:19:11 +00:00
David Lawrence Ramsey 8bcac8ad26 in disable_extended_input(), disable extended output processing as well
as extended input processing; also rename it to disable_extended_io()


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2622 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-06-09 04:02:57 +00:00
David Lawrence Ramsey 53aca71420 formatting fixes
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2621 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-06-09 04:00:03 +00:00
David Lawrence Ramsey f4595bb5ae in die(), if the current filestruct's been partitioned, unpartition it
before saving the associated file


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2600 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-06-06 16:27:18 +00:00
David Lawrence Ramsey c10d8ffe9f for consistency, remove -R/--regexp command line option, and allow the
toggle unconditionally


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2588 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-06-03 20:51:39 +00:00
David Lawrence Ramsey dac3bca274 clarify a comment, and don't try to display the buffer name in
die_save_file() if it's been blanked out by get_next_file()'s failure to
find a unique filename


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2573 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-06-01 04:23:52 +00:00
David Lawrence Ramsey 5e068c6031 rework the file-writing routines so that they can work properly with
already-opened files, such as the mkstemp()-created files used by the
spell-checking code


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2571 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-05-31 04:28:15 +00:00
David Lawrence Ramsey 0998a64fb9 cosmetic fixes
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2568 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-05-31 03:33:30 +00:00
David Lawrence Ramsey 527f1743f6 add documentation updates for -E/--backupdir's new ability to make
filenames unique, and preemptively update the version number


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2567 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-05-30 02:09:21 +00:00
David Lawrence Ramsey 54b74cee91 in die(), tweak the message displayed when a backup file can't be
written, so as to not duplicate a translted string


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2566 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-05-29 23:03:28 +00:00
David Lawrence Ramsey b9b572236a when using a backup directory, make sure all the filenames written are
unique by using get_next_filename() when necessary


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2565 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-05-29 02:22:55 +00:00
David Lawrence Ramsey 15aaa2c31a miscellaneous minor fixes
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2562 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-05-28 23:21:30 +00:00
David Lawrence Ramsey 31b159c1b3 add various fixes to avoid a hang and several potential assertion
failures when building with DEBUG defined


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2544 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-05-26 05:17:13 +00:00
David Lawrence Ramsey e4acb69611 another comment fix
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2543 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-05-26 04:00:39 +00:00
David Lawrence Ramsey e3970f503c replace all instances of strncpy() with charcpy(), since the only
difference between them is that the former pads strings with nulls when
they're longer than the number of characters specified, which doesn't
appear to be used anywhere


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2542 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-05-26 03:47:24 +00:00
David Lawrence Ramsey 0a8ec176e4 really fix the off-by-one errors in LINE,COLUMN parsing; the column
number in do_gotolinecolumn() should always be one-based


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2539 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-05-25 18:44:37 +00:00
David Lawrence Ramsey 86ce3903f9 in usage(), add formatting fixes and a missing N_()
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2529 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-05-21 17:15:46 +00:00
David Lawrence Ramsey f83e5e2b13 fix off-by-one problems with COLUMN; it should be zero-based
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2524 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-05-17 18:29:05 +00:00
David Lawrence Ramsey 9245f97960 more LINE,COLUMN-related work: fix problems parsing it, and allow it at
the (soon-to-be-renamed) "Go to Line" prompt


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2522 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-05-17 18:06:26 +00:00
David Lawrence Ramsey b68c01b753 move duplicate code from the +LINE,COLUMN feature into a separate
function, parse_line_column()


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2517 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-05-16 23:23:15 +00:00
David Lawrence Ramsey 9c8baed321 comment fix
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2515 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-05-16 19:43:04 +00:00
David Lawrence Ramsey 775eeba38a add the ability to open a file on a specified column as well as a
specified line, by allowing an argument of the form +LINE,COLUMN


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2514 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-05-16 18:38:16 +00:00
David Lawrence Ramsey 6e925cf330 update the Free Software Foundation's mailing address in various
comments


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2510 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-05-15 19:57:17 +00:00
David Lawrence Ramsey 5ebd73f9a5 more cosmetic fixes
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2505 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-05-14 20:52:20 +00:00
David Lawrence Ramsey 6bc26a9a8b revert some attempts at simplifying the search/replace history code that
were causing breakage; make "previous history" and "next history" use
separate keys; and display them as "^P" and "^N" instead of using one
sentinel value for both, so that clicking on them with the mouse works
again


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2497 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-05-02 21:48:34 +00:00
David Lawrence Ramsey 6595b715d0 oops; in do_output(), properly allow wrapping when we insert a tab, for
consistency; this is incompatible with Pico, but Pico doesn't wrap
properly when other control characters are on a line, either, so its
behavior with regard to tabs is apparently a bug; besides, we wrap at
all other blank characters, including multibyte ones, so we shouldn't
make an exception for tabs


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2491 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-04-26 17:21:47 +00:00
David Lawrence Ramsey e4cb3158fd in do_output(), fix an off-by-one error that allowed wrapping when we
inserted a tab, for Pico compatibility


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2489 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-04-25 22:48:58 +00:00
David Lawrence Ramsey 0bfec6e58d minor bits: fix slang compilation by calling clearok(TRUE) and
wrefresh() on edit instead of curscr, since slang's curses emulation
doesn't include a curscr equivalent; and revert Jordi's removal of a
space in the main help text, as its second paragraph won't be properly
indented by one space without it


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2487 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-04-25 20:08:29 +00:00
Jordi Mallach b9180f4a82 Remove bogus space from help text.
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2475 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-04-18 12:31:11 +00:00
David Lawrence Ramsey ad11460eb7 remove more unneeded clearok(TRUE)'s, and avoid an unnecessary update
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2474 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-04-16 18:27:57 +00:00
David Lawrence Ramsey e527e458f4 various #include fixes: since proto.h includes nano.h, only include the
former in source files; also add an #include guard to proto.h, and make
the config.h #include in nano.h match the config.h #includes everywhere
else


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2471 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-04-15 18:07:26 +00:00
David Lawrence Ramsey ac71fdde97 more cosmetic fixes
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2470 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-04-15 17:48:20 +00:00
David Lawrence Ramsey ffda704ef6 cosmetic fix
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2469 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-04-14 17:08:35 +00:00
David Lawrence Ramsey 6a244b689f various minor bits: add miscellaneous comment fixes; in
get_next_filename(), use a long instead of an int for the number
prepended to the filename; and in num_of_digits(), use a ssize_t instead
of an int


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2468 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-04-14 03:52:28 +00:00
David Lawrence Ramsey c2b07472e2 in print1opt_full(), if desc should be empty, allow it to be NULL
instead of "", since the latter is not necessarily translated as ""


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2467 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-04-14 03:13:49 +00:00
David Lawrence Ramsey aa683853d4 in help_init(), avoid a warning when compiling with -pedantic by
breaking overly long help text up into separate chunks, and add a few
wording fixes to the help text as well


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2442 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-03-30 18:11:59 +00:00
David Lawrence Ramsey b80d49f071 make sure that all references to cut-to-end are left out when NANO_SMALL
is defined


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2435 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-03-26 22:49:46 +00:00
David Lawrence Ramsey fe605247cb per DB's patch, in main(), change 0 to NULL in the option struct where
needed


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2434 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-03-26 22:49:08 +00:00
David Lawrence Ramsey bc6a36e40d move macro definition
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2421 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-03-22 20:17:38 +00:00
David Lawrence Ramsey 4e0b1ae332 add missing space in the help text, and fix an allocsize-related assert
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2417 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-03-22 03:58:51 +00:00
David Lawrence Ramsey c4daf5d49e in help_init(), when calculating allocsize, take multibyte characters
into account, and keep the column number limits consistent


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2416 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-03-22 02:51:01 +00:00
David Lawrence Ramsey b41df4a140 comment fixes
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2415 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-03-22 02:50:24 +00:00
David Lawrence Ramsey a853e2d650 in do_justify(), move break_pos after the space earlier, as do_wrap()
does with wrap_loc, as it's more efficient


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2414 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-03-22 02:17:36 +00:00
David Lawrence Ramsey 6b94e95ec9 in find_paragraph(), fix a problem where a search for the next paragraph
would skip over certain cases of one-line paragraphs


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2413 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-03-22 01:53:57 +00:00
David Lawrence Ramsey aad85151ae in do_justify(), instead of breaking a line at a space and readding the
space afterwards, just break the line after the space, as it's more
efficient


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2412 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-03-22 01:25:34 +00:00
David Lawrence Ramsey 39e8ce6f8e in printopt(), add DB's tweaks to make sure longflag isn't passed in
when HAVE_GETOPT_LONG isn't defined, and rework the special case of
options that are ignored for Pico compatibility so that they display
more neatly when HAVE_GETOPT_LONG isn't defined; in usage(), fix an
erroneous #ifdef that resulted in the -d/--rebinddelete and -k/--cut
options' not being printed when NANO_SMALL was defined


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2410 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-03-21 07:24:47 +00:00
David Lawrence Ramsey 2d825bae79 after (re)initializing the terminal, make sure the cursor is always
turned on


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2406 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-03-20 21:20:47 +00:00
David Lawrence Ramsey 3dd744f392 and make the locale string checks use the #defined strcasestr() alias if
necessary


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2402 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-03-20 07:26:47 +00:00
David Lawrence Ramsey 8974efa27b when checking the locale string, use nstrcasestr() if we don't have
strcasestr()


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2400 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-03-20 06:50:26 +00:00
David Lawrence Ramsey d96ee5260a add asserts to do_wrap()
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2399 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-03-20 03:10:31 +00:00
David Lawrence Ramsey 40e211bcec add full multibyte character support to do_wrap()
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2394 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-03-19 21:15:30 +00:00
David Lawrence Ramsey 9bd56204ee add multibyte character support to help_line_len(), so that UTF-8 help
text is wrapped properly


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2393 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-03-18 21:29:33 +00:00
David Lawrence Ramsey d456bfa10d add more locale string checks beyond case-sensitive "UTF-8" so that we
can better detect UTF-8 locales, adapted from Debian's UTF-8 patch for
slang


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2392 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-03-18 19:07:25 +00:00
David Lawrence Ramsey d44a005e3d make the #ifdef around indent_len() match that of its prototype, so that
we can compile with NANO_SMALL and !DISABLE_JUSTIFY again; also add a
comment fix


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2390 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-03-18 05:20:54 +00:00
David Lawrence Ramsey df21a2cbdf minor documentation fix
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2389 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-03-18 04:38:19 +00:00
David Lawrence Ramsey b9ddb80123 allow refreshing of the help browser window, as Pico does, and remove a
few stray spaces from the main help text


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2386 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-03-17 17:56:48 +00:00
David Lawrence Ramsey 27f2b258d3 initialize indent_string later in the justify code, so as to avoid a
possible memory leak


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2385 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-03-17 05:08:15 +00:00
David Lawrence Ramsey 102d01da6c fix justify code regression: if we're justifying the entire file, and we
haven't found any paragraph(s), we should refresh the screen and get out
instead of breaking out of the loop and acting as though we've justified
something, so as to avoid a segfault


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2384 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-03-17 04:48:14 +00:00
David Lawrence Ramsey fd81a7189b fix paragraph searching code regression: if trying to move to the line
after the end of the next paragraph leaves us on the same line where we
were before, the search should fail in order to avoid an infinite loop


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2383 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-03-17 04:24:12 +00:00
David Lawrence Ramsey efec641a82 control characters can only be properly filtered out in both non-UTF-8
and UTF-8 mode inside the output routines, so do it there instead of
inside the input routines


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2382 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-03-17 03:52:08 +00:00
David Lawrence Ramsey ba5b12c1fa comment clarifications
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2380 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-03-16 16:40:21 +00:00
David Lawrence Ramsey 40ea2a2ea0 actually, we can swallow non-ASCII control characters if we're not in
UTF-8 mode


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2379 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-03-16 16:32:33 +00:00
David Lawrence Ramsey 496488c5d2 when getting printable input from the edit window or statusbar prompt,
don't swallow non-ASCII control characters, since they're parts of UTF-8
sequences


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2378 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-03-16 15:34:22 +00:00
David Lawrence Ramsey 38156d4491 make the rest of the justify code support multibyte characters
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2371 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-03-15 05:44:03 +00:00
David Lawrence Ramsey 666644efbc fix more inaccurate comments
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2370 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-03-14 20:32:00 +00:00
David Lawrence Ramsey 15540051ac when justifying, don't remove a space after a duplicate character in
punct anymore, as it doesn't really make us more compatible with Pico


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2369 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-03-14 20:06:23 +00:00
David Lawrence Ramsey 9389ca29cf add more multibyte character support to break_line()
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2364 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-03-14 06:14:02 +00:00
David Lawrence Ramsey af40eeaa06 more comment fixes
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2363 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-03-14 04:31:44 +00:00