Commit Graph

717 Commits (acda255b475a95dc82f8fb24a4b136ca5458d0f5)

Author SHA1 Message Date
Benno Schulenberg 724950701a Updating 'mark_begin' when mark and cursor are on the same line.
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@4591 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2014-02-22 16:46:27 +00:00
Benno Schulenberg d6e39724d8 Adding four needed compilation conditions on ENABLE_NANORC.
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@4590 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2014-02-22 16:26:30 +00:00
Benno Schulenberg fb4e402411 Applying a compile-fixing and warning-fixing patch by David Ramsey.
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@4588 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2014-02-22 10:56:52 +00:00
Chris Allegretta c218415212 2014-01-24 Benno Schulenberg <bens>
* src/nano.c (copy_from_filestruct) - Check explicitly for mark being set when
          trying to partition, as we shouldn't be messing with the x address, etc.



git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@4585 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2014-01-26 22:47:08 +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 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 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 35b5976e69 2010-03-21 Chris Allegretta <chrisa@asty.org>
* nano.c (page_stdin et al): Don't attempt to reset/reopen the terminal
          settings when reading stdin if it was aborted with SIGINT.  May fix Savannah
          bug 29114 reported by  Mike Frysinger.



git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@4489 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2010-03-21 05:31:43 +00:00
Chris Allegretta 42bd871af3 2010-03-07 Chris Allegretta <chrisa@asty.org>
* configure.ac, nano.c (handle_sigwinch): Create check for whether LINES and
          COLS can safely be redefined.  Fixes compilation issues with cygwin, and likely
          with newer versions of ncurses, fixes Savannah bug 28984 repoted by Andy Koppe
          and Eric Oliver via mailing list.
        * winio.c (get_mouseinput) - fix stray semicolon in code, also reported in
          bug 28984.



git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@4484 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2010-03-07 19:35:46 +00:00
Chris Allegretta 2466d933c9 Compile fix with current_stat. Not sure how I missed that.
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@4477 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2010-01-18 03:43:24 +00:00
Chris Allegretta b916f5cd8b 2010-01-17 Chris Allegretta <chrisa@asty.org>
* nano.c (main), prompt.c (do_statusbar_input): Handle problems with an unmapped 
          function due to key rebinding, fixes crashes on FreeBSD repoted by Eitan 
          Adler <eitanadlerlist@gmail.com>.



git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@4475 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2010-01-17 05:30:22 +00:00
Chris Allegretta 6cf05d487f 2010-01-14 Chris Allegretta <chrisa@asty.org>
* files.c (do_writeout): Fix for crash / incorrect external modification warning
          due to earlier fix in r4467.



git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@4474 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2010-01-14 06:32:37 +00:00
Chris Allegretta a8bc492b8a 2009-12-12 Chris Allegretta <chrisa@asty.org>
* text.c (do_delete), nano.c (do_output): Add check for length of current line
          before and after adding/deleting text, and do full refresh if it is now
          a different multiple of COLS.  Also get rid of superfluous do_refresh
          vars now that we have edit_refresh_needed.



git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@4462 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2009-12-12 22:21:20 +00:00
Chris Allegretta 2c7b506fbc 2009-12-09 Chris Allegretta <chrisa@asty.org>
* files.c (read_file) - Add parameter for whether we should even try to check
          file writability, as the message is useless when we're inserting into an
          existing buffer.  Fixes Savannah bug 28219.



git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@4460 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2009-12-09 16:51:43 +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 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 daaf468c93 2009-11-27 Chris Allegretta <chrisa@asty.org>
* nano.c (do_suspend): Don't clear the screen but do move the cursor down to the last line
          first in an effort to not corrupt the screen, which contradicts Pico but is consistent
          with almost all other text editors.  Fixes Savannah bug 28110/Debian bug 460510
          reported by Tim Connors <reportbug@rather.puzzling.org>.



git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@4446 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2009-11-28 03:01:30 +00:00
Chris Allegretta 8b6f6fcc1b 2009-11-22 Chris Allegretta <chrisa@asty.org>
* nano.c (main): Allow edit_refresh_needed to take effect when using --enable-tiny
          (fixes Savannah bug 28076 reported by David Lawrence Ramsey).

2009-11-22 David Lawrence Ramsey <pooka109@gmail.com>
        * nano.c (move_to_filestruct): Fix bug 71 (cut at top of line recenters)
        * Fix compilation with --enable-tiny



git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@4439 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2009-11-22 21:35:56 +00:00
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 16e07d5878 2009-11-18 Adrian Bunk <bunk via Savannah>
* nano.c (main) - Allow --fill and --nowrap to override nanorc entries and each other
          on the command line.



git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@4429 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2009-11-18 12:39:47 +00:00
Chris Allegretta f55ada727e * nano.c (do_mouse): Fix mouse support not working with soft wrapping. Fixes
Savannah bug 27549 reported by Hannes Schueller.



git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@4422 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2009-11-13 20:38:32 +00:00
Chris Allegretta 6f08332741 2009-11-11 Chris Allegretta <chrisa@asty.org>
* winio.c: Large tweaking of cursor and text display based on COLS not COLS - 1,
          due to finally understanding that display_string wasn't being called properly
          when softwrap was enabled.  Fixes Savnnah bug 27603, Return key doesn't scroll
          viewport reported by Hannes Schueller.
        * - Fix size_t formatting issues with -pedantic by converting vals to long unsigned
          for printing.



git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@4420 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2009-11-11 06:00:33 +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 97ba02d4f1 Fixes for nano-regress and regress fix on nano.c for compilation with slang
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@4381 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2009-02-17 03:05:17 +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 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 e027fc2edd 2009-02-14 Chris Allegretta <chrisa@asty.org>
* nano.c (precalc_multicolorinfo) - Add debugging so we have a better clue if further
          issues arise.   Also start at the beginning of later lines when trying to match the
          end of a multi-line regex.  Fixes more overly aggressive highlighting found by 
          Mike Frysinger.  Finally, advance to the match end for performance.



git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@4376 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2009-02-15 02:40:16 +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 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 58a802fa63 Fix for precalc_multicolorinfo: make sure we malloc for all the lines we're precalculating, duh.
New utility func alloc_multidata_if_needed().



git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@4363 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2009-02-04 19:50:23 +00:00
Chris Allegretta 364763f4d1 2009-02-02 Chris Allegretta <chrisa@asty.org>
* New color precalculation code for mult-line regexes.  New function precalc_multicolorinfo(),
          new structure multidata for keeping track of where regexes start/stop.  More 
          performance improvements forthcoming.



git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@4362 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2009-02-03 05:05:58 +00:00
Chris Allegretta ecc245ccca Fix comiplation issues with --enable-tiny --enable-nanorc (?!)
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@4361 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2009-02-01 00:04:42 +00:00
Chris Allegretta 61f5c55f7b 2009-01-29 Chris Allegretta <chrisa@asty.org>
* nano.c (move_to_filestruct) - properky initialize new fileage for multiswatching, sigh.
	  Fix cut sefaults discovered by Mike Frysinger.
		 


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@4360 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2009-01-31 23:36:00 +00:00
Chris Allegretta b0f0b7f471 Pull stdin reading out into a function, add ^c interrupt message on stderr.
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@4357 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2009-01-30 17:37:44 +00:00
Chris Allegretta 25d459aa64 2009-01-29 Chris Allegretta <chrisa@asty.org>
* nano.c (main): Add support for nano acting like a pager when invoked with - as first   
          file argument.  Not yet perfect (garbles screen state on exit) but it's something. 



git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@4356 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2009-01-30 08:34:27 +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 019998a877 Fix reset_multis undefined call when not using color.
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@4352 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2009-01-26 07:55:01 +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 e137f12e5e * nano.c: Do call disable_signals at startup regardless, since under cygwin we can't generate
^C without it.



git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@4326 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2008-09-06 06:52:47 +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 015c74093a Allow current undo code to compile with NANO_TINY
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@4289 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2008-08-02 14:39:42 +00:00
Chris Allegretta b8576780bf 2008-07-11 Fabian Groffen <grobian@gentoo.org>
* nano.c: Don't include langinfo.h if not using ENABLE_UTF8
          (Savannah patch 6565)



git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@4277 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2008-07-12 02:32: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 e67bf806bd Fix for segfault when window size is too small by Andreas Amann <andreas.amann@tyndall.ie>
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@4256 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2008-05-31 22:23:16 +00:00
Chris Allegretta b04248c548 Benno's latest fixes for help menu translations.
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@4247 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2008-03-20 05:56:46 +00:00
Chris Allegretta d3a1ff6a33 Fix multibuffer mode not showing "Close" string anymore
on buffer open/closer.


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@4225 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2008-03-13 17:48:16 +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 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 3fb62b8ac1 in print_opt_full(), use strlenpt() instead of strlen(), so that tabs
are placed properly when displaying translated strings in UTF-8, as
found by Jean-Philippe Guérard


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@4208 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2007-12-18 22:00:17 +00:00
David Lawrence Ramsey bc6682638b comment fix
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@4207 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2007-12-18 16:51:48 +00:00
David Lawrence Ramsey 27be74c17e fix breakage
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@4206 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2007-12-18 16:47:06 +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 c7fa5e1f9e remove slang curses emulation support, as it's hopelessly broken, and it
doesn't make the binary very much smaller, especially when --enable-tiny
is used


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@4203 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2007-12-18 02:39:25 +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 e68748a6ee in main(), exit if initscr() fails
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@4198 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2007-12-10 17:59:26 +00:00
David Lawrence Ramsey 9bd537fc6c in disable_mouse_support() and enable_mouse_support(), when toggling
mouse support on or off, save and restore the mouse click interval


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@4186 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2007-12-04 20:49:09 +00:00
David Lawrence Ramsey 98958e83c9 per OBATA Akio's patch with a few tweaks by me, add wnoutrefresh() calls
after reset_(statusbar_)?cursor() calls, to ensure that the cursor is
placed properly when using NetBSD curses


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@4185 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2007-12-04 16:38:47 +00:00
David Lawrence Ramsey f3318a9c05 remove unneeded whitespace
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@4183 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2007-12-03 18:40:33 +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 64b8f423b2 properly handle more cases of inserting a file/uncutting text with the
mark on


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@4158 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2007-08-16 14:45:17 +00:00
David Lawrence Ramsey 1b2e77e4ff fix breakage
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@4157 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2007-08-16 04:05:05 +00:00
David Lawrence Ramsey ee89418102 more fixes for uncutting text/inserting files with the mark on
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@4156 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2007-08-16 03:23:30 +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 d5a9800fb6 still more cosmetic fixes
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@4143 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2007-08-08 00:05:49 +00:00
David Lawrence Ramsey f03171917f simplify
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@4142 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2007-08-07 23:51:05 +00:00
David Lawrence Ramsey d1ab89a929 in copy_from_file(), fix potential segfault after uncutting one line of
text with the mark on by properly preserving the beginning of the mark;
also, make sure the mark is always properly positioned after uncutting
one line of text with the mark on


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@4141 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2007-08-07 20:21:39 +00:00
David Lawrence Ramsey 884ca5373b cosmetic fixes
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@4140 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2007-08-07 19:55:06 +00:00
David Lawrence Ramsey 129dfb6323 in version(), display copyright notices
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@4138 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2007-08-01 12:49:57 +00:00
David Lawrence Ramsey 1904f51fb5 more cosmetic fixes
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@4120 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2007-07-01 21:33:17 +00:00
David Lawrence Ramsey ebc38fd106 further simplify processing of mouse events by consolidating if clauses
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@4113 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2007-06-28 16:00:50 +00:00
David Lawrence Ramsey a78b4354bb replace the current hackish check for a UTF-8 locale with a proper call
to nl_langinfo()


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@4110 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2007-05-25 14:39:40 +00:00
David Lawrence Ramsey bc65313104 more various mouse support-related simplifications
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@4109 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2007-05-22 17:20:28 +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 817cb9e01f per Benno Schulenberg's patch, in usage(), reword the description of the
-S/--smooth command line option in order to differentiate it from the
associated toggle description


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@4063 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2007-02-01 15:25:29 +00:00
David Lawrence Ramsey 0e1df431a8 cosmetic fixes
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@4036 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2007-01-12 02:58:12 +00:00
David Lawrence Ramsey e44cd2dfba yet more miscellaneous comment fixes
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@4032 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2007-01-11 22:54:55 +00:00
David Lawrence Ramsey 9e7b2d572c more miscellaneous minor fixes
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@4031 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2007-01-11 22:46:22 +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 cb04b56c92 more miscellaneous comment fixes
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@4022 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2007-01-09 22:56:56 +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 0c0cafbc19 comment fix
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@3915 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2006-10-26 15:55:39 +00:00
David Lawrence Ramsey a1b6997066 comment fix
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@3868 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2006-08-29 21:18:24 +00:00
David Lawrence Ramsey 9054e3a2ae fix breakage
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@3867 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2006-08-29 21:14:12 +00:00
David Lawrence Ramsey 1b3e4e117a fix misplaced do_prompt_abort()
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@3866 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2006-08-29 21:11:27 +00:00
David Lawrence Ramsey 3879528945 make sure that the statusbar cursor position is always properly reset
when we get out of all statusbar prompts


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@3865 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2006-08-29 20:54:38 +00:00