Commit Graph

301 Commits (52161ee3a1aad0cfd765cc73cccccc6b0a6abdca)

Author SHA1 Message Date
David Lawrence Ramsey 8bd960bbc9 minor backup_lines() cleanups
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@3127 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-11-09 18:49:16 +00:00
David Lawrence Ramsey 9c984e8e63 in do_alt_speller(), move the code that replaces the text of the current
file with the text of the spell-checked file into its own function,
replace_buffer()


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@3109 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-11-08 19:15:58 +00:00
David Lawrence Ramsey e19449ec50 actually use statusbar_pww in the statusbar prompt code to cut down on
redundant updates, add related functions to do that, and rename a few of
the statusbar prompt functions for consistency


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@3099 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-11-07 21:45:44 +00:00
David Lawrence Ramsey 37ddfa9dbd move do_verbatim_input() from nano.c to text.c, since it's an advanced
text-based operation


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@3096 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-11-07 06:06:05 +00:00
David Lawrence Ramsey 64844b6959 reorder functions
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@3095 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-11-05 20:04:16 +00:00
David Lawrence Ramsey 43fff01ede move functions specific to the file browser to their own source file,
browser.c


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@3094 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-11-05 20:01:11 +00:00
David Lawrence Ramsey 38ebba11b7 move do_yesno() to prompt.c too
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@3079 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-11-03 21:07:24 +00:00
David Lawrence Ramsey 00cc565ddd move check_linenumbers(), dump_buffer(), and dump_buffer_reverse() from
winio.c to utils.c too


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@3076 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-11-02 15:44:01 +00:00
David Lawrence Ramsey d420b5a50c more function reordering, plus comment fixes
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@3074 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-11-01 23:00:56 +00:00
David Lawrence Ramsey c359301955 reorder functions
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@3073 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-11-01 20:11:55 +00:00
David Lawrence Ramsey 7e2d673b5f move functions specific to the help browser to their own source file,
help.c, and adjust related variables accordingly


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@3072 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-11-01 19:32:45 +00:00
David Lawrence Ramsey 2b9d6a0e6c move get_page_start() from winio.c to utils.c too, and fix a few
comments


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@3066 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-11-01 17:45:31 +00:00
David Lawrence Ramsey d24d0a43e8 move functions specific to the statusbar prompt to their own source
file, prompt.c, and adjust related variables accordingly


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@3065 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-11-01 17:37:44 +00:00
David Lawrence Ramsey 81c4e187f5 move xplustabs(), actual_x(), strnlenpt(), and strlenpt() from winio.c
to utils.c, as they're really utility functions


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@3064 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-10-31 23:07:58 +00:00
David Lawrence Ramsey 67d1951e4d refactor the statusbar code to have and use statusbar_xplustabs(), for
consistency


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@3063 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-10-31 19:36:37 +00:00
David Lawrence Ramsey 3e477263da in nanoget_repaint(), rename parameter inputbuf to buf, for consistency
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@3062 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-10-31 01:32:46 +00:00
David Lawrence Ramsey 26f61a4503 remove declaration of the now-static char* prompt
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@3061 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-10-28 17:14:11 +00:00
David Lawrence Ramsey a0aff67a4d rename edit_add() to edit_draw(), and rename its parameter yval to line
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@3059 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-10-27 20:10:45 +00:00
David Lawrence Ramsey 2c8cf48372 at long last, properly handle mouse clicks on the statusbar prompt text
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@3053 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-10-27 04:51:41 +00:00
David Lawrence Ramsey 3d12f0f53d refactor nanoget_repaint() to split out the new function
get_statusbar_page_start(), the statusbar prompt's equivalent of
get_page_start(); also make sure that the minimum allowed terminal size
in columns is 4, as the statusbar prompt code relies on this assumption
and will crash otherwise


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@3051 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-10-26 23:14:59 +00:00
David Lawrence Ramsey 2de84c1c8d add the ability to scroll up or down single lines without scrolling the
cursor, via Meta-- and Meta-+; note that this is disabled when
NANO_SMALL is defined


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@3049 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-10-24 02:12:09 +00:00
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 feb89db8a0 more miscellaneous minor fixes
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@3016 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-09-13 04:45:46 +00:00
David Lawrence Ramsey 8b006c2912 store Unicode values in longs instead of ints
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2977 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-08-08 23:03:25 +00:00
David Lawrence Ramsey 6ff695c154 even better handling of invalid Unicode characters
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2975 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-08-05 03:14:29 +00:00
David Lawrence Ramsey 107e816324 eliminate still more redundant screen updates
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2969 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-08-01 21:05:29 +00:00
David Lawrence Ramsey 6a83647a11 rename get_word_kbinput() to get_unicode_kbinput(), and also rename
related variables


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2968 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-08-01 19:12:05 +00:00
David Lawrence Ramsey bf0e47dc37 miscellaneous enum cleanups, including making the file-writing
functions' append parameter an enum instead of an int


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2966 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-08-01 18:27:10 +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 96452cb60c handle invalid multibyte characters more efficiently
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2941 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-07-26 06:13:45 +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 22ae034f2d add more miscellaneous mouse support-related fixes, and move
do_statusbar_output() after do_statusbar_mouse(), to match do_output()'s
being after do_mouse() in nano.c


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2929 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-07-25 20:01:57 +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 7ea09e540f move mark setting, deleting, backspacing, tabbing, and entering of
newlines to text.c too


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2923 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-07-25 02:41:59 +00:00
David Lawrence Ramsey cc8185fe2b reorder a few functions
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2922 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-07-25 02:33:45 +00:00
David Lawrence Ramsey 150d889965 make color_to_short() actually return a short
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2921 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-07-24 20:23:40 +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 c00513b65e fix alternate spell checker breakage: don't lose colors after using it
on a file


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2913 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-07-23 00:41:45 +00:00
David Lawrence Ramsey 61f567378a display invalid multibyte sequences as Unicode FFFD, take 2; also clean
up the character-parsing functions


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2909 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-07-21 22:12:03 +00:00
David Lawrence Ramsey 66444c37b3 more function reordering
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2908 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-07-21 18:05:27 +00:00
David Lawrence Ramsey c4037f3055 move do_(next|prev)_word(_void())? to move.c too
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2904 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-07-20 21:31:19 +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 ca62f9fa2b move the paragraph-searching functions to move.c, as they're movement
functions, and make them call check_statusblank() too; also reorder some
other movement functions


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2902 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-07-20 19:24:11 +00:00
David Lawrence Ramsey 96e6d56571 in find_history() and get_history_completion(), make parameters const
where possible


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2896 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-07-19 04:53:45 +00:00
David Lawrence Ramsey 0e581b3524 make sure that the current position in the history list is properly set
to the bottom if we cancel out of the prompt


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2890 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-07-18 07:48:50 +00:00
David Lawrence Ramsey 7eb30a8353 change NANO_WIDE #define to ENABLE_UTF8, as the latter is clearer
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2881 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-07-17 02:40:07 +00:00
David Lawrence Ramsey c104ef15a6 simplify get_totals() (renamed get_totsize()) to only get the total
number of characters, and eliminate dependence on its old ability to get
the total number of lines by renumber()ing when necessary and using the
number of the last line of a filestruct


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2879 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-07-17 01:44:35 +00:00
David Lawrence Ramsey 5b44f373fd really fix color breakage by decoupling edit_update() and
edit_refresh(); edit_update() is only called without edit_refresh() in
do_gotolinecolumn() if allow_update is FALSE, and in edit_refresh()
itself if edittop is out of range of current


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2875 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-07-16 22:47:12 +00:00
David Lawrence Ramsey 8f4762a842 cosmetic and #ifdef fixes
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2874 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-07-16 22:35:11 +00:00
David Lawrence Ramsey 8f1afee813 fix color breakage; also, in main(), when opening files with
"+LINE,COLUMN" arguments on the command line, don't update the screen
when moving to their specified lines and columns


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2873 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-07-16 07:06:36 +00:00