Commit Graph

160 Commits (2072b7415398e4bb3faef494f983aeef734650b5)

Author SHA1 Message Date
Chris Allegretta a016f00f14 2013-01-02 David Benjamin <davidben@Savannah>
* src/search.c (parse_syntax): Fix blatantly and dangerously incorrect  code for
          deleting old syntaxes.



git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@4560 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2013-01-03 05:17:36 +00:00
Chris Allegretta bf88d27adc 2012-12-31 Chris Allegretta <chrisa@asty.org>
* src/*: Introduce (basic) vim-style file locks.  Does not allow vim to recover
          our files, and doesn't yet support setting the file as modified; just lets a 
          vim user know we're editing a file.  Commands line "-G" or "--locking", nanorc 
          option "locking".  New functions src/files.c:do_lockfile(), write_lockfile(),
          and delete_lockfile().



git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@4549 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2013-01-01 03:24:39 +00:00
Chris Allegretta d84849ec12 2012-02-05 Chris Allegretta <chrisa@asty.org>
* src/*: Fix overlapping strings highlighting each other.  new variables in edit_draw
          (slmatcharray, pbegin, paintok), new logic (with repeated setting od values in the
          array but its BFI after all).  FIXME: Need to create a new 'overlap'
        * src/*: Fix a silly issue with the argument to nregcomp, as it's confusing to the caller
        * src/nano.h: Change the color types to a compiler macro (COLORWIDTH), may not actually
          even be worth doing, but someday who knows how wide a color curses implementation might
          be, and maybe we'll even start checking for it in autoconf!



git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@4547 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2012-02-06 01:10:45 +00:00
Chris Allegretta 8e2a930714 2011-02-18 Chris Allegretta <chrisa@asty.org>
* New saved cursor position history option.  Command line option -P or --poslog, rc file
          entry "poslog".  Search history changes to ~/.nano/search_history, cursor position log
          is ~/.nano/filepos_history.  Added checks to move the legacy .nano_history file to the new
          location.  Several new functions to files.c: load_poshistory(), save_poshistory(),
          check_poshistory(), update_poshistory(), and reworking of histfilename().  New FAQ entry
          4.15 discussing the change and offering an interoperability workaround.



git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@4530 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2011-02-18 07:30:57 +00:00
Chris Allegretta b00d0b9c8c 2011-02-12 Chris Allegretta <chrisa@asty.org>
* Initial libmagic implementation, adapted from Eitan Adler <eitanadlerlist@gmail.com>.
          New nanorc entry "magic" to enable this functionality, nanorc file and man page updates.



git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@4528 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2011-02-13 04:23:10 +00:00
Chris Allegretta 637daa85c5 * src/*: Retire iso_me_harder_funcmap based on suggestion by <bernd.spaeth@gmx.net>
This does add 20KB to nano's executable size but it gets rid of a lot of indirection
          that makes people stomach turn.  There are several new stub functions and need of more
          tidying as a result of this.



git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@4527 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2011-02-07 14:45:56 +00:00
Chris Allegretta 0acca27ac7 2010-06-20 Chris Allegretta <chrisa@asty.org>
* New option allow_insecure_backup, allows the previous security
          fixes for backup files to be overridden if you're really positive
          you want to.  Fixes Savannah bug 29732 by Brian Szymanski <skibrianski>.



git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@4508 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2010-06-21 03:10:10 +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 dcf5cbbf6a * rcfile.c (parse_rcfile), initialize size argument to getline(), fixes crash on FreeBSD
reported by Eitan Adler <eitanadlerlist@gmail.com>.



git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@4445 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2009-11-27 05:09:56 +00:00
Chris Allegretta e9dee887a9 2009-11-21 Chris Allegretta <chrisa@asty.org>
* rcfile.c: Add unbinding keyword, fixes Savannah bug 22852 reported by frankd.



git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@4433 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2009-11-21 16:26:59 +00:00
Chris Allegretta 3aad8ab9aa * rcfile.c - Add in specific check for UNDOABLE and fix declaration as
to what flag it toggles.  Fixes undo mode being able to be called from
          the rc file, reported by Helmut Jarausch <jarausch@igpm.rwth-aachen.de>



git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@4416 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2009-11-03 19:31:17 +00:00
Chris Allegretta 05417a2444 2009-08-17 Chris Allegretta <chrisa@asty.org>
* Initial soft line wrapping implementation.  Command line flags
          -$ or --softwrap.
        * nano.c, text.c: Clean up some fprintf warnings in debug mode due to printing
          a size_t without using the zd specifier.



git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@4402 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2009-08-17 07:52:10 +00:00
Chris Allegretta a48507d32a 2009-08-13 Chris Allegretta <chrisa@asty.org>
* New global flag implementation courtesy of Adam Wysocki <gophi@arcabit.pl>, allows
 	  previous undo flag to be implemented consistent with other flags.



git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@4400 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2009-08-14 03:18:29 +00:00
Chris Allegretta 0a10e20eec Add in rcfile support for undo since it would be bad to overly punish the masochists who want to try it out and hopefully submit bug reports.
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@4396 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2009-07-12 06:13:36 +00:00
Chris Allegretta f86fa86089 2009-02-23 Chris Allegretta <chrisa@asty.org>
* rcfile.c (parse_keybinding) - Define a var before tryung to use it.  Whoops!
	* fix some redefinitions causing compiler warnings, from Eitan Adler.  Other
	  (hopefully) fixes for uncasted malloc()s, reported by the same.



git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@4385 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2009-02-25 04:32:15 +00:00
Chris Allegretta 8257bf145e 2009-02-11 Chris Allegretta <chrisa@asty.org>
* nanorc.c (parse_include): Do call real_dir_from_tilde() on included
          files in .nanorc, but still avoiding bug #25297.  Fixes ~ and ~user
          specifications for nanorc include files, as reported by Eitan Adler.



git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@4375 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2009-02-11 05:45:57 +00:00
Chris Allegretta a30eb78006 2009-02-09 Chris Allegretta <chrisa@asty.org>
* New option -q, --quiet, rcfile option "quiet" implemented.  Skips printing
          errors about the rcfile and asking user to press enter.  Also, nano should
          now only ask for one enter press when there is an error when not using -q.
          Based on discussion between Eitan Adler and Mike Frysinger.
        * rcfile.c (parse_keybinding) -  Significant cleanups and fixes for
          detecting and reporting errors in key bindings code.



git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@4374 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2009-02-09 04:03:20 +00:00
Chris Allegretta 4522ca2d1b 2009-02-06 Chris Allegretta <chrisa@asty.org>
* rcfile.c (parse_include): Abort on being unable to open an included rcfile.  Fixes
          Savannah bug 25490, nanorc: "include"ing a file which doesn't exist causes nano to segfault.



git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@4365 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2009-02-07 00:01:40 +00:00
Chris Allegretta 2d1bdd0dd6 Fix regression bugs introduced with other recent bugs disguised as features.
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@4354 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2009-01-28 05:11:57 +00:00
Chris Allegretta 2823c99e72 2009-01-25 Chris Allegretta <chrisa@asty.org>
* files.c (open_file), nanorc.c (parse_include): Don't get_full_path on     
          included rc files, due to it potentially impacting the ability
          to read files in nano's cwd().  Fixes Savnanah bug #25297 reported by Mike 
          Frysinger)



git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@4353 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2009-01-26 08:48:22 +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
Chris Allegretta a117163a4c 2009-01-19 Chris Allegretta <chrisa@asty.org>
* Change funcion definitions to shorts instead of (void *)s.  New mapping function
          iso_me_harder_funcmap().  Fixes compilation complaints with -pedantic, 
          reported by Eitan Adler <eitanadlerlist@gmail.com>.



git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@4349 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2009-01-19 19:10:39 +00:00
Chris Allegretta 4e12cb8455 Get rid of some unused variables with -Wall
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@4342 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2008-10-14 19:55:34 +00:00
Chris Allegretta f30c1390c7 2008-09-21 Chris Allegretta <chrisa@asty.org>
* rcfile.c, color.c, nano.h: Add new capability for matching a syntax type by the "header" (1st line)
          of a file being edited.  Based on Savannah bug 24197 and inital proof of concept by Dave Geering
          <dgeering@toshiba-tap.com>



git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@4328 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2008-09-21 23:02:30 +00:00
Chris Allegretta 6b83e5290c 2008-08-29 Chris Allegretta <chrisa@asty.org>
* configure.ac, color.c, rcfile.c, utils.c: 1st attempt at supporting systems which don't support
          GNU-style word boundaries.  New function fixbounds() to translate from GNU-style to
          BSD-style, autoconf option GNU_WORDBOUNDS.



git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@4315 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2008-08-30 05:16:20 +00:00
Chris Allegretta faeeb5bd7e 2008-08-28 Chris Allegretta <chrisa@asty.org>
* configure.ac, rcfile.c:  Add support for an alternate rcfilename at configure time.  Maybe this
          should become a command line option some day, but I don't see the need currently.  Start of   
          fix for Savannah bug #24128: Add nanorc support to win32 platform.



git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@4314 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2008-08-28 06:13:05 +00:00
Chris Allegretta fa406949ec Allow backspace to be bound to keys in .nanorc
Allow kdel to be rebound
Add note about rebinding kdel to backspace for those using OSX or PuTTY to connect to remote Linux machines in nanorc.sample.in

When undoing text deletes, move current_x to proper location



git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@4281 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2008-07-13 16:44:19 +00:00
Chris Allegretta 07fcc4c973 Add beginning undo feature, since I want to start fixing bugs from savannah and don't want to manager another checking, and the code basically works for some operations.
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@4271 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2008-07-10 20:13:04 +00:00
Chris Allegretta fb41a0780d Add function check_bad_binding to check ppl arent binding things they shouldn, though currently its only one entry long ('meta-[')
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@4265 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2008-06-25 03:06:11 +00:00
Chris Allegretta cc60c3a767 Add some rc file name debugging
Add debian nanorc example
Fix that previous entries as well as new one need Makefile.am entries



git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@4245 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2008-03-20 05:41:00 +00:00
Chris Allegretta 90ee8ee494 Add Mike F's latest patches for 2.1.0 and new syntax configs for tcl, php and gentoo.
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@4242 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2008-03-20 04:45:55 +00:00
Chris Allegretta 17436ce817 Fix bug 79, add sentinels for function keys in case the user
rebinds them to something else.  Fix debug mode crash when the user
typos a menu name.  Add menus for pageup and pagedown bindings and make
rebinding up and down actually do up and down and not page up and page down.


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@4221 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2008-03-11 03:03:53 +00:00
Chris Allegretta e347efb9ff More keybinding fixes
- Fix tiny mode compilation problems
- Fix F-keys not working (silly typo)
- Change file browser to use new backend
- global.c - new helper function sc_seq_or, makes logic simpler down in the functions than calling first_sc_for directly


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@4218 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2008-03-09 02:52:40 +00:00
Chris Allegretta 79a33bb38d New keybindings code and backend. New structs subnfunc for menu functions
and toggles and sc for shortcut keys, old 'shortcut' and 'toggles' structs are
gone.  The current implementation has a bunch of broken stuff (some of which is
documented in BUGS).  Updated nanorc.5 with some mostly complete documentation
on configuring.


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@4215 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2008-03-05 07:34:01 +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 7fc36c77d2 fix various file- and rcfile-opening bugs
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@4080 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2007-04-18 18:22:13 +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 e54f1c4eaa more comment fixes
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@3926 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2006-10-29 21:14:53 +00:00
David Lawrence Ramsey 6835102ce5 cosmetic fixes
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@3845 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2006-08-21 21:37:39 +00:00
David Lawrence Ramsey e53e12559f rename the DISABLE_ROOTWRAP #define to DISABLE_ROOTWRAPPING
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@3798 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2006-07-19 15:50:19 +00:00
David Lawrence Ramsey 3bb45ae00b per Daniel Richard G.'s patch, in parse_rcfile(), add missing
ENABLE_COLOR #ifdef around the second check for a syntax with no color
commands, to fix compilation without color support


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@3794 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2006-07-19 00:21:17 +00:00
David Lawrence Ramsey 935594b14a add various cosmetic and #ifdef fixes
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@3790 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2006-07-18 18:16:30 +00:00
David Lawrence Ramsey 4bb60db078 more minor wording fixes
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@3637 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2006-06-08 02:50:56 +00:00
David Lawrence Ramsey 69e1ce56df per Benno Schulenberg's patch with a few tweaks by me, add minor wording
fixes to various messages


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@3635 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2006-06-08 02:37:45 +00:00
David Lawrence Ramsey f94b993535 per Benno Schulenberg's patch, add single quotes around the invalid
string argument in the error message about unterminated strings, to
avoid confusion


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@3633 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2006-06-08 02:13:37 +00:00
David Lawrence Ramsey 8f07329d00 comment fix
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@3610 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2006-06-01 20:23:24 +00:00
David Lawrence Ramsey a004334024 fix breakage
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@3609 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2006-06-01 19:54:14 +00:00