Commit Graph

502 Commits (39bd1b3597027c3da37207c07d1399fd3b70e37b)

Author SHA1 Message Date
David Lawrence Ramsey 44e0c03fff in do_yesno(), het input from bottomwin instead of edit, so that the
cursor isn't erroneously put in the edit window while we wait for an
answer


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2797 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-06-29 19:01:11 +00:00
David Lawrence Ramsey 4e05b755ed in do_cursorpos(), if constant is TRUE, only display the cursor position
when disable_cursorpos is FALSE; don't refuse to display it when the
cursor position hasn't changed, as that doesn't always keep it properly
updated


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2791 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-06-28 20:04:14 +00:00
David Lawrence Ramsey 5593e20964 more comment fixes
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2789 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-06-28 19:49:15 +00:00
David Lawrence Ramsey b2072b0999 cosmetic fixes
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2785 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-06-28 14:59:38 +00:00
David Lawrence Ramsey 9905b6ae74 rework the credits handling to display Florian König's name properly
whether we're in a UTF-8 locale or not.  This requires a minor hack, but
it's better than requiring a massive function that we only use once


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2784 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-06-28 07:26:11 +00:00
David Lawrence Ramsey 3b2fdb00e4 add missing blank line
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2783 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-06-28 07:16:13 +00:00
David Lawrence Ramsey 2cf6d717f1 add various type changes to avoid problems on systems where int and
ssize_t are different sizes.  Make filestruct->lineno a ssize_t (so that
we can avoid negative line numbers at the "Go To Line" prompt),
current_y a ssize_t (in order to hold the maximum difference between two
filestruct->lineno's), totlines a size_t, and change related variables
to match


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2782 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-06-28 06:25:34 +00:00
David Lawrence Ramsey 6ad6b85862 more miscellaneous minor fixes
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2781 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-06-28 06:16:30 +00:00
David Lawrence Ramsey 5423680d67 in edit_redraw(), make do_refresh a bool instead of an int
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2779 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-06-28 05:56:16 +00:00
David Lawrence Ramsey 85f6a2daab more last-minute comment fixes
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2769 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-06-26 22:59:54 +00:00
David Lawrence Ramsey a8824a197e per Mike Frysinger's suggestion, change the word detection functions'
behavior back to what it was before (for now, until there's a way for
the user to control it), as their new behavior makes them harder to use
when editing source code; by the same token, leave word count's behavior
the way it is, since it's generally not used when editing source code


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2765 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-06-26 19:03:48 +00:00
David Lawrence Ramsey fe7d53e51e last-minute comment fixes
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2761 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-06-25 20:56:36 +00:00
David Lawrence Ramsey 7a3f49c019 remove all instances of charcpy() and replace them with strncpy(), for
ease of maintenance


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2758 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-06-22 00:24:11 +00:00
David Lawrence Ramsey d4ea5b69c5 oops; do_yesno() doesn't need display_string(); it only needs to use
actual_x() to get the actual number of characters in buf when it calls
mvwaddnstr()


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2754 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-06-21 21:03:06 +00:00
David Lawrence Ramsey 8d5beb560c in titlebar(), handle VERLEN's being a UTF-8 string
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2753 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-06-21 20:37:04 +00:00
David Lawrence Ramsey ba61cc382f fix total_redraw() so that it always keeps the cursor in the same window
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2752 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-06-21 20:16:26 +00:00
David Lawrence Ramsey 3f301dd437 in do_yesno(), add a missing assert, and use display_string() to display
the prompt, so that we don't end it in the middle of a multibyte
character if it's more than (COLS - 1) bytes long


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2751 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-06-21 19:47:39 +00:00
David Lawrence Ramsey 90d505cc4a comment and indentation fixes
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2732 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-06-18 22:33:55 +00:00
David Lawrence Ramsey 9c6d78669e remove the reset_cursor() call in statusq(), as it erroneously leaves
the cursor in the edit window when we're at the "Save File Under
Different Name" prompt


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2731 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-06-18 22:33:24 +00:00
David Lawrence Ramsey c54c4d1eea rename total_update() total_redraw() for consistency
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2725 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-06-18 15:49:17 +00:00
David Lawrence Ramsey 7431fe5e93 work around slang brain damage in total_update()
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2724 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-06-18 15:15:48 +00:00
David Lawrence Ramsey cd0210ff3e fix more minor screen update problems
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2722 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-06-18 14:05:21 +00:00
David Lawrence Ramsey 62898233ac in statusq(), call wrefresh(bottomwin) after getting an answer and
blanking out the statusbar, to make sure that the blanking is done; this
fixes a problem where the statusbar is not properly blanked after using
the "Go To Line" prompt with the NO_HELP flag set


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2720 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-06-18 04:32:26 +00:00
David Lawrence Ramsey c661853315 add comment
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2715 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-06-17 22:33:15 +00:00
David Lawrence Ramsey bf51aa4c0a QUICK_BLANK and CONST_UPDATE shouldn't be working at the same time, as
they make the statusbar blank and redraw itself far too many times, and
it makes no sense to use them together anyway; also, clean up
check_statusblank() a little


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2713 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-06-17 21:52:59 +00:00
David Lawrence Ramsey 954aba7430 formatting fix
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2712 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-06-17 21:21:10 +00:00
David Lawrence Ramsey 3435a0ff64 rename the CONSTUPDATE flag to CONST_UPDATE, and clarify its description
in the help text


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2711 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-06-17 21:08:13 +00:00
David Lawrence Ramsey e29111f7ec add -U/--quickblank option, a Meta-U toggle, and a "quickblank" rcfile
option to blank the statusbar after 1 keystroke instead of 25; note that
this is disabled when NANO_SMALL is defined


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2709 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-06-17 19:06:25 +00:00
David Lawrence Ramsey ea01474c4b since the DISABLE_CURPOS flag is only used in winio.c, reduce it to a
static bool there


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2707 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-06-17 18:27:00 +00:00
David Lawrence Ramsey 077d0647c9 in statusbar(), set statusblank to 25 instead of 26, to match current
Pico


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2706 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-06-17 18:14:03 +00:00
David Lawrence Ramsey b2b6976bd9 change the SMOOTHSCROLL flag to the SMOOTH_SCROLL flag
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2692 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-06-16 02:13:10 +00:00
David Lawrence Ramsey 7a4aaa53a1 change the NO_UTF8 flag to the USE_UTF8 flag, and reverse its meaning
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2691 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-06-16 02:09:57 +00:00
David Lawrence Ramsey e221311f2e don't count punctuation when searching for a whole word in
is_whole_word()


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2666 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-06-15 03:03:45 +00:00
David Lawrence Ramsey 1e64db6629 more miscellaneous fixes
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2664 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-06-14 23:38:41 +00:00
David Lawrence Ramsey ce9d299c47 revert the changes to the behavior of Esc Esc [3-digit number from 000
to 255], as it still won't let us type all possible bytes


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2663 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-06-14 23:38:08 +00:00
David Lawrence Ramsey 399fe939f9 change the behavior of Esc Esc [3-digit number from 000 to 255] so that
it enters the byte with that value regardless of whether we're in UTF-8
mode or not, and update the help text to mention this; this will allow
searching for and replacing raw bytes with their equivalent multibyte
sequences as entered using verbatim input


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2653 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-06-13 17:26:19 +00:00
David Lawrence Ramsey 30d0a81656 don't work around invalid multibyte sequences in rcfile options anymore,
but generate errors


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


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2640 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-06-13 02:40:04 +00:00
David Lawrence Ramsey 5b9f52265a cosmetic fix
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2638 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-06-13 02:22:44 +00:00
David Lawrence Ramsey d0d5b8fc0e in display_string(), don't check for multicolumn characters if the NO_UTF8 flag isn't set
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2624 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-06-10 20:45:54 +00:00
David Lawrence Ramsey 0df61f1aac cosmetic fixes
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2616 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-06-08 20:23:06 +00:00
David Lawrence Ramsey 7bf86e1707 when reading a file in, make sure each line is a valid multibyte string
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2612 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-06-08 19:50:02 +00:00
David Lawrence Ramsey 3925bdafda fix erroneous #ifdef that caused a compilation problem when
--enable-nanorc wasn't used and --enable-extra was, and make sure we put
back the keystroke that breaks us out of the credits (if any)


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2607 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-06-07 03:20:35 +00:00
David Lawrence Ramsey da33153379 in do_yesno(), allow refreshing the screen via Ctrl-L, as Pico does
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2601 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-06-06 17:00:08 +00:00
David Lawrence Ramsey d29b9d5bd6 fix another memory corruption problem in display_string() found by
valgrind


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2598 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-06-06 03:17:07 +00:00
David Lawrence Ramsey cc81436f81 move check_linenumbers() down so that it's near the other debugging
routines


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2592 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-06-05 19:08:59 +00:00
David Lawrence Ramsey 6529ab434a remove unneeded blank line
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2591 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-06-04 01:16:46 +00:00
David Lawrence Ramsey 1addd601bc really fix bad #ifdefs; history functions are left out when NANO_SMALL
is defined, and history saving and loading functions are left out when
NANO_SMALL is defined and/or ENABLE_NANORC isn't defined


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2586 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-06-03 19:28:30 +00:00
David Lawrence Ramsey d922f199a7 define last_kbinput inside the right #ifdef block
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2578 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-06-02 19:50:18 +00:00
David Lawrence Ramsey 34bdc35d94 readd tab completion of history strings, with a few minor tweaks
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2577 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-06-02 18:41:31 +00:00
David Lawrence Ramsey 1726050ef9 fix more bad #ifdefs, and add a few formatting fixes
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2576 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-06-02 05:50:58 +00:00
David Lawrence Ramsey 8234f672d4 typo fix
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2575 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-06-02 02:32:39 +00:00
David Lawrence Ramsey 0e0fef03c5 typo fix
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2552 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-05-26 18:05:22 +00:00
David Lawrence Ramsey f1d3d9581a more miscellaneous minor fixes
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2551 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-05-26 18:03:17 +00:00
David Lawrence Ramsey 86d8fc37d7 remove unneeded blank line
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2548 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-05-26 05:50:46 +00:00
David Lawrence Ramsey e2ce2792a3 remove redundancy
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2546 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-05-26 05:33:57 +00:00
David Lawrence Ramsey 045d130cfa really fix one of the last fixes
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2545 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-05-26 05:27:19 +00:00
David Lawrence Ramsey 31b159c1b3 add various fixes to avoid a hang and several potential assertion
failures when building with DEBUG defined


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2544 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-05-26 05:17:13 +00:00
David Lawrence Ramsey 67e3b93861 comment fix
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2536 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-05-23 18:49:28 +00:00
David Lawrence Ramsey e5bc1c45ce oops; free magichistory *properly* when we don't need it anymore
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2535 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-05-23 17:19:32 +00:00
David Lawrence Ramsey 2fba43c842 free magichistory when we don't need it anymore
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2534 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-05-23 17:14:46 +00:00
David Lawrence Ramsey 934f9687bb overhaul the history code to work more consistently, and clean up
various parts of it; note that history tab completion has been removed


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2533 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-05-23 16:30:06 +00:00
David Lawrence Ramsey 6f25a67833 various minor fixes
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2528 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-05-20 02:57:05 +00:00
David Lawrence Ramsey 6e925cf330 update the Free Software Foundation's mailing address in various
comments


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2510 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-05-15 19:57:17 +00:00
David Lawrence Ramsey 066713e87e more indentation fixes and one more cosmetic fix
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2509 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-05-14 23:21:02 +00:00
David Lawrence Ramsey 546f5b3d8a rename a few more variables, and fix some indentation
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2508 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-05-14 23:14:47 +00:00
David Lawrence Ramsey e781ddf3b1 still more cosmetic fixes
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2507 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-05-14 22:44:16 +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 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 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 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
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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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