Commit Graph

74 Commits (f9d4fd37552f2f284f46238272f5f1307427dc23)

Author SHA1 Message Date
Chris Allegretta f9d4fd3755 2009-11-14 Chris Allegretta <chrisa@asty.org>
* move.c (do_first_line, do_last_line): Just set edit_refresh_needed rather than 
          get messy.



git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@4423 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2009-11-14 19:57:38 +00:00
Chris Allegretta bce7d404d9 2009-09-03 Chris Allegretta <chrisa@asty.org>
* global.c (shortcut_init): Fix up/down keys not responding in the file browser,
          discovered by Hannes <mr_creosote@mutantwatch.de>.
        * move.c (do_up) - Fix another scrolling issue with softwrap when the
          cursor is beyond COLS, discovered by Hannes <mr_creosote@mutantwatch.de>.



git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@4408 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2009-09-03 23:29:14 +00:00
Chris Allegretta 139934a236 2009-08-29 Chris Allegretta <chrisa@asty.org>
* Fix more soft wrapping issues, particularly with soft scrolling,
          discovered by Hannes <mr_creosote@mutantwatch.de>.



git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@4405 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2009-08-30 03:50:16 +00:00
Chris Allegretta d47d8cd450 * First pass at some caching of caching color info. Right now it's only for
multi-line regexes but this may not be enough to increase performance.



git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@4351 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2009-01-25 07:25:17 +00:00
David Lawrence Ramsey d8a1d37161 update copyright notices, as Chris Allegretta's copyrights have now been
assigned to the Free Software Foundation; also, make copyright notices
consistent in style


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@4173 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2007-10-11 05:01:32 +00:00
David Lawrence Ramsey c9694b7636 update copyright notices, as my copyrights have now been assigned to the
Free Software Foundation


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@4172 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2007-10-05 16:44:45 +00:00
David Lawrence Ramsey d0035b4ab2 convert to GPLv3 or later
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@4147 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2007-08-11 05:17:36 +00:00
David Lawrence Ramsey 6335fb54d5 miscellaneous comment fixes
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@4012 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2007-01-01 05:15:32 +00:00
David Lawrence Ramsey cb801d63a3 cosmetic copyright notice fixes
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@3950 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2006-11-10 02:47:11 +00:00
David Lawrence Ramsey 6ff22e7020 rename the values of the scroll_dir enum to UP_DIR and DOWN_DIR, since
UP is defined as a termcap value in Tru64's curses.h, which breaks
compilation


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@3793 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2006-07-19 00:14:52 +00:00
David Lawrence Ramsey 2c36e2eb00 consolidate do_scroll_(up|down)() into do_(up|down)(), as they have a
lot of common code


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@3763 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2006-07-06 22:17:47 +00:00
David Lawrence Ramsey bf104950fd in do_scroll_up() and do_scroll_down(), fix problems where, after
scrolling, the previous and current lines would not be updated properly
if the current line was not the first or last line of the edit window


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@3762 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2006-07-06 20:40:53 +00:00
David Lawrence Ramsey ec15fdb30b comment fixes
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@3761 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2006-07-06 20:36:01 +00:00
David Lawrence Ramsey ef0d5a7637 handle prepending of wrapped text in one place instead of many, so that
it always works consistently


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@3547 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2006-05-22 02:08:49 +00:00
David Lawrence Ramsey ce8623669b handle statusbar blanking in one place instead of many, so that it
always works consistently, per Benno Schulenberg's patch (with a few
tweaks of mine); also, blank the statusbar after 26 keystrokes instead
of 25, for compatibility with Pico


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@3541 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2006-05-21 21:23:21 +00:00
David Lawrence Ramsey 9ea05902ec comment fixes
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@3422 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2006-04-24 19:44:04 +00:00
David Lawrence Ramsey 6d6a36c647 add descriptive comments to pretty much all functions and major
variables that don't have them, plus a few miscellaneous minor fixes


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@3237 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-12-08 07:09:08 +00:00
David Lawrence Ramsey 034b994eb5 since proto.h includes nano.h, and nano.h includes config.h first,
include proto.h first and remove redundant includes of config.h in all
non-header source files


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@3236 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-12-08 02:47:10 +00:00
David Lawrence Ramsey 315eb3280a adjust copyright notices in all source files to account for Chris'
reassigning the 2005-2006 copyright on nano to me


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@3215 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-11-28 19:35:29 +00:00
David Lawrence Ramsey ebe3425f9f rename the NANO_SMALL #define to NANO_TINY
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@3176 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-11-15 03:17:35 +00:00
David Lawrence Ramsey 036a9d5341 comment fixes
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@3145 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-11-10 05:26:37 +00:00
David Lawrence Ramsey ce51bb2509 comment fix
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@3125 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-11-09 17:01:33 +00:00
David Lawrence Ramsey 31d7b3667c tweak do_para_end() to remove the assumption that the file always ends
in a magicline


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@3123 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-11-09 04:20:55 +00:00
David Lawrence Ramsey 46f5665da2 tweak do_last_line() to remove the assumption that the file always ends
in a magicline


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@3093 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-11-05 17:50:06 +00:00
David Lawrence Ramsey 29bf57ff67 revert erroneous change
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@3081 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-11-03 21:38:51 +00:00
David Lawrence Ramsey 2ffdea4fc1 tweak a few functions to remove the assumption that the file always ends
in a magicline, and to rely on fileage and filebot instead of NULL for
their checks to detect the top or bottom of the file


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@3080 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-11-03 21:08:39 +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 a9b862c804 fix more edit_scroll() breakage
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2994 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-08-16 01:27:05 +00:00
David Lawrence Ramsey 4f03daff91 add new -W/--wordbounds command line option, and new "wordbounds" rcfile
option, to control whether the word movement functions treat punctuation
characters as part of a word


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2983 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-08-10 22:12:28 +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 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 ce78cdb722 really fix inconsistency
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2917 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-07-23 22:57:46 +00:00
David Lawrence Ramsey acefd9e9b5 fix inconsistency
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2916 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-07-23 22:50:02 +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 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 5e146e815f add missing check_statusblank() calls
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2878 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-07-17 00:01:18 +00:00
David Lawrence Ramsey 4d46437f87 properly overhaul edit_scroll() to update the screen on its own this
time, convert the vertical movement functions to use the new version of
it, and simplify them where possible


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2876 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-07-16 22:50:30 +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 b802a13c5a it turns out edit_redraw() is needed after all when doing
PageUp/PageDown; revert all the movement code and edit_scroll() changes
except for added comments and edit_scroll() simplifications


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2860 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-07-14 22:15:09 +00:00
David Lawrence Ramsey 1458891b9f add comments, and fix some edit_scroll() breakage
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2859 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-07-14 20:37:01 +00:00
David Lawrence Ramsey f00c9612b3 make the movement code simpler by tweaking edit_scroll() to redraw all
necessary lines instead of calling it and then calling edit_redraw()


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2856 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-07-14 18:01:08 +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 651853aa21 add missing blank line
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2788 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-06-28 18:57:28 +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 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 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 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 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