Commit Graph

238 Commits (1e3f6bc00b1d3693aea5b3699ec3b3acb07f8d1d)

Author SHA1 Message Date
Benno Schulenberg 8f6151198a Whitespace adjustments, plus a few comment tweaks.
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@4769 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2014-04-14 09:57:06 +00:00
Benno Schulenberg 7828a8096e Removing the unused parameter 'func_key' from get_shortcut().
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@4768 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2014-04-14 09:22:29 +00:00
Benno Schulenberg c8fbc7d1a1 Removing the unused parameter 'file_bot' from copy_from_filestruct().
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@4767 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2014-04-14 09:14:39 +00:00
Benno Schulenberg d19be5aafa More editing of comment blocks and trimming of blank lines.
Patch by David Lawrence Ramsey, slightly tweaked.


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@4753 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2014-04-08 18:38:45 +00:00
Benno Schulenberg bc6e9aa926 Keeping a pointer to the Uncut item in the functions list, to be able
to change its description to Unjustify at the appropriate moment.


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@4739 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2014-04-07 09:02:22 +00:00
Benno Schulenberg 70b2d08610 Cosmetic tweaks.
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@4734 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2014-04-05 20:28:29 +00:00
Benno Schulenberg 189fff44dc Tweaking still more comments.
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@4731 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2014-04-04 20:45:28 +00:00
Benno Schulenberg b115aab586 Fixing compilation with --enable-wrapping.
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@4730 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2014-04-04 20:16:59 +00:00
Benno Schulenberg 36c87bcfd5 Fixing compilation with --enable-justify and tiny.
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@4726 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2014-04-04 15:52:52 +00:00
Benno Schulenberg 00389928d4 Converting #ifdef ENABLE_COLOR to #ifndef DISABLE_COLOR.
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@4719 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2014-04-04 11:59:03 +00:00
Benno Schulenberg b8b29ff138 Fixing two compilation warnings for tiny.
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@4714 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2014-04-03 21:06:30 +00:00
Benno Schulenberg a65ef4244c Removing stray spaces before tabs.
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@4652 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2014-03-17 21:36:37 +00:00
Benno Schulenberg e4c34c3386 Adding, fixing, and removing some #endif comments.
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@4649 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2014-03-17 14:15:57 +00:00
Chris Allegretta 3a5f55e439 2014-03-01 Chris Allegretta <chrisa@asty.org>
* global.c (shortcut_init) - Don't actually free the shortcut
          list, since the next pass via justifying will then remove
          all custom shortcuts.  Fixed bug discovered by Benno Schulenberg.
        * text.c (do_linter) - Remove some unused variables to quiet
          -pedanic -Wall.



git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@4637 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2014-03-04 03:55:43 +00:00
Benno Schulenberg 46fccb2610 Equalizing pipe error messages.
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@4623 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2014-02-28 11:49:12 +00:00
Chris Allegretta 5575bfad2c 2014-02-24 Chris Allegretta <chrisa@asty.org>
* new linter functionality.  rcfile option "linter"
        * src/global.c (shortcut_init) - Actually free the sclist
          if it was allocated before.



git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@4600 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2014-02-24 10:18:15 +00:00
Benno Schulenberg e9ee078c10 End exhorting status-bar messages with a period, to avoid
the impression that something is missing.


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@4596 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2014-02-23 10:12:50 +00:00
Chris Allegretta 67acf2c753 2013-01-20 Chris Allegretta <chrisa@asty.org>
* src/text.c (do_histify): Don't allow sigwinch to be received while justifying
          as that puts us into a wacky state.  Fixess crash on justify by Joshua Rogers.



git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@4565 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2013-01-20 07:51:34 +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 daeab0518d 2011-05-10 Chris Allegretta <chrisa@asty.org>
* text.c (do_enter): Only increment totsize by the auto-indented amount, size the previous line's size was
          already counted.  Fixes bug reported by Robert Spanjaard.



git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@4544 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2011-05-10 05:43:08 +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 181c4a999b 2010-04-09 Chris Allegretta <chrisa@asty.org>
* text.c (do_alt_speller): Skip invoking the alt speller if the file size
          is 0 bytes.  Fixes Savannah bug 29393 reported by Mike Frysinger.



git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@4499 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2010-04-14 03:14:40 +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 c9f0799791 2009-12-02 Chris Allegretta <chrisa@asty.org>
* text.c (add_undo, do_undo, do_redo) - Do not execute cases for SPLIT when DISABLE_WRAPPING
          is defined.  Fixes Savannah bug 28151 (anon).



git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@4455 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2009-12-03 03:12:00 +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 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 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 42726f74cc 2009-07-27 Chris Allegretta <chrisa@asty.org>
* text.c (undo_cut, redo_cut): Don't actually try and undo/redo an empty cut, i.e. the magicline. 
	  Fixes crash on cutting last line discovered by Eitan Adler <eitanadlerlist@gmail.com>.



git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@4397 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2009-07-27 04:16:44 +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 8b9fb360c2 Comimt point for roll-back of latest undo/redo of split changes.
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@4393 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2009-04-29 04:43: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 b843a51b79 Add undo for line break via enter, separate from line wrap
Change message for line split to line wrap, since split ~= break



git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@4391 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2009-04-21 05:34:08 +00:00
Chris Allegretta df543e78df - Remove a debug line I left in
- Fix undo line split uglyness.  Still not perfect but switching work envs.



git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@4390 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2009-04-12 06:13:16 +00:00
Chris Allegretta 12ba55732f First pass at fixing the line splitting undo since it's currently broken beyond belief.
I believe more is broken but committing will motivate me to get closer to a real fix :)



git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@4389 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2009-03-26 01:01:48 +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 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 c81cf52cf2 Eliminate linescut variable from undo structure as its an unneeded pain in the ass.
Also initialize to_end, because for some reason it seems to be not getting set even when
type == CUT in add_undo (?!)



git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@4340 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2008-10-14 04:34:56 +00:00
Chris Allegretta c84e765b8e 2008-10-13 Chris Allegretta <chrisa@asty.org>
* Remove CUTTOEND as an undo type as it's unneeded, fix u->to_end logic in undo struct.
        * undo.c (update_undo): Don't free cutbuffer if NULL, fix for Savannah bug #24499



git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@4339 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2008-10-14 01:14:12 +00:00
Chris Allegretta 5c1c143ed2 2008-10-04 Chris Allegretta <chrisa@asty.org>
* cut.c (Add_undo): Save last cut undo information so it can be used for next uncut, fixes
          Savannah bug 24183.



git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@4338 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2008-10-04 11:10:11 +00:00
Chris Allegretta b549f3761a 2008-09-16 Chris Allegretta <chrisa@asty.org>
* text.c: Add support for undoing a text uncut.  Split out the undo and redo of a text cut
          in order to avoid code duplication.



git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@4327 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2008-09-16 21:35:19 +00:00
Chris Allegretta dc7136a082 * text.c (do_enter): Fix issue when compiled with --enable-debug, fixes Savannah bug 24092.
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@4309 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2008-08-21 04:24:25 +00:00
Chris Allegretta 77bf1b5197 2008-08-21 Chris Allegretta <chrisa@asty.org>
* text.c: Change error messages where we may possibly get into a bad state and urge
          the user to save when this happens.  Originally by Benno Schulenberg <bensberg@justemail.net>



git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@4308 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2008-08-21 04:21:06 +00:00