Commit Graph

143 Commits (034b994eb55006364c20b0baa0ad018b380ea2ef)

Author SHA1 Message Date
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 ae9eea7634 use more intuitive descriptions for the scrolling keys
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@3151 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-11-10 07:40:55 +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 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 2de84c1c8d add the ability to scroll up or down single lines without scrolling the
cursor, via Meta-- and Meta-+; note that this is disabled when
NANO_SMALL is defined


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@3049 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-10-24 02:12:09 +00:00
David Lawrence Ramsey e283b0d638 cosmetic fix: sort the meta sequence #defines in ASCII order
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@3032 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-09-26 02:58:16 +00:00
David Lawrence Ramsey 093d500e15 if we don't have regex.h and hence regex support, disable color support,
as it depends on the use of regexes


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@3011 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-09-02 19:09:36 +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 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 bf0e47dc37 miscellaneous enum cleanups, including making the file-writing
functions' append parameter an enum instead of an int


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2966 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-08-01 18:27:10 +00:00
David Lawrence Ramsey 2385c1aa9b port over more of Brand Huntsman's old patch (with a few tweaks):
compile the file extension regexes on an as-needed basis too


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2948 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-07-29 21:42:08 +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 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 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 5b44f373fd really fix color breakage by decoupling edit_update() and
edit_refresh(); edit_update() is only called without edit_refresh() in
do_gotolinecolumn() if allow_update is FALSE, and in edit_refresh()
itself if edittop is out of range of current


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2875 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-07-16 22:47:12 +00:00
David Lawrence Ramsey 6a74c9224c fix stat breakage
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2870 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-07-15 19:37:32 +00:00
David Lawrence Ramsey d2361f0761 add minor fixes to the new color code, and merge parts of Brand
Huntsman's old patch in where applicable


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2858 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-07-14 18:33:51 +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 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 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 1d696c0047 work around slang brokenness
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2841 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-07-09 05:24:33 +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 da50e73c40 with the removal of the last snprintf(), we now only use vsnprintf(), so
remove snprintf()-related #ifdefs and checks


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2815 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-07-04 04:22:30 +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 6ea410e14e add missing int -> bool conversion
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2768 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-06-26 22:32:51 +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 c3e52f16ba per Jordi's suggestion, change the toggle for -E/--tabstospaces to
Meta-Q


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2750 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-06-21 17:44:01 +00:00
David Lawrence Ramsey b725353ab7 per Jordi's suggestion, remove the Meta-U toggle for -U/--quickblank;
the rcfile option is enough for those that use it regularly


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2749 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-06-21 16:19:47 +00:00
David Lawrence Ramsey 01e13ea1c1 comment fixes
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2745 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-06-21 04:16:12 +00:00
David Lawrence Ramsey 68c10963c4 revert last change, as the multibyte strcoll() functions can't handle
e.g. 2-to-1 character conversions as the original strcoll() can


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2744 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-06-21 04:11:04 +00:00
David Lawrence Ramsey d0c4d378b4 add a multibyte case-insensitive version of strcoll(), and make
diralphasort() use it so that filenames are sorted properly according to
the current locale


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2743 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-06-21 03:26:58 +00:00
David Lawrence Ramsey 5290e1bc84 comment fix
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2730 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-06-18 20:47:41 +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 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 ea01474c4b since the DISABLE_CURPOS flag is only used in winio.c, reduce it to a
static bool there


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2707 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-06-17 18:27:00 +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 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 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 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 d8640480c3 various cleanups to chars.c and related code
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2631 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-06-12 17:48:46 +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 092af14a82 cosmetic fixes
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2609 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-06-08 01:35:10 +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 934f9687bb overhaul the history code to work more consistently, and clean up
various parts of it; note that history tab completion has been removed


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2533 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-05-23 16:30:06 +00:00
David Lawrence Ramsey 0f476b99b7 comment fixes
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2531 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-05-22 04:16:36 +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