Commit Graph

276 Commits (07f40612e1f590975afa214ab48d30cb58a90ec5)

Author SHA1 Message Date
Benno Schulenberg 07f40612e1 When redoing a line join at the tail of the file,
make sure openfile->filebot is updated.
Patch by Mark Majeres.


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@5007 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2014-06-22 10:14:48 +00:00
Benno Schulenberg fb6c0cd20c When undoing a line break at the tail of the file,
make sure openfile->filebot is updated.
Patch by Mark Majeres.


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@5006 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2014-06-21 19:40:30 +00:00
Benno Schulenberg 76e150b47f When undoing a cut-till-end-of-file, put the cursor back
where the cut started, and not at the bottom of the file.
Patch by Mark Majeres.


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@5005 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2014-06-21 19:32:17 +00:00
Benno Schulenberg 3b47ff756e Fixing compilation with --enable-tiny --enable-wrapping.
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@4999 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2014-06-20 16:13:54 +00:00
Benno Schulenberg b341f29cbd Transform many DISABLE_NANORC #ifdefs to the new DISABLE_HISTORIES.
This completes the fix for Savannah bug #42539.


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@4989 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2014-06-19 20:05:24 +00:00
Benno Schulenberg a81e141326 Removing a condition and a break that cancel each other.
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@4984 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2014-06-18 21:23:50 +00:00
Benno Schulenberg 45fe2adf72 Renaming the undo type UNSPLIT to JOIN, for clarity.
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@4982 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2014-06-18 20:11:52 +00:00
Benno Schulenberg b39db7bc63 And eliding a totally unused 'strdata2'.
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@4981 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2014-06-18 20:01:30 +00:00
Benno Schulenberg 3cf338aca8 Eliding the in fact unneeded 'to_eof'
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@4980 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2014-06-18 19:59:12 +00:00
Benno Schulenberg c55c0db2bb Renaming 'to_end' to 'to_eof', to lessen confusion with CUT_TO_END.
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@4979 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2014-06-18 19:46:35 +00:00
Benno Schulenberg a872709ab4 Making sure the cutbuffer is cleared at the appropriate moments.
Patch by Mark Majeres.


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@4978 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2014-06-18 19:04:35 +00:00
Benno Schulenberg e96022b923 After an undo or redo, update the 'placewewant'.
Patch by Mark Majeres.


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@4976 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2014-06-17 15:50:34 +00:00
Benno Schulenberg 38cb8fc328 Removing an obsolete boolean variable.
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@4975 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2014-06-17 15:37:34 +00:00
Benno Schulenberg 948b8e9bcf Putting the cursor back in front of a backwards cut,
where it was when the cut was made.
Patch by Mark Majeres, edited by Benno Schulenberg.


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@4966 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2014-06-14 14:08:28 +00:00
Benno Schulenberg 736fbf2e3f Removing the --undo option, having the undo functions always enabled.
If wished, the user can unbind them.  This fixes Savannah bug #42456.


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@4964 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2014-06-13 15:20:26 +00:00
Benno Schulenberg 1102aaa374 Making tiny nano a bit tinier by preening out some soft-wrap stuff.
Patch by David Lawrence Ramsey.


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@4951 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2014-06-09 20:26:54 +00:00
Benno Schulenberg acda255b47 A bunch of type fixes, mostly in debugging messages --
line numbers are long, x positions unsigned long.
Patch by David Lawrence Ramsey.


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@4950 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2014-06-09 15:08:59 +00:00
Benno Schulenberg c35eb5a16e Avoiding a compiler warning with --disable-wrapping.
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@4947 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2014-06-09 10:35:44 +00:00
Benno Schulenberg be10c2a48c Rewriting the line-wrapping code to make use of the existing line-break code.
And undoing line wraps together with their causal text additions, and not as
separate actions because the user did not make them.
Patch by Mark Majeres.


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@4945 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2014-06-09 10:01:54 +00:00
Benno Schulenberg 64896ba2ff Differentiating between undoing a Delete and undoing a Backspace -- the
cursor should be in a slightly but significantly different position.
Patch by Mark Majeres.


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@4944 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2014-06-08 19:02:12 +00:00
Benno Schulenberg 1eb23d4988 Making use of the macros charalloc() and charealloc(), making use of
null_at(), adding a cast, and using an unsigned type for a length.
Patch by David Lawrence Ramsey.


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@4939 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2014-06-04 16:30:11 +00:00
Benno Schulenberg 1de337de9c Normalizing whitespace, comments and interpunction, in various places.
Patch by David Lawrence Ramsey.


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@4938 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2014-06-04 16:02:51 +00:00
Benno Schulenberg ff36b05cdb Differentiating (for the undo structure) between
deleting a newline and any other character.
Patch by Mark Majeres.


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@4934 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2014-05-29 18:50:13 +00:00
Benno Schulenberg d0e234db08 Removing three unused parameters from do_input(),
as they are only ever set and never referenced.


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@4919 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2014-05-28 13:24:05 +00:00
Benno Schulenberg c3c2c66697 Fixing compilation and avoiding a warning with --enable-tiny.
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@4911 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2014-05-26 07:53:20 +00:00
Benno Schulenberg f5ac8c1ee1 Placing the cursor after an undo there where it was before the do,
and handling multibyte characters correctly.
*Patch by Mark Majeres.*


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@4908 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2014-05-25 19:41:49 +00:00
Benno Schulenberg 52e3533e99 Removing a few more doubled-up spaces.
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@4896 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2014-05-16 11:03:04 +00:00
Benno Schulenberg 5298d5114c Removing an unneeded call of edit_refresh(), and
using 'size_t' instead of 'int' for line lengths.
Patch by David Lawrence Ramsey.


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@4895 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2014-05-16 10:50:01 +00:00
Benno Schulenberg 275bd28d3e Tweaking some whitespace, using TRUE and FALSE instead of 1 and 0,
and mentioning the name of the terminal-tickling character (NBSP).
Patch by David Lawrence Ramsey.


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@4894 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2014-05-16 10:34:05 +00:00
Benno Schulenberg 6081546161 Going to the correct positions for undoing and redoing cuts and
pastes.  This fixes many undo problems and Savannah bug #25585.
*Patch by Mark Majeres.*


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@4893 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2014-05-15 20:00:46 +00:00
Benno Schulenberg 71c9a5245a Several random whitespace and comment tweaks.
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@4874 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2014-05-13 20:14:01 +00:00
Benno Schulenberg 127ce15d6b Making one error message somewhat clearer.
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@4867 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2014-05-13 08:12:52 +00:00
Benno Schulenberg 85c2c2a5d2 Providing startup feedback for the spell checker, as for the linter.
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@4856 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2014-05-12 11:50:58 +00:00
Chris Allegretta 61523be8d2 2014-05-10 Chris Allegretta <chrisa@asty.org>
* src/rcfile.c (parse_color_names): Redefine false and true to
          their appropriate macro names so --with-slang works (slangv2 anyway).
        * src/text.c (do_linter): Care about whether user cancelled the file
          save (cancel the operation) versus justy said no (continue but don't
          save the file).  Also doupdate() after statusbar message that
          linter is being invoked and blank the shortcuts to draw the eye.
          Also allow user to cancel at the "open in a new buffer" prompt.
          New function lint_cleanup().  Fixes Savannah bug 42203.



git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@4855 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2014-05-11 03:09:00 +00:00
Benno Schulenberg 7a9f4a456e Update the years in the copyright notices.
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@4826 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2014-04-30 20:18:26 +00:00
Benno Schulenberg 25e5896219 Removeing several unneeded double semicolons plus two relic comments.
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@4809 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2014-04-23 19:33:03 +00:00
Benno Schulenberg 5bd359dbb9 Normalizing whitespace around '==' comparison.
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@4776 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2014-04-15 15:02:43 +00:00
Benno Schulenberg cd634e074c Initializing a variable to avoid a compiler warning, renaming it,
adding and tweaking some comments, and removing an unneeded 'if'.


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@4771 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2014-04-14 13:02:43 +00:00
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