Commit Graph

144 Commits (ae5d2dffffbbaa247ace8027c49c2e1a49b76282)

Author SHA1 Message Date
David Lawrence Ramsey 1c3bfa9f2b remove do_(left|right)()'s ability to optionally not update the current
line, as this was only used in do_backspace(), and it didn't always
update the screen properly


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@3017 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-09-13 04:53:44 +00:00
David Lawrence Ramsey 7fc0ada6cc fix compilation with --enable-debug
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@3006 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-08-29 18:52:06 +00:00
David Lawrence Ramsey 2385c1aa9b port over more of Brand Huntsman's old patch (with a few tweaks):
compile the file extension regexes on an as-needed basis too


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2948 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-07-29 21:42:08 +00:00
David Lawrence Ramsey 3f12ada4ef add various fill-related cleanups, plus some related cosmetic and
formatting fixes


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2934 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-07-25 22:54:16 +00:00
David Lawrence Ramsey 8e94234b00 rename do_word_count() do_wordlinechar_count(), and simplify its final
message a bit


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2925 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-07-25 04:21:46 +00:00
David Lawrence Ramsey 72936854c4 expand do_word_count() to also count the number of lines and characters
in the file or selection, as wc does


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2924 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-07-25 03:47:08 +00:00
David Lawrence Ramsey 691698a954 move advanced text operations (command execution in a buffer, wrapping,
spell checking, justifying, and word counting) to their own source file,
text.c


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2919 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-07-24 19:57:51 +00:00
David Lawrence Ramsey e99494f21a add miscellaneous color and openfilestruct cleanups, and move the
openfilestruct functions to nano.c, since they're no longer specific to
file operations


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2903 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-07-20 21:08:38 +00:00
David Lawrence Ramsey d2361f0761 add minor fixes to the new color code, and merge parts of Brand
Huntsman's old patch in where applicable


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2858 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-07-14 18:33:51 +00:00
David Lawrence Ramsey db95802a18 add breakage fixes, type fixes, and as-needed color regex compilation
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2854 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-07-13 20:18:46 +00:00
David Lawrence Ramsey 16349c992a typo fix
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2849 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-07-11 20:50:43 +00:00
David Lawrence Ramsey 112620432a per Ken Tyler's suggestion, simplify do_gotoline_msg further; also, in
usage(), properly mention the support for "[+LINE,COLUMN]" at the
command line when HAVE_GETOPT_LONG isn't defined


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2848 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-07-11 20:19:59 +00:00
David Lawrence Ramsey b386a905e6 use blank_line() instead of hblank/mvwhline(), and fix more breakage
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2844 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-07-10 02:37:38 +00:00
David Lawrence Ramsey 6ad59cd29b restructure things so that every file has its own openfilestruct, and so
that the values in it are used directly instead of being periodically
synced up with the globals; accordingly, remove the globals; this
changes pretty much every function


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2835 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-07-08 20:09:16 +00:00
David Lawrence Ramsey 64661ac140 rename filebuffer to openfile. as it's shorter
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2834 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-07-08 19:57:25 +00:00
David Lawrence Ramsey 503f278547 rename variable open_files filebuffer, for consistency
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2831 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-07-08 02:51:58 +00:00
David Lawrence Ramsey 9c1fef04a2 in shortcut_init(), per Jordi's suggestion, simplify wording of
nano_gotoline_msg


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2822 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-07-07 20:11:17 +00:00
David Lawrence Ramsey a549a82c32 more cosmetic fixes
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2807 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-07-01 23:11:52 +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 7f7c66c237 remove now-unused search_last_line global
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2778 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-06-28 05:27:20 +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 b725353ab7 per Jordi's suggestion, remove the Meta-U toggle for -U/--quickblank;
the rcfile option is enough for those that use it regularly


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2749 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-06-21 16:19:47 +00:00
David Lawrence Ramsey 26e637bf12 in toggle_init(), reorder the toggles to put more toggles with similar
functions together


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2719 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-06-18 03:37:56 +00:00
David Lawrence Ramsey d873447f5f clarify the description of the line wrapping toggle
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2718 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-06-18 03:03:32 +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 18a89a6cef more cosmetic fixes
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2704 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-06-17 17:37:46 +00:00
David Lawrence Ramsey c4ca596a90 various #ifdef fixes
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2703 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-06-16 20:58:19 +00:00
David Lawrence Ramsey f3ecffd24d add the "regexp" rcfile option back in at DB's suggestion, the
"casesensitive" and "backwards" rcfile options for consistency,
documentation updates, and related cleanups


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2700 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-06-16 18:48:30 +00:00
David Lawrence Ramsey 95f7a7431e wording fix
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2694 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-06-16 03:11:39 +00:00
David Lawrence Ramsey fa6c29cc2e in shortcut_init(), clarify the description of ^X when
--enable-multibuffer is used


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2693 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-06-16 03:07:05 +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 6f143c8124 add the ability to convert (non-verbatim input) typed tabs to spaces
using the -E/--tabstospaces command line options, the "tabstospaces"
rcfile option, and the toggle Meta-E; also, change the short command
line option for --backupdir from -E to -C


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2682 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-06-15 23:20:56 +00:00
David Lawrence Ramsey a049c8364f in shortcut_init(), allow the mark to be used in view mode, as Pico does
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2637 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-06-12 23:53:28 +00:00
David Lawrence Ramsey e010edd1f8 implement word count via Meta-D at the main window
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2633 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-06-12 22:31:03 +00:00
David Lawrence Ramsey aeeb96e628 cosmetic and formatting fixes
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2628 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-06-12 16:00:09 +00:00
David Lawrence Ramsey 193b0e56f3 add missing blank line
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2603 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-06-06 18:41:17 +00:00
David Lawrence Ramsey 9b108c2110 in shortcut_init(), remove unnecessary "Refresh" placeholder in the file
browser shortcut list; also add a few formatting fixes


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2602 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-06-06 18:38:16 +00:00
David Lawrence Ramsey c10d8ffe9f for consistency, remove -R/--regexp command line option, and allow the
toggle unconditionally


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2588 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-06-03 20:51:39 +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 8e15674c70 fix more bad #ifdefs
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2585 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-06-03 19:11:27 +00:00
David Lawrence Ramsey 40e4acf55e port over DB's (better) equivalent of the last fix, and tweak a few
comments


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2550 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-05-26 06:09:07 +00:00
David Lawrence Ramsey 5d8d0b19be remove redundancy
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2549 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-05-26 05:53:29 +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 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 d3d37433ae mention the support for moving to a different column in the prompt
formerly known as the "Go to Line" prompt, and also in the help text
where possible


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2525 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-05-17 21:49:19 +00:00
David Lawrence Ramsey 9245f97960 more LINE,COLUMN-related work: fix problems parsing it, and allow it at
the (soon-to-be-renamed) "Go to Line" prompt


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2522 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-05-17 18:06:26 +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 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