Commit Graph

408 Commits (123110c5dc3e0d8c60a4ff0121056e301f503706)

Author SHA1 Message Date
Chris Allegretta 123110c5dc 2009-11-19 Chris Allegretta <chrisa@asty.org>
* nano.c (die_save_file) Try nd match the permissions of the file we were
          editing but only make a minimal effort to do so. Fixes Savannah bug 27273     
          reported by Mike Frysinger.



git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@4432 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2009-11-20 05:09:12 +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 f8f9027295 2009-09-02 Chris Allegretta <chrisa@asty.org>
* Attempt to check file writability and emit a warning on the status bar
          if nano doesn't think the file can be written to.  Feature originally
          requested by Damien Jolders <madamien@skullsquad.com> et al.



git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@4407 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2009-09-03 05:45:13 +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 ad37e67dd2 2009-07-11 Chris Allegretta <chrisa@asty.org>
* nano-regress: Small tweaks
	* Change undo code to off unless unabled via a command line option (-u/--undo).  Until this code
	  stabilizes this is the only responsible way to treat it.



git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@4395 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2009-07-12 03:36:58 +00:00
Chris Allegretta a4c2b99e40 More wrapping redo fixes. Just make do-wrap() undo aware.
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@4394 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2009-04-29 22:34:27 +00:00
Chris Allegretta e061a0d604 Add undoing check for do_enter so redo doesn't blow up.
Hate to piecemeal these fixed but system unstability is teh suck.



git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@4392 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2009-04-25 03:31:30 +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 9555e1d118 2009-02-16 Chris Allegretta <chrisa@asty.org>
* Add new argument to reset_multis for force redraws without attempting to
          guess whether we need to, force updates when running a non-viewok function.
          New utility function color.c:reset_multis_for_id().  Fixes e.g. incorrect
          highlighting when cutting text.



git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@4378 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2009-02-16 21:04:00 +00:00
Chris Allegretta 56a295bc90 Renumber multidataflags to not start at 0 in case it confuses alloc_multidata_if_needed().
Add alloc_multidata_if_needed() call in edit_draw as the last defense against a crash.



git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@4367 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2009-02-07 14:48:30 +00:00
Chris Allegretta fd265af15a 2009-02-05 Chris Allegretta <chrisa@asty.org>
* More color syntax speedups:  Determine in reset_multis() whether we really need to call
          edit_refresh().  Additional global var edit_refresh_needed() to hopefully reduce  
          repeated calls to the function.  New helper funcs reset_multis_before() and 
          reset_multis_after().



git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@4364 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2009-02-06 03:41:02 +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 0dc26dcd09 2009-01-24 Chris Allegretta <chrisa@asty.org>
* Add interruptability to search functions.  New functions enable_nodelay and
          disable_nodelay and changes to the routines to handle checking for pending
          searches.  Fixes Savnnah bug 24946: Need interrrupt for search.



git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@4350 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2009-01-24 22:40:41 +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 1d77823f79 * global.c, help.c, browser.c, files.c, proto.h: Fix several compipation and programmatic
issues with --disable-help, especially that do-writeout was treating ^G the same as ^M.



git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@4317 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2008-08-30 21:00:00 +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 14c8620e0b - Change add_undo and current_undo to only take action arg, as openfilestruct arg is always openfile
- Add ability to undo a file/cmd insert, needed to add undoable flag to read_file and open_buffer as a result



git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@4291 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2008-08-03 04:48:05 +00:00
Chris Allegretta 91a1862eed Add undoing argument to do_cut_text as we don't want to be messing around with the undo contents when we're in the
middle of an undo.



git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@4285 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2008-08-01 03:50:20 +00:00
Chris Allegretta 12dc8cae80 Commit back some undo/redo rewrites
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@4283 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2008-07-31 04:24:04 +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 1b6ed07543 Add a fix for bug #23144 that actually works (several bugs in one here)
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@4264 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2008-06-03 08:09:05 +00:00
Chris Allegretta 8b6461fc80 files.c,proto.h,text.c: Fix for conflicts with AIX curses variables, from William Jojo <jojowil@hvcc.edu>
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@4260 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2008-05-31 23:09:40 +00:00
Chris Allegretta 10f868d33c - Update man page a little bit more
- Change do_prompt and get_prompt_line to pass meta_key and func_key
  so the calling program can DTRT when it calsl get_shortcut.  In
  particular this allows the "new file buffer" toggle on the insert file
  menu to work, and presumably other rebinding stuff should now work also.


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@4226 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2008-03-14 04:08:51 +00:00
Chris Allegretta 0018d8ed6f - Fix tiny mode again after breaking it again
- Resurrect IFSCHELP to get rid of some needless help message stubs
- Add support for rebinding the suspend key
- Fix wrong refresh help message


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@4224 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2008-03-13 08:23:52 +00:00
Chris Allegretta eb64314f8b Convert more code to use new backend. Add some more sentinel strings
for enter and backspace keys in case their control key alternates get
rebound.


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@4223 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2008-03-12 04:44:14 +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 f78bc85db1 revert last changes, but disable all the same features that
--enable-tiny does when --with-slang is used


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@4204 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2007-12-18 15:55:48 +00:00
David Lawrence Ramsey 7f6f5a64fb simplify terminal handling by using raw mode instead of cbreak mode
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@4202 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2007-12-18 02:03:00 +00:00
David Lawrence Ramsey 6e6c80b181 in username_tab_completion() and cwd_tab_completion(), rename variable
buflen to buf_len, for consistency


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@4175 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2007-10-11 15:38:32 +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 ae46b91b7e in nstrcasestr(), mbstrcasestr(), revstrstr(), revstrcasestr(), and
mbrevstrcasestr(), return char* instead of const char*


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@4126 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2007-07-06 13:44:13 +00:00
David Lawrence Ramsey 3a5eaeb401 various mouse support-related simplifications, improvements, and fixes
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@4107 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2007-05-20 23:41:56 +00:00
David Lawrence Ramsey 4154d08362 miscellaneous minor fixes
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@4028 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2007-01-11 21:36:29 +00:00
David Lawrence Ramsey 0ec34ac28a make regexp_init() return a bool instead of an int
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@4023 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2007-01-09 23:35:02 +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 4fd1ca07a7 more comment fixes
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@3976 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2006-11-27 05:09:16 +00:00
David Lawrence Ramsey 81371020bb revert erroneous changes
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@3973 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2006-11-27 04:56:16 +00:00
David Lawrence Ramsey 50d78a6f9a don't allow filenames entered at the "Write File" prompt or the "Insert
File" prompt to contain nulls


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@3971 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2006-11-27 02:41:59 +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 fa38795ef5 miscellaneous minor fixes
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@3854 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2006-08-26 16:50:51 +00:00
David Lawrence Ramsey bd28ee472b when DISABLE_HELP is defined, leave out some unused shortcut and toggle
list parameters


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@3815 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2006-07-25 21:13:30 +00:00
David Lawrence Ramsey 1b4ae6997e in parse_escape_seq_kbinput(), Don't ignore escape sequences anymore;
instead, return the corresponding key so that parse_kbinput() can
translate it


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@3814 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2006-07-25 19:23:35 +00:00
David Lawrence Ramsey 5370b0cd19 in parse_escape_seq_kbinput(), handle unknown and unignored escape
sequences once instead of handling them twice in parse_kbinput()


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@3807 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2006-07-23 17:54:35 +00:00
David Lawrence Ramsey b08c9f004c revert erroneous change
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@3776 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2006-07-11 18:12:24 +00:00
David Lawrence Ramsey 87b37bde9b add miscellaneous minor cleanups to do_browser(), do_browse_from(), and
browser_init()


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@3775 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2006-07-11 17:25:12 +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