Commit Graph

200 Commits (fd21be19fe4f2b5c33eaf79bba0ef3ffbeccf783)

Author SHA1 Message Date
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 8f4762a842 cosmetic and #ifdef fixes
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2874 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-07-16 22:35:11 +00:00
David Lawrence Ramsey 8f1afee813 fix color breakage; also, in main(), when opening files with
"+LINE,COLUMN" arguments on the command line, don't update the screen
when moving to their specified lines and columns


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2873 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-07-16 07:06:36 +00:00
David Lawrence Ramsey 0532296a10 more miscellaneous minor fixes
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2864 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-07-14 23:51:52 +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 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 dbcaa3b1fb fix some breakage caused by the restructuring
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2836 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-07-08 20:59:24 +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 612b41615b clean up the search code a bit
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2809 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-07-02 17:56:29 +00:00
David Lawrence Ramsey e3df8788b7 in do_replace(), blank out last_replace properly again just before
displaying the "Replace" prompt


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2808 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-07-02 17:49:27 +00:00
David Lawrence Ramsey 5beae58597 add one missing type change
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2792 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-06-29 00:17:18 +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 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 0517c482e4 typo fixes
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2756 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-06-21 22:37:47 +00:00
David Lawrence Ramsey 16799baccd change some instances of charcpy() back to strncpy(), as the latter's
numm-termination is needed in some places


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2755 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-06-21 22:32:50 +00:00
David Lawrence Ramsey c4ca596a90 various #ifdef fixes
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2703 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-06-16 20:58:19 +00:00
David Lawrence Ramsey 5c8197d78f miscellaneous cleanups in do_find_bracket(): rename variables for
consistency, and save the search direction and regexp setting in two
bools instead of one flags variable


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2702 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-06-16 20:41:20 +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 da72453859 add missing blank lines
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2678 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-06-15 19:15:14 +00:00
David Lawrence Ramsey e221311f2e don't count punctuation when searching for a whole word in
is_whole_word()


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2666 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-06-15 03:03:45 +00:00
David Lawrence Ramsey bdfa927d62 more miscellaneous cleanups
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2662 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-06-14 23:36:13 +00:00
David Lawrence Ramsey 8b698f4a29 more cosmetic fixes
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2647 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-06-13 05:16:55 +00:00
David Lawrence Ramsey 9880afc47a remove unneeded blank line
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2646 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-06-13 05:13:14 +00:00
David Lawrence Ramsey 5ed8819f35 revert the simplification of the display_string() call in
do_replace_loop(), as it breaks display in some ways


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2645 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-06-13 04:37:28 +00:00
David Lawrence Ramsey 7291daabe3 cosmetic fixes
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2644 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-06-13 04:11:20 +00:00
David Lawrence Ramsey d2edb8a538 when doing history string tab completion, skip over an exact match
unless it's the only match, as the old history code did


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2643 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-06-13 03:52:33 +00:00
David Lawrence Ramsey 33d07ef055 in do_replace_loop(), simplify the display_string() call that we use to
get the word that we're going to highlight


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2642 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-06-13 03:19:50 +00:00
David Lawrence Ramsey 67287088dc detect words more accurately by taking punctuation into account, and
convert all word-detecting functions to use the same wrapper function
for ease of maintenance


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2640 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-06-13 02:40:04 +00:00
David Lawrence Ramsey c4dbdd55f5 in do_replace_loop(), when moving to the next match, update the screen
using edit_refresh() instead of edit_redraw(), as the latter won't work
properly when we've replaced one or more instances of a string in copy
and haven't yet updated current->data to match copy


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2599 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-06-06 03:46:32 +00:00
David Lawrence Ramsey 81e49a0d4a fix #ifdef
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2589 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-06-03 21:00:55 +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 8fda94246b remove erroneous if block in update_history() preventing the history
list position from being properly moved to the bottom in some cases


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2587 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-06-03 20:18:46 +00:00
David Lawrence Ramsey 1addd601bc really fix bad #ifdefs; history functions are left out when NANO_SMALL
is defined, and history saving and loading functions are left out when
NANO_SMALL is defined and/or ENABLE_NANORC isn't defined


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2586 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-06-03 19:28:30 +00:00
David Lawrence Ramsey 47ae0d764e remove now-unnecessary null_at()
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2583 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-06-03 14:30:52 +00:00
David Lawrence Ramsey 34bdc35d94 readd tab completion of history strings, with a few minor tweaks
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2577 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-06-02 18:41:31 +00:00
David Lawrence Ramsey 95778fda70 fix mismatched #ifdefs
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2574 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-06-02 02:27:12 +00:00
David Lawrence Ramsey e0b55138b9 add missing blank line
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2572 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-05-31 17:35:11 +00:00
David Lawrence Ramsey e3970f503c replace all instances of strncpy() with charcpy(), since the only
difference between them is that the former pads strings with nulls when
they're longer than the number of characters specified, which doesn't
appear to be used anywhere


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2542 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-05-26 03:47:24 +00:00
David Lawrence Ramsey 16f88134f7 more miscellaneous minor fixes
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2541 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-05-26 03:32:41 +00:00
David Lawrence Ramsey 8b3266e83c fix inaccurate comments
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2540 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-05-26 02:46:42 +00:00
David Lawrence Ramsey 0a8ec176e4 really fix the off-by-one errors in LINE,COLUMN parsing; the column
number in do_gotolinecolumn() should always be one-based


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2539 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-05-25 18:44:37 +00:00
David Lawrence Ramsey c5e9a434b1 fix one last off-by-one error that occurs when do_gotolinecolumn() is
used interactively


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2537 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-05-23 20:16:29 +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 5754201944 when calling do_gotolinecolymn(), default to the current line and column
if the ones passed in are unspecified or invalid


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2527 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-05-17 22:27:15 +00:00
David Lawrence Ramsey 172767187e in do_gotolinecolumn(), start the search for a line from fileage instead
of current (again)


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2526 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-05-17 22:01:55 +00:00
David Lawrence Ramsey d3d37433ae mention the support for moving to a different column in the prompt
formerly known as the "Go to Line" prompt, and also in the help text
where possible


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2525 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-05-17 21:49:19 +00:00
David Lawrence Ramsey f83e5e2b13 fix off-by-one problems with COLUMN; it should be zero-based
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2524 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-05-17 18:29:05 +00:00
David Lawrence Ramsey 650b39c43d set placewewant more efficiently
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2523 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-05-17 18:15:00 +00:00
David Lawrence Ramsey 9245f97960 more LINE,COLUMN-related work: fix problems parsing it, and allow it at
the (soon-to-be-renamed) "Go to Line" prompt


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2522 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-05-17 18:06:26 +00:00
David Lawrence Ramsey 60a9bddcf6 formatting fix
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2521 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-05-17 16:54:34 +00:00
David Lawrence Ramsey e1ce92c90f in do_gotoline(), properly show an error message if we try to go to line
0, since the first line in the file is 1


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2520 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-05-17 01:55:44 +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
David Lawrence Ramsey 7f4dd35406 another cosmetic fix
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2503 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-05-08 17:08:51 +00:00
David Lawrence Ramsey 8f5e50991b cosmetic fix
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2502 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-05-06 17:03:53 +00:00
David Lawrence Ramsey 6bc26a9a8b revert some attempts at simplifying the search/replace history code that
were causing breakage; make "previous history" and "next history" use
separate keys; and display them as "^P" and "^N" instead of using one
sentinel value for both, so that clicking on them with the mouse works
again


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2497 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-05-02 21:48:34 +00:00
David Lawrence Ramsey 10f880c62f remove a redundant check in get_history_newer(), and add a few comment
fixes


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2493 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-04-29 03:24:43 +00:00
David Lawrence Ramsey e527e458f4 various #include fixes: since proto.h includes nano.h, only include the
former in source files; also add an #include guard to proto.h, and make
the config.h #include in nano.h match the config.h #includes everywhere
else


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2471 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-04-15 18:07:26 +00:00
David Lawrence Ramsey 7b918c76ee add missing blank lines
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2368 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-03-14 19:17:27 +00:00
David Lawrence Ramsey 202d3c2f97 add DB's overhaul of the rcfile parsing code and related miscellaneous
bits


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2345 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-03-10 20:55:11 +00:00
David Lawrence Ramsey b680326c37 cosmetic fix
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2319 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-02-12 23:59:20 +00:00
David Lawrence Ramsey e1c16b3744 add multibyte character support to is_whole_word(), plus a comment fix
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2318 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-02-12 23:09:27 +00:00
David Lawrence Ramsey 23c44504ad miscellaneous bits: change flags to an unsigned long and totsize to a
size_t, store the number of multibyte characters instead of the number
of single-byte characters in totsize, and add a few formatting fixes


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2302 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-01-27 20:49:07 +00:00
David Lawrence Ramsey 65658ef574 make sure the multibyte string operations operate using multibyte
character counts instead of byte character counts


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2280 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-01-16 20:05:36 +00:00
David Lawrence Ramsey 1bdccc5281 use the right number of characters when calling the multibyte equivalent
of strnlen()


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2263 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-01-14 15:27:33 +00:00
David Lawrence Ramsey 5508cc5b0a move nstrnlen() to chars.c, and add a multibyte equivalent of strnlen()
to it


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2259 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-01-14 04:22:14 +00:00
David Lawrence Ramsey 08cd7ef274 fix an assert, update another copyright year, and add a few more of DB's
tweaks to fix a few minor bugs with UTF-8 display at the statusbar
prompt


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2213 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-01-02 20:30:15 +00:00
David Lawrence Ramsey 3e81914b82 miscellaneous bits: fix the full justify segfault in a way that doesn't
break some normal full justifies, do a few more int -> bool conversions,
and fix a comment


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2209 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2004-12-31 04:10:28 +00:00
David Lawrence Ramsey fc693210d5 more steps toward UTF-8 support: port all the parts of DB's UTF-8 patch
that I currently understand to current CVS, with modifications of mine
to autodetect UTF-8 support and to display multibyte strings instead of
wide strings


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2193 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2004-12-23 17:43:27 +00:00
David Lawrence Ramsey c0b9d19ed7 yet another cosmetic fix
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2192 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2004-12-22 21:38:43 +00:00
David Lawrence Ramsey 40a6c8cb64 more formatting fixes
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2147 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2004-11-27 21:10:11 +00:00
David Lawrence Ramsey 3de81bc33d in do_replace_loop(), treat real_current as current and real_current_x
as current_x instead of using copies of them (which aren't kept up to
date) when calling findnextstr(); this fixes a problem where the search
can wrap when it shouldn't and skip over all matches after the wrap
point


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2119 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2004-11-22 17:08:41 +00:00
David Lawrence Ramsey 74d87073f0 unpartition_filestruct() should take a partition** instead of a
partition*, so that the partition it refers to is properly set to NULL


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2117 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2004-11-22 00:16:23 +00:00
Jordi Mallach 55381aa614 Include <config.h> only if HAVE_CONFIG_H.
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2107 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2004-11-17 23:17:05 +00:00
David Lawrence Ramsey 90e59c1a18 when doing marked spell-check, properly handle the case where the mark
ends in the middle of a word and that word is spell-checked; also move
the logic to detect an upside-down mark to mark_order() instead of using
the same logic in three different places, and rename a few variables for
consistency


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2070 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2004-11-05 23:03:03 +00:00
David Lawrence Ramsey dcc201b5b2 clean up the partitioning-related if blocks
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2060 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2004-11-05 14:37:18 +00:00
David Lawrence Ramsey f643fc2149 remove a bit of redundant code, and add a few more comment fixes
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2059 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2004-11-04 17:42:41 +00:00
David Lawrence Ramsey f978f040bd when (un)partitioning, don't save or restore fileage or filebot if
they're the same as top or bot; also add a few comment fixes


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2058 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2004-11-04 16:45:48 +00:00
David Lawrence Ramsey e1ee22fba2 in search_init(), when we're replacing and the mark is on, display a
prompt indicating that we're replacing text only in the selection
instead of the usual prompt


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2051 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2004-11-03 23:05:11 +00:00
David Lawrence Ramsey 40bdb686aa add code to partition a filestruct between a set of arbitrary
coordinates; given the coordinates of the beginning and end of the mark,
this allows proper and easier handling of saving marked selections,
replacing text only in marked selections, and spell-checking marked
selections using either the internal or alternate spell checker; do all
these using a global partition structure


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2050 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2004-11-03 22:03:41 +00:00
David Lawrence Ramsey 29f03dcff9 comment fix
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2049 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2004-11-03 21:11:38 +00:00
David Lawrence Ramsey 182b2c936f in do_replace_loop(), make real_current_x a const filestruct* again
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2048 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2004-11-03 16:02:41 +00:00
David Lawrence Ramsey 99869f54b5 fix crash in mallocstrncpy() call
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2046 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2004-11-02 20:48:37 +00:00
David Lawrence Ramsey 4a1fc558cf add new function mallocstrncpy()
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2045 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2004-11-02 15:18:30 +00:00
David Lawrence Ramsey e5e88fd9f2 fix problem found by Rocco: make search_last_line static to search.c
instead of local to findnextstr() so that search wrapping detection
works properly again


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2037 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2004-10-31 13:20:30 +00:00
David Lawrence Ramsey 687776b1a8 make mark_beginx a size_t instead of an int
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2035 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2004-10-30 01:16:08 +00:00
David Lawrence Ramsey 7a97e18667 make current_x a size_t instead of an int
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2034 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2004-10-30 01:03:15 +00:00
David Lawrence Ramsey 77b284af68 revert the marked replace code; it's hackish, and there appears to be no
easy way to make it work with the internal spell checker as is; it
should eventually be reimplemented to work at the findnextstr() level


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2031 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2004-10-27 02:21:01 +00:00
David Lawrence Ramsey 9bf486fe5d in do_replace_loop(), add new parameter canceled, set to TRUE if we
canceled at the prompt and FALSE otherwise; use it to make sure that
canceling works properly in all cases when using the internal spell
checker


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2028 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2004-10-26 20:58:30 +00:00
David Lawrence Ramsey 1758640682 cosmetic fixes
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2026 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2004-10-26 16:29:21 +00:00
David Lawrence Ramsey d9fb3e6bde remove more unneeded casts, and add an indentation fix
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2010 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2004-10-21 22:49:51 +00:00
David Lawrence Ramsey 484352241e in do_replace_loop(), check for more than one wrap at the right place
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2007 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2004-10-21 16:51:45 +00:00
David Lawrence Ramsey 2eb745939e when saving or changing file positions, be sure not to ignore
placewewant; also move a misplaced changelog entry


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2006 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2004-10-21 16:25:44 +00:00
David Lawrence Ramsey 3288925efb do the check for being outside the mark after the zero-length regexes
check, so that zero-length regex replaces work properly again


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2005 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2004-10-21 15:44:36 +00:00
David Lawrence Ramsey 9819ed031b fix infinite loop when we're doing a replace of marked text and the only
matches found are outside the marked text


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2004 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2004-10-21 15:32:11 +00:00
David Lawrence Ramsey 27fbc69ec4 yet more search code cleanups
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2003 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2004-10-19 21:09:37 +00:00
David Lawrence Ramsey 53752e8f9a fix findnextstr() so wholewords works properly with regular expressions
and in conjunction with no_sameline, and add a few other minor cosmetic
fixes


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2002 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2004-10-18 22:19:22 +00:00
David Lawrence Ramsey 2cc2a57dea rearrange the mark-handling code in do_replace_loop() a bit, and add one
more miscellaneous fix


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@1997 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2004-10-18 02:06:53 +00:00
David Lawrence Ramsey 6be5339265 more minor cosmetic fixes
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@1995 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2004-10-16 15:41:57 +00:00
David Lawrence Ramsey 4b7e3c3efa minor cleanups
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@1992 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2004-10-15 16:25:56 +00:00
David Lawrence Ramsey 1f204c0204 fix spurious warning message in do_gotoline() that was introduced when
it was overhauled, and also fix some indentation in statusq()


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@1990 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2004-10-15 01:39:46 +00:00