Commit Graph

66 Commits (85f8f46c40366ca6fb948d49879ac62e3e989676)

Author SHA1 Message Date
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
David Lawrence Ramsey 49d5c1bf1c minor fixes involving case insensitive searches and NANO_SMALL
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@1984 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2004-10-11 13:55:33 +00:00
David Lawrence Ramsey b6377c9d14 cosmetic fixes
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@1981 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2004-10-09 20:10:55 +00:00
David Lawrence Ramsey 3497666a21 in do_replace_loop(), if the mark is on when we start, skip over all
matches not found inside the marked text; this makes marked spell
checking when using the internal spell checker work as expected, and
also allows replacing only marked text when the mark is on


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@1978 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2004-10-09 16:26:32 +00:00
David Lawrence Ramsey 491cad3e5d miscellaneous cleanups in do_replace_loop(): set current to real_current
and current_x to current_x_save, only turn the mark off and call
edit_refresh() if the mark was originally on, and make length_change a
ssize_t


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@1977 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2004-10-08 23:06:01 +00:00
David Lawrence Ramsey d532f197b0 add parameter use_answer to search_init(); when it's TRUE, only set
backupstring to answer, so that we can preserve the text of the
statusbar when switching to the search prompt from the "Go To Line"
prompt; also, set backupstring before doing anything else, add one minor
efficiency tweak, and preserve the text of the statusbar no matter what
when switching from the search prompt to the "Go To Line" prompt, since
the toggling works both ways now and non-numeric text shouldn't be lost
when going only one of those ways


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@1965 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2004-10-04 22:37:56 +00:00
David Lawrence Ramsey 4c9e8f4211 remove redundancy erroneously introduced when adding the ^T toggle to
the "Go To Line" prompt


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@1963 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2004-10-04 16:01:37 +00:00
David Lawrence Ramsey 77e02a3e74 add another cosmetic fix
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@1962 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2004-10-04 15:53:40 +00:00
David Lawrence Ramsey ca744153fd add missing blank line
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@1956 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2004-10-01 18:47:17 +00:00
David Lawrence Ramsey e5d8f32834 add a bunch of key-related fixes: put Meta-( (Meta-9), Meta-) (Meta-0),
and Meta-J back in the shortcut list since Meta-G is used in the file
browser and not as a toggle, tweak nanogetstr() and statusq() so that
resetstatuspos can be reduced to a static bool, change the names of some
keys to be more consistent, and add the ^R^X^X and ^W^T^T shortcuts
(note that the latter doesn't preserve the contents of the statusbar yet
when ^T is pressed at the "Go To Line" prompt), and add a few other
miscellaneous tweaks


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@1954 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2004-09-30 22:07:21 +00:00
David Lawrence Ramsey 25884f3bdb more int -> bool conversions
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@1950 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2004-09-28 20:37:03 +00:00
David Lawrence Ramsey b77ec62cde for consistency, at the "Go To Line" prompt, display "Cancelled" instead
of "Aborted" if we cancel


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@1945 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2004-09-28 15:06:15 +00:00
David Lawrence Ramsey 02517e0a0f add DB's overhaul of the file loading code to increase efficiency,
remove ugly workarounds for most cases of edittop's or current's being
NULL (as those cases no longer occur due to the overhaul), and remove
detection of binary files (since it wasn't always accurate and will only
cause problems when UTF-8 support is added); also add a few minor fixes
of mine


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@1928 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2004-09-05 21:40:31 +00:00
David Lawrence Ramsey c510042bcd do more int ->bool conversions, change the order of the parameters in
findnextstr(), and make findnextstr() maintain the value of current_y
too


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@1918 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2004-08-27 20:28:34 +00:00
David Lawrence Ramsey 20b83508f4 simplify edit_update() so as not to require the fileptr parameter
anymore, since it's set to current in all calls


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@1915 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2004-08-26 18:07:58 +00:00
David Lawrence Ramsey d1322107a5 do another int -> bool conversion, and simplify the search/replace
"Cancelled" messages


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@1914 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2004-08-26 04:22:54 +00:00
David Lawrence Ramsey 6420d445c2 add a bunch of DB's miscellaneous fixes, plus a few of mine
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@1890 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2004-08-11 05:13:08 +00:00
David Lawrence Ramsey c53ab2a854 tweak parse_num() to return a bool, and fix backwards test of its value
so that numeric values will be preserved when switching to the "Go To
Line" prompt again


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@1881 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2004-08-04 18:24:53 +00:00
David Lawrence Ramsey 906257932f add my display tweak to do_replace(), my efficiency tweaks to
do_gotoline(), and DB's efficiency tweaks to do_gotopos()


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@1875 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2004-07-30 20:21:34 +00:00
David Lawrence Ramsey f56cc9e0e9 in do_replace_loop(), make sure old_pww is updated to the current value
of placewewant when a new match is found, so that edit_redraw() will
redraw the screen properly when only placewewant changes


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@1872 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2004-07-29 14:32:17 +00:00
David Lawrence Ramsey 86e851b4e7 per DB's patch, convert placewewant to a size_t; also add a few
miscellaneous fixes of mine


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@1870 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2004-07-28 20:46:25 +00:00
David Lawrence Ramsey fd3039a8e7 cut down on redundant inclusions of <sys/types.h>, include it in proto.h
per DB's patch, and make a few more minor cosmetic cleanups


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@1857 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2004-07-17 19:49:12 +00:00
David Lawrence Ramsey 300b87fda6 add missing part of the variable type changes in do_gotoline()
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@1854 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2004-07-12 16:26:55 +00:00
David Lawrence Ramsey 49c3f2406d port over DB's number parsing code and related bits, with a few minor
changes of mine, and add a few related variable type changes


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@1853 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2004-07-12 16:07:14 +00:00
David Lawrence Ramsey 576bf331ef various changes to cut down on binary size: per DB's patch, add new N_()
macro to mark strings that aren't translated immediately and convert
nano to use it where needed, overhaul the shortcut list and toggle list
initialization code for efficiency, and replace rcfile_msg() with
rcfile_error(); also add a few minor miscellaneous cleanups by DB and
myself


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@1852 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2004-07-12 03:10:30 +00:00
David Lawrence Ramsey edab0cc0a5 a few cleanups and consistency fixes
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@1837 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2004-07-03 03:09:12 +00:00
David Lawrence Ramsey 72e51ab037 per DB's patch (with a few updates of mine), convert the shortcut list
functions and most related functions to return void instead of int, as
the return values of all those functions are essentially unused; also
add a few related miscellaneous cleanups


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@1836 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2004-07-02 14:31:03 +00:00
David Lawrence Ramsey c21790d6d9 edit_redraw() fixes
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@1788 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2004-05-30 03:19:52 +00:00
David Lawrence Ramsey 483ea32c75 add Mike Frysinger's patch (with minor modifications) to allow
displaying other characters, specified in the rcfile, for the first
characters of tabs and spaces


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@1782 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2004-05-29 16:25:30 +00:00
David Lawrence Ramsey 9d325a03d9 cosmetic fixes
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@1779 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2004-05-29 03:03:52 +00:00
David Lawrence Ramsey 2ed225f78d overhaul the routines for movement and related things to eliminate
unneeded screen redraws


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@1774 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2004-05-28 20:44:09 +00:00
David Lawrence Ramsey c372488179 treat search_last_line as a boolean everywhere, and remove some unneeded
trailing spaces


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@1768 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2004-05-27 18:39:16 +00:00
David Lawrence Ramsey fa394047ba add DB's changes to titlebar() (with a few tweaks of mine) to make it
handle shorter screen widths better and display the filename using
display_string(), my strnlen() equivalent so the new titlebar() will
work on systems without strnlen(), and a few of DB's other minor changes
to make other display-related functions handle shorter screen widths
better, among other things


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@1754 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2004-05-23 21:11:14 +00:00
David Lawrence Ramsey 5aa39834aa disable "Where Is Next" in tiny mode
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@1727 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2004-05-05 21:36:50 +00:00
David Lawrence Ramsey 4b741b9c7b add DB's overhaul of regexp_init() and a few other regex-related bits,
and convert REGEXP_COMPILED to a static int in search.c, since it's only
used there


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@1724 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2004-04-30 19:40:03 +00:00