Commit Graph

156 Commits (d7b804ab6d6b05bade576f72d7ba6012943e7680)

Author SHA1 Message Date
David Lawrence Ramsey 3ea0b1d6d8 fix breakage and typos
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@3408 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2006-04-21 02:30:53 +00:00
David Lawrence Ramsey 5f0a58b055 add missing alternate meta key sequences
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@3407 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2006-04-21 02:24:34 +00:00
David Lawrence Ramsey df45365592 add shortcuts to go to the first or last line of the file from the main
list, make all the equivalent shortcuts elsewhere consistent, and
simplify input parsing in do_help()


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@3406 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2006-04-21 02:05:09 +00:00
David Lawrence Ramsey 6397b592fb cleanups: fix M-M/M-N toggle inversion, and reorder toggle #defines in
nano.h to match the new order in toggle_init()


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@3405 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2006-04-20 22:36:10 +00:00
David Lawrence Ramsey e313f5b2c8 reorganize the global toggle list to make it easier for new users, per
Benno Schulenberg's suggestion


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@3404 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2006-04-20 22:29:02 +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 e38b808959 implement filename searches in the file browser
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@3334 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2006-03-30 07:03:04 +00:00
David Lawrence Ramsey 3c43d3d688 replace VERMSG #define with PACKAGE_STRING #define (as defined by
autoconf)


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@3327 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2006-03-30 01:18:29 +00:00
David Lawrence Ramsey 04716301e0 comment fix
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@3319 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2006-03-24 15:32:52 +00:00
David Lawrence Ramsey 9149325400 in get_key_buffer(), if we fail to get a character over MAX_BUF_SIZE
times in a row, hang up regardless of the value of errno; this fixes a
problem where nano doesn't terminate properly under xterm if the user
su's to root, runs nano, and then closes the terminal window


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@3309 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2006-03-19 19:25:29 +00:00
David Lawrence Ramsey 9ffe78aa57 update copyright years
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@3274 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2006-02-03 18:59:17 +00:00
David Lawrence Ramsey 1f104f8079 fix a comment in nano.h and a minor memory leak in display_string()
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@3271 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2006-02-03 03:51:51 +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 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