Commit Graph

642 Commits (6f083327414630fff57f0f8ad88e7d65bdc6c676)

Author SHA1 Message Date
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