Commit Graph

87 Commits (b9b2fd52fface1824a267a3b14bf8c91c627824c)

Author SHA1 Message Date
David Lawrence Ramsey b9b2fd52ff in break_line(), only include the newline parameter if DISABLE_HELP
isn't defined, as it's only used then


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@3209 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-11-22 21:13:36 +00:00
David Lawrence Ramsey ccd1b7b50a miscellaneous minor fixes
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@3201 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-11-18 20:21:48 +00:00
David Lawrence Ramsey bd0b3cd39b in do_justify(), don't save current_y and restore it if the user
unjustifies, as the reset_cursor() called by edit_refresh() after
restoring edittop and current will ensure that current_y is restored to
its original value


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@3189 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-11-16 04:41:31 +00:00
David Lawrence Ramsey c5c5230b9d overhaul the bracket searching code so that it no longer requires regex
support to work, and add some miscellaneous search code cleanups


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@3183 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-11-15 23:45: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 3f7c8c5158 fix copyright years on source files; all functions in browser.c were
originally added in 2001; the oldest function in color.c is
do_colorinit() (now color_init()), which was originally added in 2001;
the oldest function in chars.c is revstrstr(), which was originally
added in 2001; the oldest function in help.c is do_help(), which was
originally added in 2000; the oldest function in prompt.c is statusq()
(now do_prompt()), which was originally added before 0.6.6, which was
apparently in 1999; all functions in rcfile.c were originally added in
2001; one of the oldest functions in search.c is do_search(), which was
originally added in 0.2.7, which was apparently in 1999; and one of the
oldest functions in text.c is do_wrap(), which was originally added in
0.3.1, which was apparently in 1999; also, for functions originally
adapted from other sources, add notices from the original files, as we
do with the tab completion functions adapted from busybox


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@3172 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-11-14 22:20:35 +00:00
David Lawrence Ramsey d82dae0925 fix the last of the breakage (I hope) in find_paragraph() and
do_justify()


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@3161 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-11-11 05:13:28 +00:00
David Lawrence Ramsey bdff665b5d fix still more find_paragraph() breakage
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@3160 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-11-11 04:14:33 +00:00
David Lawrence Ramsey 1be131a9f9 fix more find_paragraph() breakage
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@3159 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-11-11 03:55:52 +00:00
David Lawrence Ramsey 8b203d6f22 fix yet more do_justify() breakage
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@3158 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-11-11 03:17:44 +00:00
David Lawrence Ramsey 53f641f909 fix still more do_justify() breakage
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@3157 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-11-10 21:57:56 +00:00
David Lawrence Ramsey 57f1bbd991 fix more do_justify() breakage
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@3156 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-11-10 21:53:46 +00:00
David Lawrence Ramsey cd8f73521e fix breakage in both backup_lines() and do_justify(); the latter's
return value is unneeded, as current will point to the same line when
it's done, and making first_par_line point to current in the former
ensures that the two will properly stay in sync


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@3155 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-11-10 21:20:32 +00:00
David Lawrence Ramsey 52161ee3a1 more cosmetic fixes
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@3154 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-11-10 19:56:26 +00:00
David Lawrence Ramsey 874ec8f259 fix more do_justify() breakage
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@3153 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-11-10 19:28:27 +00:00
David Lawrence Ramsey 985d586c3a revert change to do_justify(), since it's used when fileage may be
temporarily out of range


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@3152 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-11-10 16:46:50 +00:00
David Lawrence Ramsey e74851451d more comment fixes
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@3150 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-11-10 07:11:51 +00:00
David Lawrence Ramsey ad7cf31cbf comment fix
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@3149 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-11-10 06:25:01 +00:00
David Lawrence Ramsey 75689f3901 fix still more find_paragraph() breakage
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@3148 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-11-10 06:19:47 +00:00
David Lawrence Ramsey 82b5debb1b more do_justify() fixes
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@3147 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-11-10 06:07:57 +00:00
David Lawrence Ramsey b2d1c5f5b2 fix yet more do_justify() breakage
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@3146 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-11-10 06:01:41 +00:00
David Lawrence Ramsey b885c9c5e9 revert change to edit_update(), since it's used when fileage may be
temporarily out of range, and fix a comment


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@3144 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-11-10 05:20:25 +00:00
David Lawrence Ramsey e99223dd25 tweak do_wrap(), remove_magicline(), edit_scroll(), and edit_update() 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@3143 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-11-10 04:27:30 +00:00
David Lawrence Ramsey 6195f7c34c comment fix
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@3142 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-11-10 04:14:51 +00:00
David Lawrence Ramsey 653a5a3a45 tweak do_justify() to rely on fileage instead of NULL for its check to
detect the top of the file


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@3141 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-11-10 04:03:05 +00:00
David Lawrence Ramsey e8d505ba02 fix still *more* backup_lines() breakage
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@3140 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-11-10 03:40:45 +00:00
David Lawrence Ramsey 5d6f127948 fix still more backup_lines() breakage
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@3139 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-11-10 03:32:59 +00:00
David Lawrence Ramsey f0575cfa10 fix still more backup_lines() breakage
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@3138 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-11-09 23:27:51 +00:00
David Lawrence Ramsey af5a9997fd more do_justify() breakage fixes, and miscellaneous comment fixes
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@3137 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-11-09 23:06:44 +00:00
David Lawrence Ramsey c82bc8ba84 fix more backup_lines() breakage
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@3136 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-11-09 22:59:51 +00:00
David Lawrence Ramsey 1836a0fb7a fix break_lines() breakage
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@3135 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-11-09 22:42:37 +00:00
David Lawrence Ramsey 12090dd320 fix more find_paragraph() breakage
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@3134 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-11-09 21:53:21 +00:00
David Lawrence Ramsey 2101403824 cosmetic fixes
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@3133 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-11-09 20:33:42 +00:00
David Lawrence Ramsey 5455b6af46 fix more do_justify() breakage
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@3132 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-11-09 20:17:12 +00:00
David Lawrence Ramsey 9bedc4b71c fix breakage in find_paragraph() and do_justify()
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@3131 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-11-09 19:51:48 +00:00
David Lawrence Ramsey 47b693e582 add comment
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@3130 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-11-09 19:22:29 +00:00
David Lawrence Ramsey 2c5d0ecbb3 tweak find_paragraph() and do_justify() to remove the assumption that
the file always ends in a magicline; note that the latter isn't
completely fixed yet


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@3129 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-11-09 19:06:01 +00:00
David Lawrence Ramsey 5c33e88b25 finish tweaking backup_lines() to remove the assumption that the file
always ends in a magicline, and add documentation fixes


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@3128 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-11-09 18:58:04 +00:00
David Lawrence Ramsey 8bd960bbc9 minor backup_lines() cleanups
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@3127 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-11-09 18:49:16 +00:00
David Lawrence Ramsey 0083bd29d2 tweak begpar() to rely on fileage instead of NULL for its check to
detect the top of the file, and make it return NULL if foo is NULL, just
as inpar() does


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@3126 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-11-09 18:26:44 +00:00
David Lawrence Ramsey 32bd29e3cc cosmetic fixes
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@3122 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-11-09 03:44:23 +00:00
David Lawrence Ramsey 0f6236f556 *really* make deleting and cutting text consistent with each other, and
fix comments


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@3115 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-11-09 00:08:29 +00:00
David Lawrence Ramsey c9820ac098 more fixes for files that don't end in magiclines: make cut_line() cut
the text of the current line (if any), minus the nonexistent newline,
when we're on the last line of the file, and make sure again that the
file isn't marked as modified if the magicline is deleted and we're
supposed to have one, as it's more consistent that way (a marked cut of
the magicline adds a newline to the cutbuffer, while deleting the
magicline adds nothing)


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@3114 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-11-08 23:59:29 +00:00
David Lawrence Ramsey 0ed7171138 cosmetic fix
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@3113 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-11-08 23:09:47 +00:00
David Lawrence Ramsey 4ed8134699 revert last change, as the new bahavior is consistent with the behavior
when you cut the magicline with the mark


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@3112 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-11-08 23:08:08 +00:00
David Lawrence Ramsey d84cfb03df tweak do_delete() to not mark the file as modified if we delete the
newline before filebot and a magicline is added as a result, as it did
before the NO_NEWLINES flag was added


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@3111 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-11-08 22:59:10 +00:00
David Lawrence Ramsey 9c984e8e63 in do_alt_speller(), move the code that replaces the text of the current
file with the text of the spell-checked file into its own function,
replace_buffer()


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@3109 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-11-08 19:15:58 +00:00
David Lawrence Ramsey 1e0e235cbb make do_int_spell_fix() and do_alt_speller() take the NO_NEWLINES flag
into account


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@3108 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-11-08 18:34:12 +00:00
David Lawrence Ramsey 8779a17ffe initialize the static pid_t pid in text.c, just in case
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@3107 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-11-08 16:45:22 +00:00
David Lawrence Ramsey f400c23279 tweak do_alt_speller() to remove the assumption that the file always
ends in a magicline


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@3106 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-11-08 16:37:29 +00:00