Commit Graph

264 Commits (ce0451348c775d5afb07e4b6e48d93c1693a9865)

Author SHA1 Message Date
David Lawrence Ramsey 6e738ac712 formatting fixes
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2129 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2004-11-23 22:30:32 +00:00
David Lawrence Ramsey d994ad5284 in get_edit_input(), readd parameter allow_funcs, as it's now needed as
a workaround for when unjustified text is stored in the justify buffer
and either the justify or the full justify shortcut is hit


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2128 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2004-11-23 21:40:26 +00:00
David Lawrence Ramsey bc3b92605e comment fixes
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2125 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2004-11-23 04:17:19 +00:00
David Lawrence Ramsey 93c8405bfa overhaul the cutting and uncutting routines and the justify-related
routines to back up and restore unjustified text to use the partitioning
code, as it greatly simplifies how they work; also back up and restore
unjustified text in its own buffer instead of the cutbuffer, and add a
few minor bug fixes to the overhauled routines


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2124 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2004-11-23 04:08:28 +00:00
David Lawrence Ramsey b5a7a5a2d6 in do_wrap(), make wrap_loc and word_back ssize_t's, to match fill, and
add a few minor cosmetic fixes


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2123 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2004-11-23 03:42:43 +00:00
David Lawrence Ramsey 3f35864b10 fix get_totals() so it properly handles NULL parameters, and restore
totlines after marked spell-check the way the justify routine does
instead of saving it and readding it later


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2118 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2004-11-22 16:04:18 +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 f6159047bc use top_x and bot_x where possible instead of recalculating entire
string lengths


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2106 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2004-11-17 20:47:14 +00:00
David Lawrence Ramsey 4db3d0adf7 comment fix
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2105 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2004-11-17 17:44:29 +00:00
David Lawrence Ramsey 6b769e5f5b formatting fix
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2104 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2004-11-17 16:59:34 +00:00
David Lawrence Ramsey 56cf034a12 comment fixes
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2096 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2004-11-15 18:44:30 +00:00
David Lawrence Ramsey 907725fde8 revert the handle_sigwinch() change, as other breakage occurs when
resizing or continuing from a suspend after a justify and it can't be
properly fixed without a rewrite


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2092 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2004-11-12 00:09:20 +00:00
David Lawrence Ramsey 1f1ebb85b7 in handle_sigwinch(), call shortcut_init(FALSE) defore redisplaying the
main list, so that "UnJustify" isn't erroneously displayed when we
justify, suspend, and then continue; also add a few last cosmetic fixes


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2090 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2004-11-11 21:50:01 +00:00
David Lawrence Ramsey 6299b0d752 improve another assertion
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2088 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2004-11-08 03:22:23 +00:00
David Lawrence Ramsey 2c31540fa9 improve assertion
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2087 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2004-11-08 03:19:10 +00:00
David Lawrence Ramsey fdd3becc1e allow blank buffers at the "Execute Command" prompt, and document it in
the help text


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2085 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2004-11-07 21:30:55 +00:00
David Lawrence Ramsey bde3e0e294 in both the internal and alternate spell checker, put the beginning and
the end of the mark at the beginning and the end of the spell-checked
text


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2073 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2004-11-06 02:37:25 +00:00
David Lawrence Ramsey cb09337993 rearrange a few if blocks for consistency
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2072 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2004-11-06 00:18:27 +00:00
David Lawrence Ramsey 46c604a14e oops; only work around the problem of the mark's being in the middle of
a spell checked word if the mark was on in the first place


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2071 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2004-11-05 23:55:58 +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 b73c0c0b09 if we're not inserting a file into a new buffer, partition the current
buffer so that it's effectively a new buffer just before inserting the
file, and only restore placewewant afterwards; this is the same behavior
we would get if we opened the file, added all of it to the cutbuffer,
uncut at the current cursor position, and closed the file


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2062 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2004-11-05 15:25:53 +00:00
David Lawrence Ramsey 1539837fe0 cosmetic fix
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2061 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2004-11-05 15:03:12 +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 8cbd4cb67f avoid potential segfaults while unpartitioning a filestruct
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2057 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2004-11-04 15:31:43 +00:00
David Lawrence Ramsey 84d0d59cbb remove most redundant includes of sys/stat.h; it's included in nano.h,
so it doesn't need to be included in files that include nano.h


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2053 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2004-11-04 03:53: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 2e83a50e95 properly handle the case of a function key with no preceding control key
in the help browser


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2040 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2004-11-01 22:35:26 +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 59f5e04fa8 cosmetic fixes
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2033 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2004-10-29 15:48:40 +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 d4ca9f2acb cosmetic fixes
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2029 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2004-10-26 21:14:56 +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 410efe9a47 add Rocco Corsi's patch to fix a problem in do_int_spell_fix() where if
the cursor is in the middle of a file, the spell checker will sometimes
only correct the misspelled word instances that appear before the cursor
position and then stop


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2027 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2004-10-26 16:54:19 +00:00
David Lawrence Ramsey cfa4a9c4fe remove the global DOS/Mac format toggles, for consistency with other
file operations like Append/Prepend that are specific to the "Write
File" prompt, and change the Mac format toggle to Meta-M, since that no
longer conflicts with the mouse support toggle; update the documentation
accordingly


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2023 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2004-10-24 17:20:31 +00:00
David Lawrence Ramsey c59979f067 add UTF-8 support to unget_kbinput(), and fix a minor memory leak in the
UTF-8 support code in get_kbinput()


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2015 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2004-10-23 02:47:39 +00:00
David Lawrence Ramsey bf1346f342 in main(), tweak the command line parsing routine so that multiple +LINE
flags are properly interpreted in multibuffer mode


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2014 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2004-10-22 20:25:56 +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 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 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 381d483986 help text updates, and a few more miscellaneous fixes
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@1996 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2004-10-18 01:51:43 +00:00
David Lawrence Ramsey 439fbe3e93 in do_alt_speller(), call terminal_init() unconditionally after running
the alternate spell checker, so that the terminal state is properly
restored in all cases


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@1994 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2004-10-16 04:56:34 +00:00
David Lawrence Ramsey 9cf7b28248 another minor cleanup
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@1993 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2004-10-15 16:35:34 +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 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 b112fe627d fix backwards #ifdefs
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@1980 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2004-10-09 17:15:46 +00:00
David Lawrence Ramsey d93ee682c0 in do_int_spell_fix(), move the REVERSE_SEARCH flag toggling into the
NANO_SMALL #ifdef, since the tiny version of nano doesn't support
reverse searching; also, turn the USE_REGEXP flag off during spell
checking in order to avoid a potential segfault


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@1979 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2004-10-09 16:59:43 +00:00
David Lawrence Ramsey 28caf14863 remove the -D/--dos and -M/--mac command line options, as they aren't
much use with the new file format autodetection


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@1973 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2004-10-07 20:54:52 +00:00
David Lawrence Ramsey 951d7148d1 add minor cosmetic fixes, and do another int -> bool conversion
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@1961 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2004-10-04 15:23:47 +00:00
David Lawrence Ramsey 3e189a8b9c in open_(prev|next)_file(), translate the "New Buffer" string when
displaying "Switched to" messages on the statusbar; also do a few more
int -> bool conversions


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@1959 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2004-10-03 19:18:48 +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 45f971d69b add missing func_key reference
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@1944 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2004-09-27 01:10:48 +00:00
David Lawrence Ramsey eb16f43cf9 add a func_key flag to the low-level input functions and the currently
existing high-level input functions, to indicate extended keypad values


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@1943 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2004-09-27 01:04:50 +00:00
David Lawrence Ramsey f3ca80e11d remove redundant include of limits.h from nano.c
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@1940 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2004-09-23 21:52:58 +00:00
David Lawrence Ramsey 013344c4c5 turn off extended input processing (the IEXTEN termios flag) as nano
1.2.x does


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@1939 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2004-09-22 22:45:08 +00:00
David Lawrence Ramsey d08348b99c make some ints that use the value of fill and can be greater than COLS
ssize_t's for consistency, and add a few minor cosmetic fixes


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@1938 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2004-09-18 22:02:21 +00:00
David Lawrence Ramsey e6ef8b9bb9 revert the blocking of meta sequences in main(), as it doesn't solve the
problem of meta sequences' sometimes being interpreted as printable
characters when they shouldn't be


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@1937 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2004-09-12 22:01:38 +00:00
David Lawrence Ramsey 807657b0fe document keeping meta sequences from getting through to do_char() in the
changelog, and update a related comment


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@1936 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2004-09-12 21:40:04 +00:00
David Lawrence Ramsey f887298c6e don't let meta sequences get through to do_char()
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@1935 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2004-09-12 21:30:36 +00:00
David Lawrence Ramsey db6015c7d7 make the help menu shortcut display more flexible, add more intuitive
aliases for moving to the beginning and end of a paragraph and
justifying the entire file, and make those aliases available in the main
shortcut list too, since Pico's practice of putting them in the search
menu is rather odd


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@1934 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2004-09-11 21:41:13 +00:00
David Lawrence Ramsey fd73c462f4 for more compatibility with Pico, remove extra space after a character
in punct if that character is the same as the one before it


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@1933 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2004-09-11 21:28:36 +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 6da969e44b work around the need to put back the first non-escape character when
reading an escape sequence


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@1920 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2004-08-28 15:51:07 +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 50c7f2de2f have edit_refresh() call edit_update() with NONE when smooth scrolling
is on so that smooth scrolling applies everywhere instead of just to the
movement functions, fix a potential infinite loop when edit_update() is
called with NONE and current_y is greater than (editwinrows - 1), and
have do_para_begin() and do_para_end() maintain current_y as
do_justify() does (and as they did before)


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@1917 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2004-08-27 17:02:05 +00:00
David Lawrence Ramsey dfca1c4ea6 add unget_kbinput(), a wrapper for ungetch()
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@1911 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2004-08-25 16:37:06 +00:00
David Lawrence Ramsey a0b5ba2f7f convert ints to bools in the low-level input routines, and consolidate
the high-level input routines for the edit window


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@1910 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2004-08-25 15:39:10 +00:00
David Lawrence Ramsey a27bd65057 per DB's patch, overhaul the rcfile and history file reading and writing
routines to fix a few fundamental problems and limitations; also add
getline() and getdelim() equivalents adapted from GNU mailutils 0.5 (and
tweaked to better integrate with nano), since the patch uses getline()


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@1900 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2004-08-17 05:23:38 +00:00
David Lawrence Ramsey bb50b305d5 a few more #ifdef tweaks, plus a few cosmetic fixes
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@1899 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2004-08-12 21:43:00 +00:00
David Lawrence Ramsey 7e8dd19a72 more #ifdef tweaks
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@1898 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2004-08-12 20:06:20 +00:00
David Lawrence Ramsey df13e3beef tweak some #ifdefs to avoid warnings when compiling with
--disable-wrapping, --disable-justify, or a combination of the two


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@1897 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2004-08-12 19:48:21 +00:00
David Lawrence Ramsey 69a28122c1 make sure that the shortcut list properly displays "Close" when reading
in multiple files on the command line


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@1895 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2004-08-12 04:34:00 +00:00
David Lawrence Ramsey 95e39e5f46 add missing error message simplifications from before
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@1892 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2004-08-12 02:52:14 +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 049e4a5db3 per DB's patch, simplify the saving of emergency files in die(),
die_save_file(), and get_next_filename()


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@1889 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2004-08-10 23:05:59 +00:00
David Lawrence Ramsey 6b24856c2f add titlebar() calls before all open_file() calls and remove the
titlebar() call after them, so that the titlebar is displayed properly
for all file(s) loaded; also add missing int -> bool conversion


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@1888 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2004-08-07 22:33:14 +00:00
David Lawrence Ramsey c7b6ac5afe cosmetic fixes for the getopt_(long)?() calls and the switch block
dealing with the command line options


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@1887 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2004-08-07 22:00:02 +00:00
David Lawrence Ramsey 00d7798756 per DB's patch, convert a few parts of files.c to use bool so that
open_pipe()'s failure is handled properly again, and add various
#ifdefs to fix a few warnings and compilation problems that occur when
everything is enabled manually including NANO_SMALL


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@1886 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2004-08-07 21:27:37 +00:00
David Lawrence Ramsey ce62e82a93 per DB's patch, convert nano.c to use bools wherever needed, add a few
efficiency tweaks, and fix a few minor bugs in help_init() where "Up"
and "Space" might not be displayed properly and the help browser
wouldn't work if fewer than 24 columns were available


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@1885 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2004-08-05 22:10:22 +00:00
David Lawrence Ramsey 76f63ff58d per DB's patch, convert more of nano to use N_() when possible; also add
a few more minor cosmetic fixes of mine


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@1883 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2004-08-05 15:45:09 +00:00
David Lawrence Ramsey 22fac783f5 per DB's patch, don't translate the option strings for -Z/--restricted;
also add a few more minor cosmetic fixes of mine


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@1882 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2004-08-05 15:16:19 +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 4d44d2de0e make lastwastab and list use TRUE and FALSE instead of 1 and 0, make
them bools in the process, and make a few other minor cosmetic cleanups


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@1880 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2004-08-01 22:35:31 +00:00
David Lawrence Ramsey b8c479a9e9 add DB's fix for a problem where quoted justify wouldn't work if
HAVE_REGEX_H wasn't set, and don't treat the return values of the string
comparison functions as boolean anymore


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@1877 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2004-07-31 14:10:23 +00:00
David Lawrence Ramsey a6d26d04fd rcfile tweaks: prompt only once for all rcfile errors instead of once
for each separate error, make sure all the messages end in newlines,
etc.


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@1876 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2004-07-30 22:52:44 +00:00
David Lawrence Ramsey 9ef3adbc1d add a consistency fix for do_enter() and a few minor cosmetic fixes
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@1874 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2004-07-30 17:30:17 +00:00
David Lawrence Ramsey 819c7f0327 add DB's overhaul of the paragraph searching code and some of the
justify code, as it makes some code much more understandable and fixes a
bug where searching for the previous paragraph would move the cursor too
high in one case


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@1873 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2004-07-30 03:54:34 +00:00
David Lawrence Ramsey 360093a652 add a few missing placewewant size_t conversions
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@1871 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2004-07-28 20:53:55 +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 331e659e98 minor cosmetic fix
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@1867 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2004-07-27 19:40:39 +00:00
David Lawrence Ramsey 8aaf03000b move the main terminal initialization functions, aside from initscr(),
into a new terminal_init() function, and convert nano to use it; also,
when reloading the newly spell-checked temporary file in
do_alt_speller(), call terminal_init() to make sure that all the
original terminal settings are restored, as a curses-based alternative
spell checker (e.g. aspell) can change them


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@1866 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2004-07-27 16:46:35 +00:00
David Lawrence Ramsey ad1fd0d968 per Junichi Uekawa's patch in Debian's version of nano, call setlocale()
outside the ENABLE_NLS #ifdef, since UTF-8 support (specifically, the
wide character handling functions it needs) won't work properly if the
locale isn't set, whether NLS is enabled or not


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@1865 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2004-07-27 15:46:58 +00:00
David Lawrence Ramsey 8037fe076b a few miscellaneous Pico compatibility tweaks and bugfixes (most
importantly, a fix for a segfault when trying to full-justify a file
with no paragraphs)


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@1862 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2004-07-23 12:30:40 +00:00
David Lawrence Ramsey 04419b9702 and reset tabsize and wrap_at to their default values if invalid rcfile
entries are specified for them


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@1860 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2004-07-18 18:13:54 +00:00