Commit Graph

902 Commits (ff1a0ea32b1bb67dfe5f99d9fb4a7e8f410a4321)

Author SHA1 Message Date
David Lawrence Ramsey 9ec5db8b42 comment improvement
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2359 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-03-13 20:39:33 +00:00
David Lawrence Ramsey 8d0d3abb72 more comment fixes
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2358 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-03-13 16:42:36 +00:00
David Lawrence Ramsey 7f9ed903ec fix regressions caused by the justify overhaul: when adjusting the mark,
take the indentation length into account, and don't declare an
indent_len variable inside a loop when we already have one outside


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2357 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-03-13 16:05:47 +00:00
David Lawrence Ramsey 96b21be5cf fix regression caused by the justify overhaul: when justifying a quoted
paragraph, don't put the indentation of the first line at the beginning
of every broken line unless that indentation was at the beginning of
every line originally


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2356 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-03-13 15:48:36 +00:00
David Lawrence Ramsey 7253929a55 fix erroneous comment
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2355 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-03-13 06:03:33 +00:00
David Lawrence Ramsey e9ac1d7930 overhaul the justify code to make it leave the right number of spaces at
the ends of the lines of a paragraph, and also to make it simpler


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2354 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-03-13 03:28:37 +00:00
David Lawrence Ramsey 59fe758a10 fix problem where mark_beginx wouldn't be saved properly in
backup_lines(), and add a few more cosmetic fixes


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2353 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-03-12 20:29:22 +00:00
David Lawrence Ramsey 800dd18fa4 when using slang, call the right function to enable UTF-8 support
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2350 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-03-11 17:46:01 +00:00
David Lawrence Ramsey b1d9b418b8 formatting fixes
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2349 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-03-11 04:22:34 +00:00
David Lawrence Ramsey e0fb4d5641 improve the handling of whitespace display mode in multibyte locales:
use new function make_mbstring() instead of display_string() to make
sure the multibyte string is valid and interpreted properly


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2348 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-03-11 04:03:32 +00:00
David Lawrence Ramsey 6e60db6989 make whitespace display mode work with multibyte characters
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2346 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-03-10 22:52:21 +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 b199caef7d make sure that the universal statusbar prompt functions are fully in
sync with their edit window counterparts, and add a few cosmetic fixes


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2340 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-03-09 20:35:10 +00:00
David Lawrence Ramsey c275dc575a attempt at fixing a problem tracked down by Jim Uhl, where nano will go
into an infinite loop if the terminal it's running in dies unexpectedly
due to a signal


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2339 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-03-08 17:45:36 +00:00
David Lawrence Ramsey 9d69169072 cosmetic fix
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2338 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-03-08 16:41:53 +00:00
David Lawrence Ramsey 5f9acfeee5 add a few more missing blank lines, and fix two instances where totsize
is miscalculated in multibyte/wide character mode


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2336 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-03-04 17:09:41 +00:00
David Lawrence Ramsey 9adace8c76 cosmetic fixes
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2335 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-03-04 15:09:55 +00:00
David Lawrence Ramsey bd2eb289fb comment fix
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2334 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-03-02 19:34:59 +00:00
David Lawrence Ramsey e6bbee8fe4 formatting fix
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2333 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-03-01 23:36:34 +00:00
David Lawrence Ramsey 7e110bd28f add missing blank line
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2332 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-03-01 23:21:21 +00:00
David Lawrence Ramsey eb4d81f3c1 cosmetic fixes
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2331 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-03-01 22:47:00 +00:00
David Lawrence Ramsey aed09427f8 remove unneeded blank line
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2330 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-02-25 21:06:43 +00:00
David Lawrence Ramsey 5d2ab88f0e another cosmetic fix
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2329 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-02-25 20:29:44 +00:00
David Lawrence Ramsey 65ef166a40 cosmetic fixes
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2328 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-02-25 20:21:45 +00:00
David Lawrence Ramsey b6e79fddaf start adding multibyte/wide character support to the help browser code
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2327 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-02-25 19:17:57 +00:00
David Lawrence Ramsey 0c23aed600 fix erroneous statusbar message truncation with multibyte strings
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2326 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-02-23 22:10:38 +00:00
David Lawrence Ramsey ad96aff50d rework things so that strrchrn() is no longer needed, and remove it
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2325 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-02-22 23:22:37 +00:00
David Lawrence Ramsey 60e329e3b2 cosmetic fix
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2324 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-02-22 22:24:14 +00:00
David Lawrence Ramsey 32f56814c7 remove unnecessary #include
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2323 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-02-14 18:25:32 +00:00
David Lawrence Ramsey 4c75faa211 typo fix
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2321 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-02-14 05:37:09 +00:00
David Lawrence Ramsey 7d367710ae add DB's overhaul of the file browser code to increase efficiency and
add multibyte character support, plus a few tweaks of mine


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2320 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-02-14 05:00:15 +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 bc14941e34 fix misplaced #ifdefs
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2317 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-02-11 20:23:00 +00:00
David Lawrence Ramsey 1b9d3f9898 port over DB's overhaul of safe_tempnam() and his changes to
check_operating_dir() to make it use boolean values (plus a few more
boolean-related tweaks of mine); also stop wrapping the bad_chr
parameter of parse_mbchar() in #ifdefs for cleanliness, as the
allow_tabcomp parameter of check_operating_dir() isn't wrapped in
#ifdefs, and don't set bad_chr to TRUE when we get a null byte in a
multibyte string, as it's not an invalid multibyte character


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2316 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-02-11 20:09:11 +00:00
David Lawrence Ramsey 2724c88717 set statusbar_xend properly when doing tab completion
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2315 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-02-11 16:23:56 +00:00
David Lawrence Ramsey 54dca7b7b3 revert diralphasort() tweak
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2314 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-02-11 16:02:54 +00:00
David Lawrence Ramsey 0df875a45d cosmetic fixes
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2313 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-02-10 02:26:08 +00:00
David Lawrence Ramsey d7ca85c86c add DB's overhauls of get_full_path() and check_writable_directory(),
plus a few tweaks of mine


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2312 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-02-09 18:56:21 +00:00
David Lawrence Ramsey d9661dc301 remove inaccurate comment
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2311 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-02-08 21:48:15 +00:00
David Lawrence Ramsey 0b80f936bf add missing #ifdef
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2310 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-02-08 20:39:28 +00:00
David Lawrence Ramsey 65e6ecb1d4 add DB's pverhaul the tab completion code and a few related functions to
increase efficiency and support multibyte characters; also add a few
miscellaneous tweaks of mine


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2309 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-02-08 20:37:53 +00:00
David Lawrence Ramsey daa533a767 fix off-by-one error when calculating totsize in read_file(), introduced
when totsize was converted to hold the total number of multibyte
characters


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2308 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-02-07 05:31:51 +00:00
David Lawrence Ramsey 3eeb823f92 add multibyte character support to indent_length(), convert the "smart
home" routines to use it (since it returns the number of bytes taken up
by spacing characters at the beginning of the line), and rearrange a few
initializations near asserts


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2307 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-01-31 18:59:30 +00:00
David Lawrence Ramsey d15de73bf3 properly enable UTF-8 support when using slang
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2305 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-01-28 19:37:23 +00:00
David Lawrence Ramsey 798e67e0a1 tweak get_mouseinput() to work properly when -O/--morespace is used
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2304 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-01-28 19:11:51 +00:00
David Lawrence Ramsey 96de1b0650 cosmetic fix
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2303 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-01-27 21:00:10 +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 7c60eab744 tweak do_mouse() to work properly when -O/--morespace is used
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2301 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-01-27 06:35:56 +00:00
David Lawrence Ramsey 3f9c63589e turn string functions that don't take length arguments into wrappers for
the versions that take length arguments, add multibyte equivalent of
strlen(), and fix potential segfault in mbstrnlen()


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2300 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-01-25 19:21:11 +00:00
David Lawrence Ramsey 14ace1711d in edit_add(), make sure we use the right variable when painting marked
selections, and add a few cosmetic tweaks


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2299 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-01-24 21:51:07 +00:00
David Lawrence Ramsey 3e93c63e60 comment fixes
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2298 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-01-24 14:57:57 +00:00
David Lawrence Ramsey 83ba47a964 add another cleanup
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2297 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-01-24 01:21:09 +00:00
David Lawrence Ramsey 345260c624 add multibyte version of revstrcasestr()
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2296 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-01-24 01:14:17 +00:00
David Lawrence Ramsey 3ee4cf3027 cosmetic and formatting fixes
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2295 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-01-22 20:49:14 +00:00
David Lawrence Ramsey 17b8a36d17 rename a variable in the strcasestr() equivalent order to match DB's
original cleanup of it, and port the change to the multibyte version too


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2294 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-01-22 19:56:16 +00:00
David Lawrence Ramsey 42abfe057e add multibyte equivalent of strcasestr(), plus some miscellaneous
cleanups


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2293 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-01-22 18:24:16 +00:00
David Lawrence Ramsey 122ae849b8 oops; replace the previous tweak with a proper merge of DB's code with
the no_more_space() function


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2290 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-01-19 20:55:42 +00:00
David Lawrence Ramsey 5040666fbb add DB's (slightly tweaked) changes to make resizing more flexible, and
also add his replacement of RETSIGTYPE with void, which avoids some
potential problems


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2289 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-01-19 19:52:42 +00:00
David Lawrence Ramsey b80077dae3 add support for moving to the next or previous word at the statusbar
prompt


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2288 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-01-18 21:25:38 +00:00
David Lawrence Ramsey 314be2cfa9 formatting fixes
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2287 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-01-18 21:12:28 +00:00
David Lawrence Ramsey 21954765ca reorganization: move revstrstr() back to chars.c, and move is_byte()
there too, since they both deal with strings and hence characters


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2286 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-01-18 17:00:00 +00:00
David Lawrence Ramsey 2bd22761ac #define fixes
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2285 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-01-18 16:43:18 +00:00
David Lawrence Ramsey 637b8bb36c add -O/--morespace command line option, plus a corresponding Meta-O
toggle and a "morespace" rcfile option; when these are used, the
normally-unused blank line below the titlebar will be treated as part of
the edit window


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2281 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-01-17 05:06:55 +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 18d616f253 put revstrstr() back in utils.c, as it's case sensitive and hance should
work with multibyte strings as-is


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2279 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-01-16 19:30:48 +00:00
David Lawrence Ramsey c5e21dafb7 assert fixes
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2278 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-01-16 18:58:03 +00:00
David Lawrence Ramsey 3a1fc8f0ab start making multibyte equivalents of the string functions in utils.c
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2277 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-01-16 18:49:19 +00:00
David Lawrence Ramsey 63d8f2b42f remove duplicate prototype
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2275 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-01-16 17:01:51 +00:00
David Lawrence Ramsey 776cf3771d tweak do_next_word() and do_prev_word() to make sure they don't parse
the same multibyte character twice


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2274 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-01-15 15:05:20 +00:00
David Lawrence Ramsey ce0451348c make do_prev_word() work with multibyte strings, and update various
comments in do_next_word() and do_prev_word()


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2273 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-01-15 00:34:57 +00:00
David Lawrence Ramsey 31055b3ba8 add missing free()
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2272 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-01-14 22:08:18 +00:00
David Lawrence Ramsey 7801d7bed9 revert previously added extra calls to move_mbright(); it's more
efficient to just add the return value of parse_char() directly instead
of having move_mbright() return it (except in the cursor movement
functions, which should be kept simple)


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2271 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-01-14 21:59:01 +00:00
David Lawrence Ramsey d24fbb760d rename move_left() and move_right() to move_mbleft() and move_mbright(),
and move them to chars.c


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2270 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-01-14 21:50:32 +00:00
David Lawrence Ramsey 1fe2eebf74 add multibyte and wide equivalents of isalnum(), make do_next_word()
work with multibyte strings, and tweak the "smart home" routines to use
move_right() for consistency


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2269 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-01-14 21:33:47 +00:00
David Lawrence Ramsey 52e5f23184 more cosmetic fixes
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2268 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-01-14 21:26:38 +00:00
David Lawrence Ramsey c4c45aa532 make do_statusbar_cut_text() respect the CUT_TO_END flag
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2266 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-01-14 21:10:14 +00:00
David Lawrence Ramsey e3013e3ed0 in src/Makefile.am, if we're installing and the "rnano" symlink already
exists, remove it so that we can create it again without an error


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2265 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-01-14 18:47:42 +00:00
David Lawrence Ramsey f6e4d33afc tweak new_file() to use mallocstrcpy() instead of charalloc() followed
by a null character initialization, for consistency


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2264 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-01-14 17:17:11 +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 9b95ca8c29 minor fixes involving is_byte()
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2262 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-01-14 06:02:10 +00:00
David Lawrence Ramsey 8eb9c029be fix the previous fix
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2261 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-01-14 04:45:18 +00:00
David Lawrence Ramsey 8f2906ba61 fix the multibyte equivalent of strnlen() so that it actually works
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2260 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-01-14 04:38:48 +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 49ff08b251 add missing memory corruption fix to do_statusbar_output()
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2258 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-01-14 04:13:45 +00:00
David Lawrence Ramsey 116c828c50 add asserts, plus a few more cosmetic fixes
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2257 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-01-14 03:22:54 +00:00
David Lawrence Ramsey 78dadd4550 cosmetic fixes
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2256 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-01-13 15:24:05 +00:00
David Lawrence Ramsey ea9370f231 a few forgotten copyright year updates
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2255 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-01-12 19:29:44 +00:00
David Lawrence Ramsey 610929c6ed the is_xxx_char() functions should take unsigned ints for consistency
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2254 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-01-12 18:46:08 +00:00
David Lawrence Ramsey c1e3d941a5 fix problem where displaying multiline regexes that have their start on
one page of a line and their end on a different page of the same line
would paint past the end of the regex by tweaking DB's changes to add
multibyte string support to edit_add(); now calculate paintlen the same
way the original working code did, but keep accounting for multibyte
characters as DB'S new code did


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2253 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-01-12 18:23:09 +00:00
David Lawrence Ramsey 487d08cad0 use actual UTF-8 in do_credits()
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2252 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-01-12 18:16:17 +00:00
David Lawrence Ramsey 0c9df578ea add comments
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2251 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-01-12 16:20:18 +00:00
David Lawrence Ramsey 8a31afdc55 make the "smart home" routines handle multibyte blank characters
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2250 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-01-12 05:10:53 +00:00
David Lawrence Ramsey 4c6956b433 add minor fixes to make the displaying of invalid multibyte sequences
work again


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2249 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-01-12 04:32:43 +00:00
David Lawrence Ramsey b54155c4a4 massive updates to multibyte/wide character support; deal with multibyte
characters and strings instead of wide characters and strings as much as
possible, and move multibyte/wide character-specific functions into
their own source file, chars.c


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2248 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-01-12 03:25:57 +00:00
David Lawrence Ramsey 775d46daf9 comment fix
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2247 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-01-11 23:08:36 +00:00
David Lawrence Ramsey cac0293bce miscellaneous high-level input routine fixes: in do_statusbar_input(),
indicate when we run a normal shortcut's associated function with the
ran_func parameter, reset the statusbar cursor position when we do, and
don't call print_view_warning() when we try to run a function not
allowed in view mode; also apply the first of these changes to
do_input() so that both the edit window and statusbar routines are in
sync again


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2246 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-01-11 23:05:05 +00:00
David Lawrence Ramsey 577298a3f9 remove display_string_len() again for the time being, since it's still
prone to off-by-one errors that lead to memory corruption and I can't
find anything obviously wrong with it; always allocate enough space for
len columns of text now; any extra space that isn't used will be removed
by the null_at() call at the end of display_string() anyway


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2245 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-01-08 07:21:41 +00:00
David Lawrence Ramsey f4a799aaec more minor shortcut-related fixes
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2244 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-01-08 06:16:19 +00:00
David Lawrence Ramsey 35e9713543 remove erroneous #ifdef around a currshortcut reference, do another int
-> bool conversion, and change a value of 0 for func to NULL in all
sc_init_one() calls


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2243 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-01-08 06:04:19 +00:00
David Lawrence Ramsey d96851f534 miscellaneous cleanups for the multibyte parsing functions
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2242 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-01-07 22:39:43 +00:00
David Lawrence Ramsey 12054fe11b add a cosmetic fix and a fix for a potential compilation problem exposed
by -pedantic


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2241 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-01-07 22:37:01 +00:00
David Lawrence Ramsey 1307aae01a minor utility tweaks
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2240 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-01-07 19:02:47 +00:00
David Lawrence Ramsey 6d594a9cbb really fix the memory corruption problem in display_string()
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2239 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-01-05 21:43:43 +00:00
David Lawrence Ramsey 9ac20c85b0 remove redundant code
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2238 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-01-05 20:41:55 +00:00
David Lawrence Ramsey 0251bdb0a5 fix display problem caused by the memory corruption fix
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2237 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-01-05 19:05:04 +00:00
David Lawrence Ramsey 8ec1e2d903 when NANO_WIDE is defined, use MB_CUR_MAX only when the NO_UTF8 flag is
not set


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2236 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-01-05 18:33:04 +00:00
David Lawrence Ramsey 851bea2ccd remove now-unneeded comment
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2235 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-01-05 17:04:03 +00:00
David Lawrence Ramsey bbd63e136d fix potential memory corruption in display_string() when adding UTF-8
characters, found by valgrind (and caused by a bad merge of part of DB's
code)


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2234 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-01-05 16:59:49 +00:00
David Lawrence Ramsey 28e19f8bbc fix potential memory corruption in do_output() when adding UTF-8
characters, found by valgrind


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2233 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-01-05 15:42:45 +00:00
David Lawrence Ramsey 9dffac90e7 put back two of the hacks of DB's that are actually needed (we need one
since we can't add half a two-column character to converted in
display_string(), and we need the other to keep the "$" from spilling
over to the next line if the line contains two-column characters in the
right places)


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2232 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-01-05 06:09:34 +00:00
David Lawrence Ramsey 930b1d7809 remove DB's hacks to work around problems with ncurses' display of
two-column characters at the beginnings and ends of long lines (i.e,
lines with $'s added), as the problems don't occur with ncurses 5.4, and
there's no easy way to fix the same type of problem with doing a regex
replace of "^" on a line beginning with a two-column character


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2231 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-01-05 05:22:42 +00:00
David Lawrence Ramsey 913db834d2 add DB's (modified) UTF-8 support tweaks to do_replace_highlight()
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2230 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-01-05 05:08:14 +00:00
David Lawrence Ramsey b6fbdd00cf tweak the charealloc() in do_output() to more closely match the old
charealloc() in do_char(), to avoid another memory corruption problem


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2229 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-01-04 04:02:45 +00:00
David Lawrence Ramsey d90d64f718 set the value of alloc_len properly again, as in DB's patch, in order to
avoid memory corruption problems


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2228 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-01-04 03:09:55 +00:00
David Lawrence Ramsey 179f0ea742 undo the initialization of index, as the warning was indirectly caused
by a missing snippet of code that also broke color regex display, and
add the aforementioned snippet


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2227 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-01-04 02:55:45 +00:00
David Lawrence Ramsey 22e5eff432 cosmetic fixes
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2226 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-01-03 22:56:38 +00:00
David Lawrence Ramsey 4d709f351c make sure index is initialized in order to avoid a warning
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2225 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-01-03 22:29:42 +00:00
David Lawrence Ramsey 68e3016557 add DB's (modified) UTF-8 support tweaks to edit_add(); they're not
perfect, but they work better than what's currently there


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2224 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-01-03 22:23:00 +00:00
David Lawrence Ramsey 2524a70a49 fix assert
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2223 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-01-03 21:34:55 +00:00
David Lawrence Ramsey f0a53f02a1 readd get_byte_kbinput(), modify get_word_kbinput() to handle
hexadecimal instead of decimal values, make normal input use
get_byte_kbinput(), make verbatim input use get_word_kbinput(), and
update faq.html to mention these changes


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2221 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-01-03 19:56:56 +00:00
David Lawrence Ramsey 423326fc71 another int -> bool conversion
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2220 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-01-03 19:14:39 +00:00
David Lawrence Ramsey 956da0d0e1 miscellaneous fixes: skip over invalid wide characters, and if wcwidth()
returns -1, don't add its value to any column counter; also update
another copyright year


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2219 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-01-03 06:56:38 +00:00
David Lawrence Ramsey 6e1cd06b96 when we get a newline via verbatim input at the statusbar prompt, set
input to NANO_ENTER_KEY so that the cursor position is reset properly


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2218 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-01-02 23:50:29 +00:00
David Lawrence Ramsey 1b1e8b632f add missing NANO_SMALL #ifdef
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2217 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-01-02 23:35:19 +00:00
David Lawrence Ramsey d9ad76ba3c properly handle newlines read in via verbatim input at the statusbar
prompt


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2216 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-01-02 22:35:31 +00:00
David Lawrence Ramsey 11c83d3ed3 implement verbatim input for the statusbar prompt
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2215 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-01-02 21:26:53 +00:00
David Lawrence Ramsey b8a2a6d7e5 in do_input() and do_statusbar_input(), func_key is an int* and not an
int; fix bad code due to the latter assumption


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2214 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-01-02 21:13:36 +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 4840cb557f get rid of the last remnant of the NO_UTF8 toggle that I erroneously
left in


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2212 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-01-01 07:55:15 +00:00
David Lawrence Ramsey 295d172f2d implement cutting from the current position to the end of the file,
using Ctrl-X from the search prompt and Meta-T from the edit window;
also update the copyright years of more modified files


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2211 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-01-01 07:43:32 +00:00
David Lawrence Ramsey c13b7f0699 overhaul the high-level input routines for the statusbar to make them
more flexible, among other things, and add UTF-8 support to them in the
process; also update the copyright years of the modified files


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2210 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-01-01 07:28: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 0d847aadd9 handle wctomb() failure in parse_char() too
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2208 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2004-12-29 22:05:02 +00:00
David Lawrence Ramsey f282428a42 handle wctomb() failures properly in display_stirng_len() and
display_string()


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2207 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2004-12-29 21:32:22 +00:00
David Lawrence Ramsey 4d97a588e6 cosmetic totsize-related cleanups
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2206 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2004-12-29 16:42:48 +00:00
David Lawrence Ramsey c8ade44741 set totsize properly when deleting a character or backspacing over it
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2205 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2004-12-28 22:36:13 +00:00
David Lawrence Ramsey a9b9913c6b properly increment start_col when the line begins with a character that
takes up two columns


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2204 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2004-12-27 23:35:25 +00:00
David Lawrence Ramsey c195820456 clarify the warning message when sufficient wide character support isn't
found, and merge missing part of DB's patch to handle tabs properly in
display_string()


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2203 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2004-12-27 23:21:34 +00:00
David Lawrence Ramsey 6a643cd596 fix the NANO_WIDE #ifdefs again, and put display_string_len() back in
now that it doesn't corrupt memory anymore (as far as I can tell)


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2202 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2004-12-27 23:11:59 +00:00
David Lawrence Ramsey a35bdd1f03 add a few missing NANO_WIDE #ifdefs, and remove display_string_len()
until I can fix it to no longer cause memory corruption


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2201 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2004-12-27 18:53:38 +00:00
David Lawrence Ramsey 4fd76bab73 configure.ac and related cleanups
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2200 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2004-12-24 18:11:53 +00:00
David Lawrence Ramsey fe3627ddfd fix display problem caused by backwards comparisons of column and
start_col


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2199 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2004-12-24 17:52:17 +00:00
David Lawrence Ramsey 61a71403f4 revert last change, as it's actually redundant, and fix a few comments
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2198 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2004-12-24 15:45:36 +00:00
David Lawrence Ramsey 7ddca3a9a6 fix if block
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2197 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2004-12-24 15:23:10 +00:00
David Lawrence Ramsey 1903ace275 fix statusbar() and onekey() to properly handle multibyte strings too
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2196 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2004-12-24 00:43:41 +00:00
David Lawrence Ramsey 93c4a5656b #ifdef fixes
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2195 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2004-12-23 21:32:27 +00:00
David Lawrence Ramsey 9ec76e5573 remove command line and rcfile option for --noutf8, as UTF-8 support is
now autodetected, and add #ifdefs around two variables that are unused
when NANO_WIDE isn't defined


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2194 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2004-12-23 19:55:57 +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 415b5d91cf fix misplaced #ifdef
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2191 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2004-12-21 16:39:45 +00:00
David Lawrence Ramsey f3bea022d6 revert erroneous change
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2189 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2004-12-20 01:18:49 +00:00
David Lawrence Ramsey 6a2f068c7f still more cosmetic fixes
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2188 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2004-12-20 01:13:55 +00:00
David Lawrence Ramsey e750fe68cf another cosmetic fix
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2187 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2004-12-18 22:43:23 +00:00
David Lawrence Ramsey 4564170c61 cosmetic fixes
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2186 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2004-12-18 20:29:42 +00:00
David Lawrence Ramsey 78ea5e4a8a improvements to wide/multibyte character input and output, using wide
curses functions where applicable


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2182 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2004-12-12 19:04:56 +00:00
David Lawrence Ramsey 164bf36ea8 add missing reset
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2181 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2004-12-09 17:00:15 +00:00
David Lawrence Ramsey c2ac02ff46 add missing casts
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2180 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2004-12-09 03:05:45 +00:00
David Lawrence Ramsey abc9423709 check for nulls and newlines earlier in do_output(), and add a few more
cosmetic fixes


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2179 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2004-12-08 23:24:31 +00:00
David Lawrence Ramsey 60448895f6 reset the mbtowc() and wctomb() state machines at the right places
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2178 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2004-12-08 16:52:52 +00:00
David Lawrence Ramsey 263240c7c7 when adding to the keystroke buffer, filter out bad keystrokes with one
pass instead of two


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2177 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2004-12-08 15:47:38 +00:00
David Lawrence Ramsey 32085a88e8 cosmetic fixes
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2176 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2004-12-08 04:00:26 +00:00
David Lawrence Ramsey eae97caa83 go back to storing multibyte characters in non-dynamically allocated
arrays of MB_LEN_MAX length, as it's less complex


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2175 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2004-12-07 22:24:03 +00:00
David Lawrence Ramsey 43953bba6f store multibyte characters in dynamically allocated arrays of MB_CUR_MAX
length, and add a few comment fixes


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2174 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2004-12-07 21:23:39 +00:00
David Lawrence Ramsey 91851f3e60 rename a few variables for consistency
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2173 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2004-12-07 21:22:48 +00:00
David Lawrence Ramsey bed32a370b comment fix
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2172 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2004-12-07 18:05:38 +00:00
David Lawrence Ramsey f812e4f7d9 rearrange a few variables
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2171 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2004-12-07 17:35:14 +00:00
David Lawrence Ramsey 10820de467 fix bad cast
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2168 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2004-12-07 05:02:21 +00:00
David Lawrence Ramsey 95a0224820 miscellaneous fixes for the buffered inout and output routines and their
associated UTF-8 handling: have unget_input() filter out invalid wide
characters, put back the result of a word sequence instead of returning
it directly, don't erroneously filter out keystrokes if they're neither
extended keypad values nor ASCII characters, and add a few comment
tweaks


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2166 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2004-12-06 04:14:42 +00:00
David Lawrence Ramsey eb711b034b formatting fix
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2165 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2004-12-05 22:24:39 +00:00
David Lawrence Ramsey bfcba16761 cosmetic fixes
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2164 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2004-12-05 06:11:01 +00:00
David Lawrence Ramsey bce3aad885 in titlebar(), space should be an int instead of a size_t
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2162 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2004-12-05 06:02:39 +00:00
David Lawrence Ramsey f326ed7910 add some miscellaneous fixes for titlebar()
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2161 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2004-12-05 05:42:46 +00:00
David Lawrence Ramsey 846658eb6b when we get the whitespace display toggle, update the titlebar as well
as the edit window, in case the filename displayed on the titlebar
contains spaces or tabs; also add a few miscellaneous cosmetic fixes


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2160 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2004-12-05 04:18:26 +00:00
David Lawrence Ramsey 7483571f7f massive overhaul to support buffered input and output, the first steps
toward proper wide character input and output, etc.


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2157 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2004-12-04 17:41:52 +00:00
David Lawrence Ramsey 68ebb61fb1 fix potential segfault when doing a full justify
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2156 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2004-12-04 17:36:14 +00:00
David Lawrence Ramsey fc54d6e431 per Jeremy Huddleston's patch, fix compilation problem caused by
break_line()'s returning int when it should return ssize_t according to
its prototype


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2155 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2004-12-02 17:37:09 +00:00
David Lawrence Ramsey 3ece0b9aeb change references to "open files" to "open file buffers" for
consistency, and add DB's changes to die() so that it works properly
with the overhauled multibuffer routines


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2153 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2004-12-01 15:11:27 +00:00
David Lawrence Ramsey 1483ee3db1 remove malfunctioning wide character support, and add a few
miscellaneous fixes


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2152 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2004-11-29 00:30:07 +00:00
David Lawrence Ramsey 63e73cbd14 comment fixes
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2151 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2004-11-28 04:52:57 +00:00
David Lawrence Ramsey 53d3db4ba6 comment fix
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2150 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2004-11-28 03:53:01 +00:00
David Lawrence Ramsey 832db768a4 typo fix
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2149 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2004-11-27 23:28:39 +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 62a217d35d formatting and cosmetic fixes
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2144 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2004-11-27 16:54:00 +00:00
David Lawrence Ramsey c109549a7e in unget_kbinput(), free s after the wctomb() call, since we don't need
it after that


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2143 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2004-11-27 15:18:34 +00:00
David Lawrence Ramsey 15dbc6ef07 comment fix
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2142 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2004-11-27 15:07:07 +00:00
David Lawrence Ramsey c82997d460 in get_verbatim_kbinput(), don't pass v_kbinput in as a parameter, since
we're dynamically allocating it and then returning it


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2141 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2004-11-27 15:00:18 +00:00
David Lawrence Ramsey 08eab72517 add debug messages to get_shortcut() and get_toggle()
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2140 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2004-11-27 06:43:06 +00:00
David Lawrence Ramsey e08765dca5 formatting and cosmetic fixes
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2139 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2004-11-26 20:17:49 +00:00
David Lawrence Ramsey ca018c3e23 in get_full_path(), remove unneeded NANO_SMALL #ifdef, so that it's
included whenever its prototype is, and so it can compile when
DISABLE_OPERATINGDIR isn't defined and NANO_SMALL is


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2138 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2004-11-26 20:14:19 +00:00
David Lawrence Ramsey 2dbcc801bf formatting fixes
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2137 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2004-11-26 18:10:07 +00:00
David Lawrence Ramsey 698263ca5c in the low-level input routines, make the ascii_digits variables ints
instead of size_t's, since they will only hold very small values


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2136 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2004-11-25 05:05:41 +00:00
David Lawrence Ramsey 12642edfc9 formatting fix
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2135 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2004-11-25 04:56:50 +00:00
David Lawrence Ramsey 5b3dd0f423 add DB's overhaul of the multibuffer code for efficiency, plus a few
tweaks and additions of mine


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2134 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2004-11-25 04:39:07 +00:00
David Lawrence Ramsey 329d6a3259 formatting fix
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2133 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2004-11-24 23:46:04 +00:00
David Lawrence Ramsey 8a2c0ba4b6 formatting fix
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2132 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2004-11-24 20:36:36 +00:00
David Lawrence Ramsey eeec999548 oops again; adding an extra magicline unconditionally when uncutting is
inconsistent with how file insertion behaves, so it apparently is a bug;
revert the previous behavior


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2131 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2004-11-24 20:12:57 +00:00
David Lawrence Ramsey cc89513f14 oops; Pico's adding a new magicline unconditionally when uncutting
leaves the cursor on the current magicline is actually consistent (and
hence not a bug), so duplicate that behavior again


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2130 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2004-11-23 23:42:12 +00:00
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 304129315c in shortcut_init(), fix misplaced #endif keeping the "Full Justify"
shortcut in the search shortcut list from being included when NANO_SMALL
is defined but DISABLE_JUSTIFY isn't


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2127 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2004-11-23 20:42:35 +00:00
David Lawrence Ramsey 4d6ec37676 in do_cut_text(), if keep_cutbuffer is FALSE, only blow away the text in
the cutbuffer if the cutbuffer isn't empty


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2126 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2004-11-23 17:59:32 +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 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 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 d7b632560c Don't use DEFS to define stuff. Use INCLUDES instead.
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2108 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2004-11-18 00:05:14 +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 0317c86a8a fix breakage of ASCII character sequence mode introduced with the UTF-8
sequence support


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2103 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2004-11-16 22:51:07 +00:00
David Lawrence Ramsey 8091d334a3 add Ulf Harnhammar's input_tab() segfault fix
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2101 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2004-11-16 02:23:10 +00:00
David Lawrence Ramsey 9df069cc5f comment fix
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2100 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2004-11-16 02:20:48 +00:00
David Lawrence Ramsey 036a3d4646 fix cursor placement problem when inserting into the current buffer at
the bottom of the edit window with smooth scrolling on


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2098 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2004-11-15 21:49:21 +00:00
David Lawrence Ramsey 4a3879f1ed fix cursor placement problem when inserting into the current buffer at
the top of the edit window


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2097 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2004-11-15 20:42:31 +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 649b431171 in cut_marked_segment(), respect concatenate_cut, as we need to use it
if we do a marked cut and immediately follow it with a cut-to-end (which
uses that function)


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2095 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2004-11-13 01:32:17 +00:00
David Lawrence Ramsey bfb98f8bd4 in do_cut_text(), set concatenate_cut to TRUE unconditionally when doing
a marked cut; this fixes an incompatibility with Pico where an extra
line is uncut if we do a marked cut that includes the magicline and
immediately follow it with an unmarked cut


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2094 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2004-11-12 21:46:14 +00:00
David Lawrence Ramsey 8001e27e67 yet more cosmetic fixes
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2093 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2004-11-12 00:48:18 +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 fd9da07e6c fix enum/#define conflict
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2086 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2004-11-07 23:05:48 +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 c136f75f62 don't create a new buffer if we're in multibuffer mode and command
execution mode


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2084 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2004-11-07 18:35:53 +00:00
David Lawrence Ramsey a084ad94f7 in multibuffer mode, using a blank filename at the "Read File" prompt
shouldn't cancel out of it


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2083 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2004-11-07 18:22:33 +00:00
David Lawrence Ramsey c15802f8c3 partition the filestruct properly when executing a command
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2082 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2004-11-07 18:09:41 +00:00
David Lawrence Ramsey 7105cf4f8e formatting fix
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2081 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2004-11-07 16:13:19 +00:00
David Lawrence Ramsey 02085d7b92 in the search prompt shortcut list, move "Full Justify" to after
"History", so that the latter is visible onscreen again


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2080 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2004-11-07 16:04:18 +00:00
David Lawrence Ramsey 50af6ea21e in proto.h, add missing NANO_SMALL #ifdef around the
cut_marked_segment() prototype


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2079 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2004-11-07 15:29:40 +00:00
David Lawrence Ramsey 8ae06a86b8 comment update
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2078 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2004-11-07 01:26:39 +00:00
David Lawrence Ramsey 29f446ec40 don't let remove_magicline() remove the magicline if it's the only line
in the file


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2077 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2004-11-07 01:22:20 +00:00
David Lawrence Ramsey 00cca05ebb in do_uncut_text(), maintain current_y's value when uncutting blocks so
that smooth scrolling works correctly; also add a few miscellaneous
cleanups


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2075 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2004-11-06 20:33:43 +00:00
David Lawrence Ramsey 8c16bacbbf more int -> bool conversions
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2074 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2004-11-06 15:10:57 +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 78d644a635 don't change the file format when we insert another file into the
current one


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2066 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2004-11-05 16:24:35 +00:00
David Lawrence Ramsey 1c293d2e28 comment fixes
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2065 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2004-11-05 16:22:27 +00:00
David Lawrence Ramsey 31f99361b6 cosmetic fix
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2064 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2004-11-05 16:01:04 +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 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 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 07e2589f80 in cut.c, make marked_line a static enum instead of a static int, and
add a few formatting cleanups


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2056 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2004-11-04 13:47:28 +00:00
David Lawrence Ramsey 3e0c8a614d remove the DOS_FILE and MAC_FILE flags, as they're only used in files.c,
and replace them with a static file_format enum; change the
openfilestruct structure accordingly in order to handle this; also add a
few miscellaneous cleanups


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2054 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2004-11-04 04:08:18 +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 164c79883b remove unneeded space
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2052 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2004-11-04 03:27: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 6d9aa085d1 cosmetic fixes
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2047 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2004-11-03 14:58:04 +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 1e1f572c51 in get_kbinput(), make sure meta_key and func_key are set properly in
all cases


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2044 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2004-11-02 02:48:02 +00:00
David Lawrence Ramsey 4b4b608806 leave "Mark Text" and "Where Is Next" out entirely when NANO_SMALL is
defined; since they aren't in the visible main list, there's no point in
having them in but disabled; also add a few formatting fixes


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2043 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2004-11-01 22:54:40 +00:00
David Lawrence Ramsey 8381fdd83a add new key aliases: F15 for "Mark Text" and F16 for "Where Is Next";
also add support for their corresponding escape sequences


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2042 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2004-11-01 22:40:02 +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 3d002ed602 cosmetic fix
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2039 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2004-10-31 22:45:24 +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 ace1037faf cosmetic fix
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2032 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2004-10-29 15:42:02 +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 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 0ff01a92bc put DB's old efficiency tweaks back in bottombars()
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2025 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2004-10-25 15:00:38 +00:00
David Lawrence Ramsey cc823ab6d6 cosmetic fix: "Hurd console" -> "Mach console"
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2024 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2004-10-24 22:51:39 +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 da952f8ded consistency fix for the ^^ help entry
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2020 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2004-10-24 16:18:17 +00:00
David Lawrence Ramsey 2690bafa15 add missing parentheses
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2019 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2004-10-23 14:59:32 +00:00
David Lawrence Ramsey e7c4168ee1 consistency fix for the ^I help entry
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2018 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2004-10-23 14:53:07 +00:00
David Lawrence Ramsey 9abd1d18e4 simplify the key-interpreting logic in get_shortcut()
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2017 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2004-10-23 13:50:57 +00:00
David Lawrence Ramsey 7975408f66 fix wrong word
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2016 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2004-10-23 02:48:13 +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 6a715b69a7 comment fix
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2013 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2004-10-22 16:11:55 +00:00
David Lawrence Ramsey ca92becf9d apply patch from DB: in write_file(), if we've tried to write to an
unwritable file and we're not prepending, tempname is NULL when it's
passed to unlink(); this can cause problems if unlink() can't handle
NULL, so don't call it in that case


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2012 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2004-10-22 03:33:54 +00:00
David Lawrence Ramsey 2c4e34cfce another indentation fix
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2011 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2004-10-22 03:30:39 +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 1601c28976 remove unnecessary casts
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2009 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2004-10-21 22:06:40 +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 cbc13a2a62 add missing line
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@1999 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2004-10-18 02:17:18 +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