Commit Graph

902 Commits (ff1a0ea32b1bb67dfe5f99d9fb4a7e8f410a4321)

Author SHA1 Message Date
David Lawrence Ramsey 7f4dd35406 another cosmetic fix
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2503 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-05-08 17:08:51 +00:00
David Lawrence Ramsey 8f5e50991b cosmetic fix
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2502 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-05-06 17:03:53 +00:00
David Lawrence Ramsey 340e5ca881 revert one last change that was causing breakage
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2501 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-05-03 21:42:04 +00:00
David Lawrence Ramsey 75f4b7cb84 remove redundant code
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2500 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-05-03 21:35:58 +00:00
David Lawrence Ramsey 5e73eec3cc revert one of the previous changes; we don't really need a shortcut for
moving to the next search/replace history string, as we don't have one
for tab completion either


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2499 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-05-03 20:57:13 +00:00
David Lawrence Ramsey 0f83c89b09 rearrange nanogetstr() to fix breakage
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2498 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-05-03 03:18:44 +00:00
David Lawrence Ramsey 6bc26a9a8b revert some attempts at simplifying the search/replace history code that
were causing breakage; make "previous history" and "next history" use
separate keys; and display them as "^P" and "^N" instead of using one
sentinel value for both, so that clicking on them with the mouse works
again


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2497 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-05-02 21:48:34 +00:00
David Lawrence Ramsey 198bd592ff document the simplification of a history check in nanogetstr(), and
remove an extra parenthesis so it actually compiles (oops)


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2496 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-04-29 13:16:05 +00:00
David Lawrence Ramsey fcdfb7f75f more comment fixes
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2495 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-04-29 04:32:38 +00:00
David Lawrence Ramsey e41e8dbead more comment fixes
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2494 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-04-29 03:28:27 +00:00
David Lawrence Ramsey 10f880c62f remove a redundant check in get_history_newer(), and add a few comment
fixes


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2493 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-04-29 03:24:43 +00:00
David Lawrence Ramsey 6595b715d0 oops; in do_output(), properly allow wrapping when we insert a tab, for
consistency; this is incompatible with Pico, but Pico doesn't wrap
properly when other control characters are on a line, either, so its
behavior with regard to tabs is apparently a bug; besides, we wrap at
all other blank characters, including multibyte ones, so we shouldn't
make an exception for tabs


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2491 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-04-26 17:21:47 +00:00
David Lawrence Ramsey e4cb3158fd in do_output(), fix an off-by-one error that allowed wrapping when we
inserted a tab, for Pico compatibility


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2489 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-04-25 22:48:58 +00:00
David Lawrence Ramsey 6439330d59 in shortcut_init(), move the "Refresh" and "Exit" shortcuts to the
beginning of the help browser shortcut list, for consistency


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2488 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-04-25 21:48:22 +00:00
David Lawrence Ramsey 0bfec6e58d minor bits: fix slang compilation by calling clearok(TRUE) and
wrefresh() on edit instead of curscr, since slang's curses emulation
doesn't include a curscr equivalent; and revert Jordi's removal of a
space in the main help text, as its second paragraph won't be properly
indented by one space without it


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2487 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-04-25 20:08:29 +00:00
David Lawrence Ramsey 29be8031df comment fixes
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2486 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-04-20 14:55:46 +00:00
David Lawrence Ramsey 5b2f17e591 change all hardcoded instances of 128 bytes to MAX_BUF_SIZE, and #define
MAX_BUF_SIZE as 128 in nano.h


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2481 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-04-19 21:47:01 +00:00
David Lawrence Ramsey 3705924fc8 cosmetic fixes
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2480 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-04-19 20:13:13 +00:00
David Lawrence Ramsey c596c0c4da miscellaneous bits: make get_next_filename() use an unsigned long, make
num_of_digits() take a size_t instead of a ssize_t, and rename
num_of_digits() to digits()


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2479 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-04-19 16:32:08 +00:00
David Lawrence Ramsey 9cf1df1f06 in do_browser() and do_help(), don't treat NANO_CANCEL_KEY as
NANO_EXIT_KEY anymore, for consistency


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2478 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-04-19 03:15:21 +00:00
Jordi Mallach b9180f4a82 Remove bogus space from help text.
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2475 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-04-18 12:31:11 +00:00
David Lawrence Ramsey ad11460eb7 remove more unneeded clearok(TRUE)'s, and avoid an unnecessary update
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2474 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-04-16 18:27:57 +00:00
David Lawrence Ramsey 04652518fd simplify total_update() to call clearok(TRUE) and wrefresh() on curscr,
which updates the entire screen in fewer function calls


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2473 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-04-16 18:07:37 +00:00
David Lawrence Ramsey 22425a204d cosmetic fix
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2472 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-04-16 15:57:19 +00:00
David Lawrence Ramsey e527e458f4 various #include fixes: since proto.h includes nano.h, only include the
former in source files; also add an #include guard to proto.h, and make
the config.h #include in nano.h match the config.h #includes everywhere
else


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2471 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-04-15 18:07:26 +00:00
David Lawrence Ramsey ac71fdde97 more cosmetic fixes
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2470 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-04-15 17:48:20 +00:00
David Lawrence Ramsey ffda704ef6 cosmetic fix
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2469 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-04-14 17:08:35 +00:00
David Lawrence Ramsey 6a244b689f various minor bits: add miscellaneous comment fixes; in
get_next_filename(), use a long instead of an int for the number
prepended to the filename; and in num_of_digits(), use a ssize_t instead
of an int


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2468 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-04-14 03:52:28 +00:00
David Lawrence Ramsey c2b07472e2 in print1opt_full(), if desc should be empty, allow it to be NULL
instead of "", since the latter is not necessarily translated as ""


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2467 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-04-14 03:13:49 +00:00
David Lawrence Ramsey c504dffa39 in nanogetstr(), fix a misplaced break and some indentation
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2458 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-04-09 04:10:58 +00:00
David Lawrence Ramsey fc0ebe982d remove inaccurate comment
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2457 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-04-09 03:51:00 +00:00
David Lawrence Ramsey dcb4e3a66d clarify comment
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2456 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-04-08 20:27:02 +00:00
David Lawrence Ramsey 00762ffaeb add comment
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2455 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-04-08 20:06:08 +00:00
David Lawrence Ramsey d4a071e492 in do_insertfile(), fix handling of blank filenames in multibuffer mode
so that they work properly again


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2446 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-03-31 17:00:43 +00:00
David Lawrence Ramsey 894d80fc5d add missing blank line
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2445 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-03-31 05:26:06 +00:00
David Lawrence Ramsey 612caef65f in statusq(), make sure that the vsnprintf(foo) call and foo's
subsequent null termination both take the proper number of bytes when
using multibyte characters, so that multibyte prompt strings aren't
prematurely cut off


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2444 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-03-31 00:11:43 +00:00
David Lawrence Ramsey 88ad64d597 in do_insertfile(), fix a problem where going into the help browser at
the "Insert File" prompt would always result in the current answer's
being used as the filename afterward


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2443 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-03-30 23:52:02 +00:00
David Lawrence Ramsey aa683853d4 in help_init(), avoid a warning when compiling with -pedantic by
breaking overly long help text up into separate chunks, and add a few
wording fixes to the help text as well


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2442 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-03-30 18:11:59 +00:00
David Lawrence Ramsey 050b13ae5d cosmetic fixes
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2439 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-03-29 23:10:20 +00:00
David Lawrence Ramsey caac92012d in parse_rcfile(), fix a debugging message to display the long value of
a flag properly


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2437 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-03-27 01:34:40 +00:00
David Lawrence Ramsey b80d49f071 make sure that all references to cut-to-end are left out when NANO_SMALL
is defined


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2435 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-03-26 22:49:46 +00:00
David Lawrence Ramsey fe605247cb per DB's patch, in main(), change 0 to NULL in the option struct where
needed


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2434 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-03-26 22:49:08 +00:00
David Lawrence Ramsey b56ca1b7bb cosmetic fixes
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2432 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-03-26 20:50:59 +00:00
David Lawrence Ramsey d37f6a3f5c add missing blank line
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2431 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-03-26 20:41:36 +00:00
David Lawrence Ramsey 5f3695bdb5 in make_mbchar(), remove an unneeded assert
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2430 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-03-26 06:54:36 +00:00
David Lawrence Ramsey d8367986ce cosmetic fixes
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2429 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-03-26 04:49:01 +00:00
David Lawrence Ramsey 6e0ed3c1c6 add various portability and potential segfault fixes involving getcwd()
calls


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2428 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-03-26 04:42:28 +00:00
David Lawrence Ramsey c8857a2c26 in cut_to_eol(), fix an inaccurate comment
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2425 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-03-25 06:24:13 +00:00
David Lawrence Ramsey 297851a647 in titlebar(), make sure that the (mv)?waddnstr() calls take the proper
number of bytes when using multibyte characters, so that multibyte
strings aren't prematurely cut off; also allow the "View" state to be
displayed when a filename is passed in, in case we're in multibuffer
mode and inside the file browser


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2424 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-03-25 05:00:32 +00:00
David Lawrence Ramsey cb4f14b8ce add missing blank lines
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2423 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-03-24 22:28:25 +00:00
David Lawrence Ramsey 263b447323 per Mike Frysinger's patch, in move_mbleft(), fix assert to reference
the proper variable, so that nano builds with DEBUG defined again


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2422 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-03-23 05:56:11 +00:00
David Lawrence Ramsey bc6a36e40d move macro definition
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2421 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-03-22 20:17:38 +00:00
David Lawrence Ramsey eb5092226d cosmetic fix
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2419 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-03-22 04:50:11 +00:00
David Lawrence Ramsey cf4db89d56 in help_line_len(), make the text display more flexible, and closer to
what nano 1.2.x does


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2418 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-03-22 03:59:32 +00:00
David Lawrence Ramsey 4e0b1ae332 add missing space in the help text, and fix an allocsize-related assert
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2417 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-03-22 03:58:51 +00:00
David Lawrence Ramsey c4daf5d49e in help_init(), when calculating allocsize, take multibyte characters
into account, and keep the column number limits consistent


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2416 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-03-22 02:51:01 +00:00
David Lawrence Ramsey b41df4a140 comment fixes
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2415 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-03-22 02:50:24 +00:00
David Lawrence Ramsey a853e2d650 in do_justify(), move break_pos after the space earlier, as do_wrap()
does with wrap_loc, as it's more efficient


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2414 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-03-22 02:17:36 +00:00
David Lawrence Ramsey 6b94e95ec9 in find_paragraph(), fix a problem where a search for the next paragraph
would skip over certain cases of one-line paragraphs


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2413 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-03-22 01:53:57 +00:00
David Lawrence Ramsey aad85151ae in do_justify(), instead of breaking a line at a space and readding the
space afterwards, just break the line after the space, as it's more
efficient


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2412 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-03-22 01:25:34 +00:00
David Lawrence Ramsey 39e8ce6f8e in printopt(), add DB's tweaks to make sure longflag isn't passed in
when HAVE_GETOPT_LONG isn't defined, and rework the special case of
options that are ignored for Pico compatibility so that they display
more neatly when HAVE_GETOPT_LONG isn't defined; in usage(), fix an
erroneous #ifdef that resulted in the -d/--rebinddelete and -k/--cut
options' not being printed when NANO_SMALL was defined


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2410 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-03-21 07:24:47 +00:00
David Lawrence Ramsey afbcf68c1a more cosmetic fixes
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2409 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-03-21 06:33:41 +00:00
David Lawrence Ramsey 928babf8a1 cosmetic fixes
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2407 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-03-21 06:12:07 +00:00
David Lawrence Ramsey 2d825bae79 after (re)initializing the terminal, make sure the cursor is always
turned on


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2406 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-03-20 21:20:47 +00:00
David Lawrence Ramsey 3dd744f392 and make the locale string checks use the #defined strcasestr() alias if
necessary


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2402 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-03-20 07:26:47 +00:00
David Lawrence Ramsey adc30a839b put the old #defined aliases for strcasecmp(), strncasecmp(),
strcasestr(), and strnlen() back with the #defined aliases for getline()
and getdelim(), as they make things simpler


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2401 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-03-20 07:24:49 +00:00
David Lawrence Ramsey 8974efa27b when checking the locale string, use nstrcasestr() if we don't have
strcasestr()


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2400 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-03-20 06:50:26 +00:00
David Lawrence Ramsey d96ee5260a add asserts to do_wrap()
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2399 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-03-20 03:10:31 +00:00
David Lawrence Ramsey 40e211bcec add full multibyte character support to do_wrap()
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2394 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-03-19 21:15:30 +00:00
David Lawrence Ramsey 9bd56204ee add multibyte character support to help_line_len(), so that UTF-8 help
text is wrapped properly


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2393 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-03-18 21:29:33 +00:00
David Lawrence Ramsey d456bfa10d add more locale string checks beyond case-sensitive "UTF-8" so that we
can better detect UTF-8 locales, adapted from Debian's UTF-8 patch for
slang


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2392 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-03-18 19:07:25 +00:00
David Lawrence Ramsey d44a005e3d make the #ifdef around indent_len() match that of its prototype, so that
we can compile with NANO_SMALL and !DISABLE_JUSTIFY again; also add a
comment fix


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2390 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-03-18 05:20:54 +00:00
David Lawrence Ramsey df21a2cbdf minor documentation fix
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2389 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-03-18 04:38:19 +00:00
David Lawrence Ramsey b349c80f0d allow refreshing of the file browser window, as Pico does
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2388 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-03-17 19:10:29 +00:00
David Lawrence Ramsey 85616c499b add missing blank line, and rename total_blank() to total_update(), as
the latter is more accurate


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2387 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-03-17 18:11:08 +00:00
David Lawrence Ramsey b9ddb80123 allow refreshing of the help browser window, as Pico does, and remove a
few stray spaces from the main help text


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2386 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-03-17 17:56:48 +00:00
David Lawrence Ramsey 27f2b258d3 initialize indent_string later in the justify code, so as to avoid a
possible memory leak


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2385 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-03-17 05:08:15 +00:00
David Lawrence Ramsey 102d01da6c fix justify code regression: if we're justifying the entire file, and we
haven't found any paragraph(s), we should refresh the screen and get out
instead of breaking out of the loop and acting as though we've justified
something, so as to avoid a segfault


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2384 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-03-17 04:48:14 +00:00
David Lawrence Ramsey fd81a7189b fix paragraph searching code regression: if trying to move to the line
after the end of the next paragraph leaves us on the same line where we
were before, the search should fail in order to avoid an infinite loop


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2383 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-03-17 04:24:12 +00:00
David Lawrence Ramsey efec641a82 control characters can only be properly filtered out in both non-UTF-8
and UTF-8 mode inside the output routines, so do it there instead of
inside the input routines


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2382 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-03-17 03:52:08 +00:00
David Lawrence Ramsey 77abec7ecf fix misplaced #endif
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2381 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-03-16 17:00:27 +00:00
David Lawrence Ramsey ba5b12c1fa comment clarifications
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2380 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-03-16 16:40:21 +00:00
David Lawrence Ramsey 40ea2a2ea0 actually, we can swallow non-ASCII control characters if we're not in
UTF-8 mode


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2379 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-03-16 16:32:33 +00:00
David Lawrence Ramsey 496488c5d2 when getting printable input from the edit window or statusbar prompt,
don't swallow non-ASCII control characters, since they're parts of UTF-8
sequences


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2378 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-03-16 15:34:22 +00:00
David Lawrence Ramsey a17a130d6c add debugging statement
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2377 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-03-16 14:39:42 +00:00
David Lawrence Ramsey 631242dd96 a few last minor fixes to do_credits()
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2374 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-03-15 07:06:54 +00:00
David Lawrence Ramsey 4dc5838ccc in do_credits(), display Florian König's name properly in UTF-8 mode;
since we can't dynamically set that element of the array to its UTF-8
equivalent when in UTF-8 mode, we have to use the ISO-8859-1 version and
pass every string in the credits through make_mbstring() to make sure
they're all UTF-8 (sigh)


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2373 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-03-15 06:58:02 +00:00
David Lawrence Ramsey 0099a8f45c fix potential memory corruption problem in make_mbstring(), and also fix
compilation with -pedantic


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2372 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-03-15 06:34:09 +00:00
David Lawrence Ramsey 38156d4491 make the rest of the justify code support multibyte characters
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2371 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-03-15 05:44:03 +00:00
David Lawrence Ramsey 666644efbc fix more inaccurate comments
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2370 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-03-14 20:32:00 +00:00
David Lawrence Ramsey 15540051ac when justifying, don't remove a space after a duplicate character in
punct anymore, as it doesn't really make us more compatible with Pico


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2369 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-03-14 20:06:23 +00:00
David Lawrence Ramsey 7b918c76ee add missing blank lines
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2368 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-03-14 19:17:27 +00:00
David Lawrence Ramsey 7d7e7d58ad fix erroneous #ifdef
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2367 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-03-14 18:54:33 +00:00
David Lawrence Ramsey f0195a8839 make sure all rcfile arguments are valid multibyte strings
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2366 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-03-14 18:47:21 +00:00
David Lawrence Ramsey 08c70ae1e9 formatting fixes
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2365 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-03-14 17:47:17 +00:00
David Lawrence Ramsey 9389ca29cf add more multibyte character support to break_line()
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2364 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-03-14 06:14:02 +00:00
David Lawrence Ramsey af40eeaa06 more comment fixes
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2363 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-03-14 04:31:44 +00:00
David Lawrence Ramsey b159605a5b add missing blank lines
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2362 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-03-14 00:38:36 +00:00
David Lawrence Ramsey 801a8b51d1 remove erroneous if clause in the overhauled justify code
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2361 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-03-14 00:29:37 +00:00
David Lawrence Ramsey ff4a487efa overhaul the paragraph-searching code to make it simpler too
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2360 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-03-13 21:12:25 +00:00
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