Commit Graph

168 Commits (5b94b8e32276f43cac791bd10eb8a73abd4d74a6)

Author SHA1 Message Date
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 0ec909cb98 add the ability to move to the first and last file in the file browser
via Meta-\ (Meta-|) and Meta-/ (Meta-?)


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@3479 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2006-05-06 15:07:26 +00:00
David Lawrence Ramsey 12c1b5913a consistency fixes
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@3459 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2006-04-30 23:30:47 +00:00
David Lawrence Ramsey 6d1112314b typo fix
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@3447 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2006-04-28 13:23:17 +00:00
David Lawrence Ramsey f85001a368 add the ability to indent and unindent all marked lines of text, via
Meta-[ (Meta-}) and Meta-] (Meta-}), per Chris' patch with some changes
by me


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@3446 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2006-04-28 13:19:56 +00:00
David Lawrence Ramsey fe48da7d74 cosmetic fixes
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@3438 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2006-04-26 18:27:35 +00:00
David Lawrence Ramsey 58fabec261 formatting fixes
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@3437 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2006-04-26 17:39:41 +00:00
David Lawrence Ramsey bd5966061c in shortcut_init(), add Meta-} as an alias for Meta-]
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@3436 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2006-04-26 17:24:46 +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 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 bdf84dd8fb fix more breakage
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@3411 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2006-04-22 19:52:27 +00:00
David Lawrence Ramsey 1df3e2d0bf reorganize the main shortcut list to make it easier for new users, per
Benno Schulenberg's suggestion


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@3410 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2006-04-22 19:45:26 +00:00
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