Commit Graph

662 Commits (7828a8096e119e4e63aee20c42d97972a500dda6)

Author SHA1 Message Date
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 eea0908236 Converting #ifdef ENABLE_NANORC to #ifndef DISABLE_NANORC.
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@4765 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2014-04-13 20:50:20 +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 d0dec31778 Reformat some comment blocks, fix a few typos, and remove a few unneeded
blank lines.  Patch by David Lawrence Ramsey was lightly tweaked.


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@4750 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2014-04-08 12:35:18 +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 d17438bd1d Converting #ifdef NANO_EXTRA to #ifndef DISABLE_EXTRA.
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@4713 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2014-04-03 20:57:44 +00:00
Benno Schulenberg 18c252d5e7 Printing menu numbers for debugging in hex.
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@4675 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2014-03-24 20:35:17 +00:00
Benno Schulenberg 55a0d76c66 Fixing a few compiler warnings.
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@4672 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2014-03-24 13:35:50 +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 a8353bdfff Removing the old softwrap scrolling code.
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@4648 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2014-03-17 13:15:50 +00:00
Benno Schulenberg b1a7fddc33 Correctly computing the needed amount to scroll down
when softwrap is on and there are overlong lines.


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@4632 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2014-03-03 10:02:13 +00:00
Benno Schulenberg df7bba340f Scrolling an extra amount when softwrap is on and the current line runs off.
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@4611 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2014-02-26 11:38:30 +00:00
Chris Allegretta 34b7f1c4f7 * src/winio.c (do_credits) - Add Benno, my children,
update copyright info



git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@4601 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2014-02-24 15:15:51 +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 c4520d57aa Correcting an oversight in the 'do_up_void' and 'do_down_void' naming.
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@4594 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2014-02-22 19:36:35 +00:00
Chris Allegretta d2f29d0243 2014-01-25 Chris Allegretta <chrisa@asty.org>
* src/winio.c (set_modified) - Check for a filename before we bother trying to lock



git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@4584 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2014-01-26 04:09:04 +00:00
Chris Allegretta 22c83ec7af 2013-03-17 Chris Allegretta <chrisa@asty.org>
* Revert r4547 as we should have a new release and the overlap code is not yet
          ready for public consumption.



git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@4569 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2013-03-17 22:09:38 +00:00
Chris Allegretta 4cc2462ed4 Clean-up warnings with -pedantic.
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@4555 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2013-01-03 04:23:10 +00:00
Chris Allegretta d70c7f3c14 Implement the modification bit of the .swp file, put it in the correct actual
location (pos 1007).



git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@4551 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2013-01-03 03:36:20 +00:00
Chris Allegretta 21f73f902f Fix trying to lock an un-writable directory. Just put a message
on the statusbar that we couldn't do it if the user modifies the file.
Changes to do_lockfile and write_lockfile to check for EACCESS and change
the return value of the functions (0 instead of -1)



git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@4550 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2013-01-03 03:07:27 +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 d84849ec12 2012-02-05 Chris Allegretta <chrisa@asty.org>
* src/*: Fix overlapping strings highlighting each other.  new variables in edit_draw
          (slmatcharray, pbegin, paintok), new logic (with repeated setting od values in the
          array but its BFI after all).  FIXME: Need to create a new 'overlap'
        * src/*: Fix a silly issue with the argument to nregcomp, as it's confusing to the caller
        * src/nano.h: Change the color types to a compiler macro (COLORWIDTH), may not actually
          even be worth doing, but someday who knows how wide a color curses implementation might
          be, and maybe we'll even start checking for it in autoconf!



git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@4547 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2012-02-06 01:10:45 +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 3d411188f6 2011-02-06 Chris Allegretta <chrisa@asty.org>
* files.c (write_file) - Fix problems with writing the backup file (albeit interactively)
	  with new function prompt_failed_backupwrite(), allows more secure handling of problems
	  with failing to write the backup file compared to 'allow_insecure_backup'.
	* winio.c (edit_redraw): Removed unused variable



git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@4526 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2011-02-07 02:06:20 +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 1a7a91b779 2010-01-12 Chris Allegretta <chrisa@asty.org>
* move.c (do_page_up, do_page_down): Fix issues with not enough scrolling down/up
          and cursor centering.
        * winio.c (edit_scroll): Remove lots of needless checking of line length for
          soft wrapping code.
        * winio.c (edit_update) - Remove extra code for when updating with old_current outside
          of the new buffer boundary and centering issues.



git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@4473 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2010-01-13 03:21:19 +00:00
Chris Allegretta 374216fe22 2010-01-04 Chris Allegretta <chrisa@asty.org>
* winio.c: edit_update, edit_redraw - Fix search not scrolling to the middle of the screen 
          (reported by alpha@qzx.com) and places where we rely on maxrows but should not.



git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@4471 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2010-01-04 19:00: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 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 3b830ee194 2009-11-26 Chris Allegretta <chrisa@asty.org>
* winio.c (edit_scroll): Adjust for long lines when scrolling.                    



git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@4444 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2009-11-27 03:04:59 +00:00
Chris Allegretta e2df2c899d 2009-11-24 Chris Allegretta <chrisa@asty.org>
* move.c (do_page_up, do_page_down): Make these functions work better with soft
          line wrapping. 
        * winio.c (compute_maxrows): Make maxrows calculation more accurate when all lines are > COLS.



git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@4441 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2009-11-24 17:15:53 +00:00
Chris Allegretta c82f038855 Part 2 of David's fixes for David's bug 71 fix
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@4440 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2009-11-22 23:23:31 +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 fc48347fb8 2009-11-15 Chris Allegretta <chrisa@asty.org>
* winio.c (edit_refresh): Always computer maxsize regardless of whether smooth scrolling
          is enabled.  Fixes Savannah bug 28024 by Mike Frysinger.



git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@4427 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2009-11-16 00:15:45 +00:00
Chris Allegretta 99c8d40db1 2009-11-13 Chris Allegretta <chrisa@asty.org>
* winio.c: Add new static maxsize to be able to easier calculation with
          softwrap.



git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@4421 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2009-11-13 13:48:56 +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 d233e7e240 back to svn, and:
* winio.c: Clean up some unused variables from the soft wrapping code.



git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@4413 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2009-09-15 04:51:09 +00:00
Chris Allegretta 35afab5eba 2009-09-12 Chris Allegretta <chrisa@asty.org>
* winio.c (edit_update) - properly update edittop when using soft wrapping.
          Fixes lack of centering for searching for off-screen answers, found by
          Hannes <mr_creosote@mutantwatch.de>.



git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@4409 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2009-09-13 04:50:44 +00:00
Chris Allegretta 5687c3dfa6 Fix regular scrolling with softwrap enabled too. Stop trying to be clever and just
figure out if we need to bail and call edit_refresh().



git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@4406 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2009-09-03 02:48:35 +00:00
Chris Allegretta 139934a236 2009-08-29 Chris Allegretta <chrisa@asty.org>
* Fix more soft wrapping issues, particularly with soft scrolling,
          discovered by Hannes <mr_creosote@mutantwatch.de>.



git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@4405 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2009-08-30 03:50:16 +00:00
Chris Allegretta 3de025f8f4 2009-08-19 Chris Allegretta <chrisa@asty.org>
* Fix issue with soft wrapping not displaying the last character of each line,
	  fixed bug discovered by Hannes <mr_creosote@mutantwatch.de>.



git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@4404 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2009-08-19 05:38:07 +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 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 803379c52c Add shortcut for CBEGINBEFORE case to edit_draw()
Added bug 80 to document segfault when editing near COLS



git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@4366 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2009-02-07 07:09:31 +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 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 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