Commit Graph

285 Commits (2d34586c43a99dc2a683fb68db4e292ed58f6e15)

Author SHA1 Message Date
Chris Allegretta 3116d2f7de Fix impromper calls to nmalloc in new locking implementation.
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@4556 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2013-01-03 04:36:39 +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 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 3bd12e3714 2011-02-26 Chris Allegretta <chrisa@asty.org>
* Change RAW in function_type enum to RAWINPUT, to fix compilation on AIX,
          reported by Richard G  Daniel <skunk@iskunk.org>.



git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@4535 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2011-02-26 14:22:37 +00:00
Chris Allegretta 9bfda9196b Checkpoint commit of saved file position implementation in case my desktop bites it.
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@4529 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2011-02-16 06:52:30 +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 ab53864de7 2010-11-12 Chris Allegretta <chrisa@asty.org>
* Add check for RESTRICTED mode back to speller, suspend and insert file
          routines, since adding key bindings broke the fact that they should be
          disabled in restricted mode.  Fixes Savannah bug 31625 reported by
          Charlie Somerville.



git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@4519 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2010-11-12 06:22:12 +00:00
Chris Allegretta 8d41fb8c3e 2009-12-22 Chris Allegretta <chrisa@asty.org>
* files.c (write_file): Fix compatibility with previous stat fix and tiny mode.

2009-12-22 David Lawrence Ramsey <pooka109@gmail.com>
        * global.c: Add new strings for forward/back in the file browser.  New variables
          nano_forwardfile_msg and nano_backfile_msg.



git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@4469 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2009-12-23 05:03:09 +00:00
Chris Allegretta f387f33083 2009-12-07 David Lawrence Ramsey <pooka109@gmail.com>
* global.c (shortcut_init), browser.c (do_browser): Fix M-W not being bound to 
          research in either main menu or browser.



git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@4461 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2009-12-09 17:09:37 +00:00
Chris Allegretta 5b25e07744 2009-12-07 David Lawrence Ramsey <pooka109@gmail.com>
* global.c (shortcut_init): Many fixes for keybindings code oversights, including
          restore page up/down and GotoDir to browser,
        * browser.c (do_browser): Fix breaking out of a submenu (e.g. gotodir) breaks out
          of browser altogether.
        * doc/nanorc.sample.in: Add missing entries for fortran/ObjC/OCaml entries.



git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@4459 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2009-12-07 12:34:23 +00:00
Chris Allegretta b27b3a18a9 2009-12-03 David Lawrence Ramsey <pooka109@gmail.com>
* global.c (shortcut_init) - Remove help shortcut from help shortcut list :-)  Tweaked
          to reorder exit shortcut to end of list to not mess up prev/next shortcut symmetry.



git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@4458 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2009-12-04 04:29:55 +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 a97cb819f2 2009-12-01 Kamil Dudka <kdudka@redhat.com>
* chars.c, file.c - Better handle unused results for things like mbtowc(), new
          macro IGNORE_CALL_RESULT.

2009-12-01 Chris Allegretta <chrisa@asty.org>
        * global.c (shortcut_init) - Remove redundant entries for ^Y/^V reported by
          Christian Weisgerber.
        * doc/man/nanorc.5 - Fix typo in Meta documentation, reported by gibboris@gmail.com.

2009-11-29 David Lawrence Ramsey <pooka109@gmail.com>
        * global.c (shortcut_init) - Add support for ^P and ^N in the help menu.



git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@4452 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2009-12-02 03:24:18 +00:00
Chris Allegretta b43f6912f3 2009-11-29 David Lawrence Ramsey <pooka109@gmail.com>
* global.c: Fix replace and insert file initializations for proper compilation options.
        * nano.c (do_suspend): Update comments to reflect actual code path, bad Chris and thanks for 
          noticing Jordi.   
        * configure.ac: Fix typos



git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@4449 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2009-11-29 06:24:10 +00:00
Chris Allegretta 5a018f0d3a 2009-11-29 Chris Allegretta <chrisa@asty.org>
* prompt.c (get_prompt_string) - Universally handle help key when is disabled.  Fixes Savannah
          bug 28117 by David Lawrence Ramsey <pooka109@gmail.com>.
        * chars.c, files.c: Add junk vars to silence the compiler.  Sigh.

2009-11-29 David Lawrence Ramsey <pooka109@gmail.com>
        * Change several *chars to const char, additional cleanups and casts to make compilers happier.



git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@4448 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2009-11-29 06:13:22 +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 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 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 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 b71cf301da Okay that will not work. Revert forcing reset_multis on !viewok as it's too expensive
for things like deleting text.  Will have to go back and force inside functions.
Add check in reset_multis for CNONE type since that's slowing us down and is dumb
to leave out.



git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@4379 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2009-02-16 23:06:09 +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 30f278f4a8 - Fix compliation breakage with --disable-justify, reported by Mike Frysinger
- Add --disable-justify to nano-regress so I stop missing that



git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@4359 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2009-01-31 16:13:03 +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 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 973addcde8 * global.c (shortcut_init), search.c (search_init): Fix add_to_sclist for ^W^T so
invalid messages will display properly.  Fixes Savannah bug 24507.



git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@4343 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2008-10-15 01:25:25 +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 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 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 70859f4a5b Add ability to rebind the (still unfinished) undo and redo functions in case anyone is interested in testing it out early.
Add to nanorc.5 also.



git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@4280 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2008-07-13 01:36:06 +00:00
Chris Allegretta 274142cb10 Clean up some unused variables from old undo implementation.
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@4278 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2008-07-12 02:48:20 +00:00
Chris Allegretta a855fa2acc 2008-07-11 Michael Haubenwallner <michael.haubenwallner@salomon.at>
* global.c: include proto.h earlier in file to fix AIX compilation
          (Savannah patch 6559)



git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@4274 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2008-07-12 02:13:22 +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 1347f22c95 Fix for 23733: search history broken with nano-2.1.1+
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@4270 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2008-06-29 06:22:31 +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 3daeeebf91 Fix for Savannah bug #23442: left/right arrow keys do not work with --enable-tiny
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@4262 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2008-06-03 05:55:04 +00:00
Chris Allegretta 506af6fbfb global.c: Fix for compile error when --disable-speller is used (Savannah bug 23227 by Mike Frysinger)
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@4259 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2008-05-31 22:49:55 +00:00
Chris Allegretta 2cca48380d Fix for bug #22780: build failure with --enable-multibuffer --enable-tiny
Plus make the actual prompt work with --enable-tiny when inserting files.



git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@4248 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2008-03-31 06:25:14 +00:00
Chris Allegretta 2ea0b8fa03 Fix default bracket match shortcut
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@4244 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2008-03-20 04:57:46 +00:00
Chris Allegretta dcd19c955f Fix for my fix for Mike's fix...dont add menu item refencing nano_exitbrowser_msg
when using DISABLE_BROWSER



git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@4243 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2008-03-20 04:51:26 +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 cc593839aa Fix for 106305: unable to ctrl+c out of save when exiting
Add new YESNO menu for calls to do_yesno_prompt, to enable cancel.



git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@4237 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2008-03-19 02:32:48 +00:00
Chris Allegretta 1fb25fd2aa Add Benno's latest translation fixes for shorcut display,
first line message help, and comments to assist translators.



git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@4236 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2008-03-18 03:06:27 +00:00
Chris Allegretta aa17df0bfd Fix for bug #22632: verbatim input in prompts broken with nano-2.0.99pre1
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@4234 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2008-03-17 05:50:04 +00:00
Chris Allegretta d3659f8284 Fixes from Benno Schulenberg.
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@4233 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2008-03-16 23:57:14 +00:00
Chris Allegretta c656e9d737 Fix for bug #22615: nano-2.0.99pre1 fails to build when configured with --disable-justify
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@4230 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2008-03-16 12:55:41 +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