Commit Graph

89 Commits (f803ef5aeaf013f2de7c7651b6942e1d45d4769b)

Author SHA1 Message Date
Benno Schulenberg 55a0d76c66 Fixing a few compiler warnings.
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@4672 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2014-03-24 13:35:50 +00:00
Benno Schulenberg 3278f839c1 Initializing the correct variable to zero, to avoid jumpy scrolling.
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@4643 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2014-03-05 09:47:35 +00:00
Benno Schulenberg 54a11058ee Trimming some redundant code, and correcting scrolling behaviour
without softwrap.  And adding a few more NANO_TINY wrappings.


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@4633 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2014-03-03 13:24:09 +00:00
Benno Schulenberg b1a7fddc33 Correctly computing the needed amount to scroll down
when softwrap is on and there are overlong lines.


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@4632 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2014-03-03 10:02:13 +00:00
Benno Schulenberg df7bba340f Scrolling an extra amount when softwrap is on and the current line runs off.
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@4611 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2014-02-26 11:38:30 +00:00
Chris Allegretta 2ad1de0ba6 Remove trailing spaces on source files as they suck
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@4548 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2012-12-30 19:20:10 +00:00
Chris Allegretta 08273aa1b2 Make previous fix more succinct and fix page down also.
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@4486 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2010-03-21 04:56:37 +00:00
Chris Allegretta b5e7647028 * move.c (do_page_up): Explicitly set current_y to 0 when paging up when not in
smooth scroll mode, as previous fixes would otherwise cause the cursor to not
	  really be moved to the stop of the screen.



git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@4485 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2010-03-21 04:35:17 +00:00
Chris Allegretta 1456a10ace 2010-01-28 Chris Allegretta <chrisa@asty.org>
* move.c (do_page_up, do_page_down): Fix for smooth mode not preserving cusor
          position.  Part one of fix for Savannah bug 21178 by Mike Frysinger.



git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@4481 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2010-01-29 03:40:58 +00:00
Chris Allegretta 1a7a91b779 2010-01-12 Chris Allegretta <chrisa@asty.org>
* move.c (do_page_up, do_page_down): Fix issues with not enough scrolling down/up
          and cursor centering.
        * winio.c (edit_scroll): Remove lots of needless checking of line length for
          soft wrapping code.
        * winio.c (edit_update) - Remove extra code for when updating with old_current outside
          of the new buffer boundary and centering issues.



git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@4473 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2010-01-13 03:21:19 +00:00
Chris Allegretta 8a07a96eef 2009-12-01 David Lawrence Ramsey <pooka109@gmail.com>
* Update documentation for 2.2 features including sample nanorc file, texinfo
          file, man pages, UPGRADE file, and update copyright noticed for the current year.



git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@4453 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2009-12-02 03:36:22 +00:00
Chris Allegretta 3b830ee194 2009-11-26 Chris Allegretta <chrisa@asty.org>
* winio.c (edit_scroll): Adjust for long lines when scrolling.                    



git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@4444 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2009-11-27 03:04:59 +00:00
Chris Allegretta c9199e9e9a Simplify logic in do_down() since we now have maxrows to rely on.
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@4442 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2009-11-26 18:23:00 +00:00
Chris Allegretta e2df2c899d 2009-11-24 Chris Allegretta <chrisa@asty.org>
* move.c (do_page_up, do_page_down): Make these functions work better with soft
          line wrapping. 
        * winio.c (compute_maxrows): Make maxrows calculation more accurate when all lines are > COLS.



git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@4441 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2009-11-24 17:15:53 +00:00
Chris Allegretta 8c1edd17e3 Further fixes, also fix some page/up down issues where we go way off course.
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@4428 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2009-11-16 04:28:40 +00:00
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