Commit Graph

1608 Commits (0b4920adc97175616b4b4b1a3f18d094520c15ce)

Author SHA1 Message Date
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 cf1879b706 tweak the shortcut list a bit more, and add Space and - as aliases for
PageDown and PageUp in the help browser, per Benno Schulenberg's
suggestions


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@3445 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2006-04-27 23:39:49 +00:00
David Lawrence Ramsey c208ef7f23 fix breakage when NO_NEWLINES is FALSE and we copy text that would
require adding a new magicline then


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@3440 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2006-04-26 19:03:50 +00:00
David Lawrence Ramsey c838a4cd45 comment fix
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@3439 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2006-04-26 18:33:50 +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 95b9850517 fix inaccurate comment
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@3435 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2006-04-25 13:07:31 +00:00
David Lawrence Ramsey 7504714882 fix segfault if we try to copy an empty selection
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@3432 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2006-04-25 02:56:54 +00:00
David Lawrence Ramsey 714c522413 add missing #ifdef
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@3431 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2006-04-25 02:40:58 +00:00
David Lawrence Ramsey fcff1e7401 cosmetic fixes
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@3430 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2006-04-25 02:35:33 +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 bc80cb1ba7 readd the Cancel -> Exit aliases for the file browser and help browser,
per Benno Schulenberg's suggestion, and clean up a few other
miscellaneous things


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@3428 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2006-04-24 23:03:21 +00:00
David Lawrence Ramsey 854a44a414 more cosmetic fixes
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@3427 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2006-04-24 21:14:55 +00:00
David Lawrence Ramsey 939d4239d4 in shortcut_init(), tweak the descriptions of two more shortcut keys to
make them more uniform, per one of Benno Schulenberg's suggestions and
one of mine


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@3426 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2006-04-24 21:00:17 +00:00
David Lawrence Ramsey 8137876426 another cosmetic fix
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@3425 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2006-04-24 20:53:43 +00:00
David Lawrence Ramsey bf487985bc better handle the insertion of blank lines after shortcuts when certain
features are disabled


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@3424 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2006-04-24 20:50:52 +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 9ea05902ec comment fixes
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@3422 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2006-04-24 19:44:04 +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 891e0ec281 in get_prompt_string(), include the handling of the help key even when
help is disabled, so that we aren't erroneously kicked out of the
statusbar prompt under any circumstances


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@3420 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2006-04-23 19:32:50 +00:00
David Lawrence Ramsey 40e0572100 in shortcut_init(), tweak the descriptions of some shortcut keys to make
them more uniform, per Benno Schulenberg's patch with minor tweaks by me


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@3419 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2006-04-23 19:21:12 +00:00
David Lawrence Ramsey 2ca2356802 adjust the main shortcut list a bit more, per Benno Schulenberg's patch,
and better handle the insertion of blank lines after toggles when
certain features are disabled


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@3418 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2006-04-23 19:15:15 +00:00
David Lawrence Ramsey 5a2dbe26d8 typo fix
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@3417 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2006-04-23 14:53:26 +00:00
David Lawrence Ramsey b88152d82d more typo fixes
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@3416 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2006-04-23 01:33:37 +00:00
David Lawrence Ramsey 241771ceb5 typo fix
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@3415 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2006-04-23 01:14:49 +00:00
David Lawrence Ramsey 4fd74e0db4 in help_init(), if we have at least two entries' worth of blank space,
use it to display more of "^Space" and "M-Space"


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@3414 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2006-04-23 01:10:55 +00:00
David Lawrence Ramsey 97415dfdc7 really fix #ifdef
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@3413 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2006-04-22 20:03:05 +00:00
David Lawrence Ramsey 03252d4fbc fix #ifdef
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@3412 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2006-04-22 20:00:23 +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 d7b804ab6d add missing #ifdefs
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@3409 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2006-04-22 18:20:14 +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 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 8ff785cf40 in toggle_init(), in the global toggle list, move the "Constant cursor
position display" toggle up to after the "Use more space for editing"
toggle, for consistency


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@3395 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2006-04-19 23:13:44 +00:00
David Lawrence Ramsey b9eb2be295 in shortcut_init(), in the main shortcut list, move the "Refresh"
shortcut down to after the "Enter" shortcut, for consistency


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@3394 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2006-04-19 22:55:37 +00:00
David Lawrence Ramsey efb4b0a96c add several blank entries to the main shortcut list, in order to make
its help text easier to read


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@3392 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2006-04-19 14:09:01 +00:00
David Lawrence Ramsey e6757b94d3 still more comment fixes
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@3391 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2006-04-19 13:36:56 +00:00
David Lawrence Ramsey e806ab8473 adjust the shortcut list display and related mouse support to not waste
the last few characters of bottomwin when the screen width isn't a clean
multiple of the column width, per Benno Schulenberg's patch (with a few
tweaks by me)


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@3390 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2006-04-18 16:13:35 +00:00
David Lawrence Ramsey 172aa93f4a another comment fix
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@3389 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2006-04-18 15:58:50 +00:00
David Lawrence Ramsey b61dc89f9a comment fixes
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@3383 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2006-04-15 17:21:52 +00:00
David Lawrence Ramsey 39b7189a13 in parse_syntax(), don't generate an error if we find a duplicate syntax
name, since we might be trying to override a syntax in the global nanorc
with one in our local nanorc; instead, free any duplicate syntaxes we
find, so that we always use the last syntax with a given name


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@3382 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2006-04-15 16:02:02 +00:00
David Lawrence Ramsey 8f6fb3c6b6 change translator-specific comments in search.c so that they show up in
nano.pot


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@3381 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2006-04-14 22:22:00 +00:00
David Lawrence Ramsey 57c9afb9e6 wording fix
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@3380 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2006-04-14 20:21:45 +00:00
David Lawrence Ramsey f50bd4be88 clarify some help text and documentation
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@3379 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2006-04-14 20:15:44 +00:00
David Lawrence Ramsey a33ec1deff in parse_syntax(), properly generate an error if we've read in a
previous syntax without any associated color commands


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@3377 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2006-04-14 17:20:53 +00:00
David Lawrence Ramsey 33619f1ac5 another error message consistency fix
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@3376 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2006-04-13 14:09:45 +00:00
David Lawrence Ramsey cee20e50c6 at long last, add the ability to use self-contained color syntaxes from
separate files, accessible in the nanorc via the "include" command


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@3372 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2006-04-13 02:43:54 +00:00
David Lawrence Ramsey 03ee332640 another comment fix
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@3371 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2006-04-12 22:03:47 +00:00
David Lawrence Ramsey f0134ea9b2 comment fix
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@3370 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2006-04-12 21:45:41 +00:00
David Lawrence Ramsey 5fac171c8b in do_rcfile(), check for the rcfile's being a directory or device file
and reject it if it is, for consistency with file handling elsewhere;
also remove SYSCONFDIR #ifdef, as SYSCONFDIR should always be set


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@3369 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2006-04-12 21:44:07 +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 61a70388fe remove inaccurate comment
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@3367 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2006-04-12 14:34:08 +00:00
David Lawrence Ramsey af318aaa5c make all translator comments consistent
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@3366 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2006-04-12 12:54:23 +00:00
David Lawrence Ramsey cde9039335 change translator-specific comments in global.c and prompt.c so that
they show up in nano.pot


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@3365 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2006-04-09 18:27:42 +00:00
David Lawrence Ramsey be7fd8a9be clarify a comment
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@3364 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2006-04-09 18:24:54 +00:00
David Lawrence Ramsey 125b2f0be5 in write_file(), simplify the routine for closing the file just before
we indicate success on the statusbar


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@3362 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2006-04-07 05:33:05 +00:00
David Lawrence Ramsey adfecd24b4 simplify the previous fix; also, in write_file(), clarify the error
message when writing a temporary file for prepending fails


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@3361 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2006-04-07 04:37:14 +00:00
David Lawrence Ramsey 2420794355 in write_file(), if the original file is unreadable when we try to save
the backup, we can save the original file unless we're prepending, so do
it


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@3360 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2006-04-07 03:59:12 +00:00
David Lawrence Ramsey d9ae1d6d6a yet another comment fix
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@3359 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2006-04-07 03:57:23 +00:00
David Lawrence Ramsey 8055f0935f in open_file(), remove redundant wording in the error message when we
try to open a device file


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@3358 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2006-04-06 22:57:22 +00:00
David Lawrence Ramsey ac8dfca510 in safe_tempfile(), don't ignore $TMPDIR if it's set but blank, for
consistency


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@3356 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2006-04-06 21:41:48 +00:00
David Lawrence Ramsey e5af25baef in write_file(), if we can't save the backup file for some reason, at
least save the original file, if possible, since that's better than
saving nothing


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@3355 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2006-04-06 05:18:23 +00:00
David Lawrence Ramsey 9308e5210b still more comment fixes
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@3354 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2006-04-05 21:46:13 +00:00
David Lawrence Ramsey 5cbd990bf5 in parse_argument(), rename variable ptr_bak to ptr_save, for
consistency


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@3353 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2006-04-05 21:28:52 +00:00
David Lawrence Ramsey 979de2309b open all files in binary mode for consistency and robustness
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@3352 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2006-04-05 21:25:47 +00:00
David Lawrence Ramsey b0588ae45e more comment fixes
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@3351 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2006-04-05 16:58:45 +00:00
David Lawrence Ramsey ca70ff69ed comment fix
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@3350 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2006-04-05 15:05:05 +00:00
David Lawrence Ramsey 22e15eb7ad in write_file(), don't free backupname before displaying it in a
statusbar error message


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@3347 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2006-04-05 02:56:47 +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 1f479ee9fc more formatting fixes
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@3326 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2006-03-29 19:58:49 +00:00
David Lawrence Ramsey 804e107474 yet more cosmetic fixes
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@3325 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2006-03-29 19:43:32 +00:00
David Lawrence Ramsey 12c08ddf6e more cosmetic fixes
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@3323 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2006-03-25 15:56:40 +00:00
David Lawrence Ramsey e006c5131d cosmetic fixes
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@3322 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2006-03-25 15:23:55 +00:00
David Lawrence Ramsey 354597f0c2 in get_get_buffer(), die gracefully if input fails MAX_BUF_SIZE times,
not (MAX_BUF_SIZE + 1) times


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@3321 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2006-03-24 16:04:44 +00:00
David Lawrence Ramsey b8d9fb551b remove unneeded #include
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@3320 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2006-03-24 15:55:34 +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 9efbdea09c fix breakage
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@3318 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2006-03-24 05:36:16 +00:00
David Lawrence Ramsey 017dde2c81 formatting fixes
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@3317 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2006-03-24 05:28:03 +00:00
David Lawrence Ramsey 572207da79 formatting fixes
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@3316 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2006-03-24 04:22:45 +00:00
David Lawrence Ramsey 231158d61a in do_browser(), make old_selected a size_t too, to match selected
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@3315 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2006-03-23 23:17:27 +00:00
David Lawrence Ramsey 20323a82be comment fix
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@3314 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2006-03-23 22:14:40 +00:00
David Lawrence Ramsey e6958d517d cosmetic fixes
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@3313 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2006-03-23 21:25:04 +00:00
David Lawrence Ramsey 27ad0cdb37 in do_browser(), make fileline and the static selected size_t's, since
the latter can hold the value of the former, and the former can be that
large


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@3312 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2006-03-23 20:36:29 +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 ec8a055ffd cosmetic fix
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@3310 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2006-03-19 19:26: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 1ec74ee30c remove unneeded blank line
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@3308 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2006-03-19 19:14:30 +00:00
David Lawrence Ramsey 7369c75828 remove erroneous assert
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@3304 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2006-03-16 17:45:12 +00:00
David Lawrence Ramsey ac0361df6e in do_writeout(), remove unneeded setting of currshortcut
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@3297 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2006-02-24 19:38:20 +00:00
David Lawrence Ramsey 6816007242 make sure browser_refresh() is used when refreshing or doing tab
completion at the prompt in the file browser


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@3296 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2006-02-18 21:32:29 +00:00
David Lawrence Ramsey 1f907c7413 rename browser_draw() to browser_refresh() for consistency
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@3295 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2006-02-10 19:02:30 +00:00
David Lawrence Ramsey d83af2fea7 fix file browser breakage
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@3294 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2006-02-10 03:27:48 +00:00
David Lawrence Ramsey d4bae13d8d move the browser drawing routines to a separate function, browser_draw()
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@3293 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2006-02-09 23:26:26 +00:00
David Lawrence Ramsey a8a9050083 really fix input parsing in the file browser
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@3292 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2006-02-09 22:53:54 +00:00
David Lawrence Ramsey 8326254643 go back to using a while loop in get_prompt_string(), as it's simpler
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@3291 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2006-02-09 22:42:14 +00:00
David Lawrence Ramsey 162ed2af24 in get_prompt_string(), initialize finished to FALSE so that the
do/while loop works properly


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@3290 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2006-02-09 22:35:04 +00:00
David Lawrence Ramsey 3326603341 in get_prompt_string(), redraw the prompt and set finished to FALSE when
NANO_HELP_KEY is pressed, so that we don't leave the prompt, enter the
help browser, and restart the prompt after leaving it; this will
properly preserve the cursor position after doing the last of these


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@3289 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2006-02-09 21:43:14 +00:00
David Lawrence Ramsey 08f4974093 in shortcut_init(), remove erroneous handling of the "Get Help" shortcut
in the file browser shortcut list


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@3288 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2006-02-08 20:33:45 +00:00
David Lawrence Ramsey 591c409f3f in get_prompt_string(), use a do/while loop instead of a while loop, for
consistency


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@3287 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2006-02-08 20:14:49 +00:00
David Lawrence Ramsey c0dcdf43c6 in do_browser(), properly restore the file list display after returning
from the help browser at the "Go To Directory" prompt, and rename
variable j to i, for consistency


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@3286 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2006-02-08 19:27:02 +00:00
David Lawrence Ramsey 47d917eea7 remove redundant code
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@3285 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2006-02-08 05:16:32 +00:00
David Lawrence Ramsey 8a1a886fbe add another missing blank line
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@3284 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2006-02-08 05:01:58 +00:00
David Lawrence Ramsey 5443b46241 add missing blank lines
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@3283 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2006-02-08 04:02:30 +00:00
David Lawrence Ramsey 9b268c2ebf fix compilation problem
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@3282 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2006-02-07 21:16:46 +00:00
David Lawrence Ramsey 33f2a08b5c update copyright years
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@3281 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2006-02-07 21:11:49 +00:00
David Lawrence Ramsey 9d8c284135 allow tab completion of directories at the "Go To Directory" prompt
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@3280 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2006-02-07 21:11:05 +00:00
David Lawrence Ramsey ef9dc83a4b fix file browser breakage
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@3279 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2006-02-07 20:10:28 +00:00
David Lawrence Ramsey 3d8d29d08a another formatting fix
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@3278 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2006-02-07 18:35:26 +00:00
David Lawrence Ramsey fc8e5cb0f2 cosmetic and formatting fixes
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@3277 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2006-02-07 18:32:22 +00:00
David Lawrence Ramsey 24e0a465c1 in do_browser(), properly set currshortcut back to the file browser
shortcut list after a "Go To Directory" prompt


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@3276 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2006-02-07 05:14:55 +00:00
David Lawrence Ramsey 91a2a69c4f rework input parsing in the file browser to be more flexible
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@3275 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2006-02-07 04:41:44 +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 114cfb63f4 in display_string(), fix memory corruption problems caused by not
allocating enough space for converted when a line ends in a tab(s) and
we're not in UTF-8 mode


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@3272 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2006-02-03 03:58:49 +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 66d3ebf6a6 fix potential infinite loop in mbrevstrpbrk()
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@3270 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2006-02-02 22:30:40 +00:00
David Lawrence Ramsey 3a5e6f9317 handle Shift-Delete properly when the -d option is used
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@3266 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2006-01-30 21:23:51 +00:00
David Lawrence Ramsey 475c402b65 in parse_kbinput(), interpret Shift-Begin, Shift-Delete, Shift-End,
Shift-Home, Shift-Insert, and Shift-Suspend as Begin, Delete, End, Home,
Insert, and Suspend, respectively, regardless of whether --rebindkeypad
is used


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@3265 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2006-01-30 01:32:41 +00:00
David Lawrence Ramsey 4a2e0000f7 fix more bracket matching breakage
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@3264 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2006-01-28 06:04:59 +00:00
David Lawrence Ramsey a6eb8480ea really fix the previous display problem with searches that move the
cursor offscreen and from a page other than the first one onto a
different page by reverting the erroneous change to edit_scroll() and
adding the proper fix to edit_redraw()


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@3263 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2006-01-10 07:51:49 +00:00
David Lawrence Ramsey 76f9485b02 in ngetdelim(), do sanity checks manually again instead of in an assert,
and set errno to EINVAL as well as return -1 if they fail; this matches
the manual page


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@3262 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2006-01-09 03:23:29 +00:00
David Lawrence Ramsey db2dc81cee fix multibyte bracket search breakage, and add documentation fixes
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@3261 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2006-01-06 22:35:52 +00:00
David Lawrence Ramsey 1a16df9284 fix "matchbrackets" breakage
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@3260 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2006-01-06 22:04:38 +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 a248863b43 rework the bracket searching code to handle multibyte bracket characters
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@3258 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2006-01-06 07:10:30 +00:00
David Lawrence Ramsey 5978f9b11d in mbstrchr(), make parameter c const
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@3257 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2006-01-06 05:54:44 +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 cb475886b1 clarify another comment
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@3255 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2006-01-02 17:09:35 +00:00
David Lawrence Ramsey 47cfd197b8 in edit_scroll(), redraw the lines before and after the scrolled region
even if the scrolled region was only one line; this fixes a display
problem that occurs after doing a search that scrolls the screen down
one line and leaves the cursor on the last line of the screen, in which
case we need to update the line after the scrolled region


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@3254 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2006-01-02 04:30:33 +00:00
David Lawrence Ramsey 5b7b3e3c9c cosmetic fixes
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@3253 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-12-31 21:22:54 +00:00
David Lawrence Ramsey 30bdadd4d5 revert previous erroneous change, and clarify comments
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@3252 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-12-31 21:08:10 +00:00
David Lawrence Ramsey 89b6e6b9dd in justify_format(), remove redundant character parsing
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@3251 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-12-31 20:37:56 +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 1e73bcfe29 fix inaccurate comment
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@3249 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-12-23 20:18:06 +00:00
David Lawrence Ramsey e57bd4993e in parse_line_column(), simplify parsing of the column number
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@3243 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-12-23 03:15:12 +00:00
David Lawrence Ramsey b0e04c0de3 a few last comment and consistency fixes
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@3238 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-12-08 07:24:54 +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 24777c0740 fix compilation with --enable-debug, and remove unneeded assert
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@3234 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-12-01 05:49:08 +00:00
David Lawrence Ramsey a685468a18 efficiency and comment fixes
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@3233 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-11-30 21:19:42 +00:00
David Lawrence Ramsey 26ebd35d54 in ngetdelim(), do sanity checks in an assert instead of checking them
manually and returning -1 if they fail


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@3232 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-11-30 19:33:56 +00:00
David Lawrence Ramsey 13b6115894 update the Free Software Foundation's address as needed in the copyright
notices taken from other sources


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@3231 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-11-30 18:57:05 +00:00
David Lawrence Ramsey 783062a0cc cosmetic fix
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@3230 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-11-30 16:41:54 +00:00