Commit Graph

3597 Commits (ec7b20eec67587ffb3ea5834843b386294d32248)

Author SHA1 Message Date
Benno Schulenberg a69460001e Back to SVN, and tweaking whitespace in NEWS and Changelog.
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@5683 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2016-02-26 09:20:59 +00:00
Benno Schulenberg 2146942248 Correcting the description of 'justifytrim', adding it to the Info document,
sorting it, and tweaking a wording.


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@5682 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2016-02-26 09:04:54 +00:00
Chris Allegretta 162d534ff6 GNU nano 2.5.3 release
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@5680 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2016-02-25 21:46:09 +00:00
Chris Allegretta 9f98333dce Call kill_spaces_on_justify justifytrim, to match the rest of rcfile naming conventions.
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@5679 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2016-02-25 21:04:45 +00:00
Benno Schulenberg 486e828443 Eliding splice_opennode() by handling the two cases (the creation of
the first element, and the insertion of a new element) directly.


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@5678 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2016-02-25 18:58:17 +00:00
Benno Schulenberg 3b8989b0a9 Now putting things in the proper order: setting 'prev_dir' only when
we've actually succeeded in changing directory.


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@5677 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2016-02-25 14:08:47 +00:00
Benno Schulenberg 761fa7cd3a Plugging a memory leak by not copying a string twice.
This fixes Savannah bug #47206.


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@5676 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2016-02-25 13:52:54 +00:00
Chris Allegretta 16c037fdb0 Tweak KILL_TRAILING_SPACES. Still deciding on name...
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@5675 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2016-02-24 04:46:44 +00:00
Benno Schulenberg 6fef9208da Tweaking the Changelog.
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@5674 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2016-02-23 12:49:08 +00:00
Benno Schulenberg f5eb316603 Rewrapping and reshuffling some lines.
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@5673 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2016-02-23 12:37:10 +00:00
Benno Schulenberg a9a32d6d89 Centering the cursor when the thing being undone or redone is currently
off the screen.

See https://lists.gnu.org/archive/html/nano-devel/2016-02/msg00104.html.


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@5672 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2016-02-23 12:18:10 +00:00
Benno Schulenberg 287f78a26b Not moving the cursor when copying a backwardly marked region.
This fixes Savannah bug #46980.


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@5671 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2016-02-23 12:07:58 +00:00
Benno Schulenberg 8a2dd978f8 Renaming a variable, for contrast and correctness.
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@5670 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2016-02-23 08:31:57 +00:00
Benno Schulenberg 6a002f5196 Using the correct column number also when messages are skipped.
And not minding when the column number is zero or negative.
This partially fixes Savannah bug #47131.


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@5669 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2016-02-22 19:49:45 +00:00
Benno Schulenberg 7dd1030b15 Showing the cursor in the edit window when linting.
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@5668 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2016-02-22 18:34:04 +00:00
Benno Schulenberg e085ebb872 Making the cursor visible again after a justification and after an
unrecognized escape sequence.


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@5667 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2016-02-22 17:15:28 +00:00
Benno Schulenberg 27e1e83e8c As the charmove() already copies the terminating null byte,
there is no need to put one in.  Just trim the allocation.


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@5666 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2016-02-22 16:51:39 +00:00
Chris Allegretta 0dec394303 Make that kill_spaces_on_justify, add hilighting.
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@5665 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2016-02-22 15:23:57 +00:00
Chris Allegretta 6a0ae5aaa2 2016-02-22 Chris Allegretta <chrisa@asty.org>
* Add ability to kill the trailing spaces when justifying
        code.  New nanorc option kill_spaces_on_wrap, we'll see
        whether this warrants a command line flahg or not.



git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@5664 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2016-02-22 15:10:32 +00:00
Benno Schulenberg 3ed08c568f Eliding a variable -- there is no need to optimize for calls of strlen(),
as this is typing speed, no need to hurry.


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@5663 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2016-02-22 14:26:05 +00:00
Benno Schulenberg 7c0e433305 Not moving too many bytes -- that is: not moving them beyond the
allocated buffer.  This fixes Savannah bug #47219.


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@5662 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2016-02-22 13:17:53 +00:00
Benno Schulenberg c115166f5b Sorting the prev_word() and next_word() functions in the standard way:
the backward one first.


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@5661 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2016-02-22 12:49:08 +00:00
Benno Schulenberg 9d8c72951f The amount to scroll is never zero, so there is no need to check.
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@5660 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2016-02-22 09:55:59 +00:00
Benno Schulenberg 818a39cfb9 Condensing some code by factoring out a repetition.
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@5659 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2016-02-22 09:34:33 +00:00
Benno Schulenberg f4f9954556 Eliding the function free_openfilestruct() as it is used only once.
(Note that openfile cannot be NULL here.  And in case it is,
nano should crash because DEBUG is enabled.)


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@5658 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2016-02-22 09:02:58 +00:00
Benno Schulenberg 814a4220a2 Removing four unneeded checks for NULL.
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@5657 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2016-02-21 20:54:04 +00:00
Benno Schulenberg 801b3ce675 Not requiring a third Tab to show the list of possible completions
when the first Tab added the part that all matches have in common.

So now two Tabs in a row will always show the list of possible
completions -- if there /are/ any completions.  Which means that
a second Tab will either: 1) do nothing, when the name is complete
and exists; 2) beep, when nothing in the current directory starts
with the current string; 3) show the list of matches.


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@5656 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2016-02-21 13:33:52 +00:00
Benno Schulenberg acf19bde22 Reducing an allocation to what is actually needed.
This undoes the papering-over of the just-fixed bug.


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@5655 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2016-02-20 16:35:09 +00:00
Benno Schulenberg 0f64fe0af2 Parsing a character in the correct buffer: in the first match
instead of in the given string.  This fixes Savannah bug #47199.


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@5654 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2016-02-20 12:30:07 +00:00
Benno Schulenberg e86dc0381c Avoiding a memory leak when tabbing on a string that doesn't occur in the
history.  This fixes Savannah bug #47124 reported by Mike Frysinger.


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@5653 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2016-02-20 12:16:43 +00:00
Benno Schulenberg 5fa5ccff43 Deleting a debugging leftover.
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@5652 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2016-02-18 20:10:02 +00:00
Benno Schulenberg 9703934479 Allowing the parameter of free_filestruct() to be NULL,
so we can delete four annoying pre-checks.


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@5651 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2016-02-18 19:58:18 +00:00
Benno Schulenberg 56cfab3df6 Fixing Savannah bug #47127 the proper way,
eliding two silly calls of edit_redraw().


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@5650 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2016-02-18 16:31:02 +00:00
Benno Schulenberg 16ba6df68c Deleting a redundant assignment. The multidata pointer is already
set to NULL in make_new_node(), a few lines earlier.


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@5648 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2016-02-16 09:06:21 +00:00
Benno Schulenberg 706f01422d Avoiding the loss a buffer when getcwd() fails.
This fixes Savannah bug #47129 reported by Mike Frysinger.


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@5647 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2016-02-15 16:24:39 +00:00
Benno Schulenberg 6c0e5e3f2c Freeing not just the struct but also the data it contains,
and also when it is the first and only line.
This fixes Savannah bug #47153 reported by Mike Frysinger.


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@5646 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2016-02-15 12:56:18 +00:00
Benno Schulenberg 8d005c8743 Saying that the 2.5 branch is a "rolling" release, that lock files are done,
and preparing for 2.5.3.


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@5645 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2016-02-14 12:17:17 +00:00
Benno Schulenberg e540053eb3 Renaming and condensing some stuff, and correcting the main comment,
because 'allow_cntrls == FALSE' meant that controls were being filtered.


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@5644 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2016-02-14 12:03:47 +00:00
Benno Schulenberg ef16a2a250 Doing the copying of typed stuff from input to output just once.
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@5643 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2016-02-14 11:16:54 +00:00
Benno Schulenberg 15947ac871 Restoring the mentioned behavior also for the internal spell fixer.
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@5642 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2016-02-14 10:29:48 +00:00
Benno Schulenberg f3a1d7ba06 Making the iteration through replacement matches behave the same again as the
iteration through search matches: showing them centered when found offscreen.
This fixes Savannah bug #47127.


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@5641 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2016-02-14 10:19:27 +00:00
Benno Schulenberg 568d2a389c Switching the cursor on and off at the appropriate moments (that is: when
needed), so that it no longer shows in the help screen nor in the file list.
This fixes Savannah bug #47126.


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@5640 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2016-02-13 19:41:12 +00:00
Benno Schulenberg ec3cd1eeae Allocating enough space for printing out the line and column numbers.
This fixes Savannah bug #47135.


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@5639 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2016-02-13 17:00:06 +00:00
Benno Schulenberg 813f9f72d0 Rebuilding the file list only when necessary, and not for each and every
cursor movement.  This fixes Savannah bug #47133.


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@5638 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2016-02-13 16:42:30 +00:00
Chris Allegretta 0f45b26cb9 GNU nano 2.5.2 release
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@5635 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2016-02-12 05:25:29 +00:00
Benno Schulenberg 6f352038da Making the formatter command more visible in the Go syntax file.
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@5634 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2016-02-11 17:30:16 +00:00
Benno Schulenberg de5b2634c8 Condensing some declarations, rewrapping some lines, and improving a
few comments.


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@5633 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2016-02-11 17:25:37 +00:00
Benno Schulenberg e39938c1fa Not leaving curses mode in the formatter, as that would hide
error messages upon reentry.  And, if there are any messages,
allowing the user a little time to read them.


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@5632 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2016-02-11 16:57:52 +00:00
Benno Schulenberg d4118efea5 Going to the next item in the list before freeing the current one.
This fixes Savannah bug #46796.


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@5631 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2016-02-11 08:50:11 +00:00
Benno Schulenberg 6c82fd65ad Adding remark to Changelog that Savannah bug #47111 is fixed.
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@5630 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2016-02-11 08:26:08 +00:00
Benno Schulenberg 65efed5f97 Freeing the position-history records that are dropped.
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@5629 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2016-02-10 20:29:23 +00:00
Benno Schulenberg b8e0e22d64 Switching the cursor on in the right place: in the central input routine.
This makes the cursor visible again during linting.


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@5628 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2016-02-10 20:16:50 +00:00
Benno Schulenberg fddad2636d Removing two SVN Id tags and a duplication.
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@5627 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2016-02-10 16:40:08 +00:00
Benno Schulenberg 9646d7c87d Thanking a Spanish, a Catalan, and a Croat translator.
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@5626 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2016-02-10 16:26:51 +00:00
Benno Schulenberg 14d1b3bd36 Allowing only control sequences in the proper range to be rebound.
This fixes Savannah bug #47025.


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@5625 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2016-02-10 15:06:45 +00:00
Benno Schulenberg d83bd7e305 Plugging a sneaky memory leak. This fixes Savannah bug #47003
reported and solved by Mike Frysinger.


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@5624 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2016-02-10 12:32:43 +00:00
Benno Schulenberg ef2cfa31a7 Preventing a chain of editing actions from continuing after a discard.
This fixes Savannah bug #47104.


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@5623 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2016-02-10 08:49:23 +00:00
Benno Schulenberg 0dbc867a16 Adjusting the version number in the docs before release.
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@5622 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2016-02-09 20:57:37 +00:00
Benno Schulenberg cdeb90515b Checking the result of a stat() to avoid referencing unitialized data.
The original patch was by Kamil Dudka.


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@5621 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2016-02-09 20:53:11 +00:00
Benno Schulenberg e853c1ee7c Renaming a variable for clarity.
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@5620 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2016-02-07 13:41:46 +00:00
Benno Schulenberg e5fee7e649 Normalizing a bit of indentation.
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@5619 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2016-02-07 13:37:16 +00:00
Benno Schulenberg 836fa7066a Using a character class instead of a literal tab and space.
The change was inspired by David Niklas.


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@5618 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2016-02-07 13:14:23 +00:00
Benno Schulenberg 98a8c06394 Eliding an unneeded 'if'.
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@5617 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2016-02-07 13:08:27 +00:00
Benno Schulenberg 12f27299f1 Avoiding a pointless lstat() when not writing to a temporary file.
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@5616 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2016-02-07 13:03:48 +00:00
Benno Schulenberg 05334a2b3c Not recording files that have the default cursor position.
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@5615 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2016-02-07 12:49:42 +00:00
Benno Schulenberg 22a01cad9e Rewrapping some lines and removing some useless comments.
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@5614 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2016-02-06 12:12:08 +00:00
Benno Schulenberg 8585bf2dd4 Avoiding to update the statusbar twice for a Backspace.
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@5613 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2016-02-06 11:50:57 +00:00
Benno Schulenberg 2cfa96bde9 Renaming 'update_bar_if_needed()' for more contrast and aptness.
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@5612 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2016-02-06 11:44:33 +00:00
Benno Schulenberg d844f05a1e Chopping two parameters that are always the same, and that are
global variables anyway.


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@5611 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2016-02-06 11:40:15 +00:00
Benno Schulenberg 97dcd377e7 Turning the cursor off when writing in the status bar,
and ensuring it is on when waiting for input.


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@5610 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2016-02-06 11:18:27 +00:00
Benno Schulenberg cc2d37053c Updating the screen immediately when a message is posted on the status bar.
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@5609 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2016-02-06 11:05:58 +00:00
Benno Schulenberg 6829241433 Removing the --nofollow option that hasn't been working for a dozen years.
With this option, nano would simply refuse to write to any symlinked file;
if anyone really used this option, they would certainly have complained.


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@5608 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2016-02-06 10:59:31 +00:00
Benno Schulenberg cca22bb10a Guiding the translators a little bit.
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@5607 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2016-02-05 12:27:54 +00:00
Benno Schulenberg 5a5144b75a Putting four strings in the standard order: first backward, then forward.
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@5606 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2016-02-05 12:01:02 +00:00
Benno Schulenberg 2a2e012064 Condensing the descriptions of command-key sequences and of the screen layout;
mentioning how to enter Unicode and that regular expressions are line oriented.


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@5605 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2016-02-05 11:55:55 +00:00
Benno Schulenberg 7ade5deabe Making Home go always fully home.
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@5604 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2016-01-31 13:26:15 +00:00
Benno Schulenberg 7b74fedc05 Showing ^^ and M-^ as valid key names.
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@5603 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2016-01-31 13:20:40 +00:00
Benno Schulenberg ba987350a9 Being more specific in how a given path is invalid.
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@5602 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2016-01-31 13:06:06 +00:00
Benno Schulenberg f96f4fe616 Updating position history only when 'positionlog' is set.
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@5601 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2016-01-29 20:43:54 +00:00
Benno Schulenberg 68ab4b848b Plugging another memory leak.
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@5600 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2016-01-29 20:39:12 +00:00
Benno Schulenberg 98e72f50e6 Checking the position history only when 'positionlog' is set
/also/ for the first file.  :|


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@5599 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2016-01-29 17:18:27 +00:00
Benno Schulenberg 41f08534d9 Plugging a couple of memory leaks.
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@5598 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2016-01-29 16:58:02 +00:00
Benno Schulenberg f8ed6bb099 Checking the position history only when option 'positionlog' is set.
This fixes a bug reported by Mike Frysinger.


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@5597 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2016-01-29 16:20:28 +00:00
Benno Schulenberg d8801ec10e Also displaying the buffer when configured with only --disable-histories.
This fixes a segfault reported in Savannah bug #47011.


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@5596 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2016-01-29 16:01:43 +00:00
Benno Schulenberg a93a11eb42 Using a simpler algorithm for jumping to the next word.
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@5595 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2016-01-26 10:31:16 +00:00
Benno Schulenberg 5688c160a9 Jumping to the start of the current word, not to that of the preceding one.
This fixes Savannah bug #46970.


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@5594 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2016-01-26 10:10:20 +00:00
Benno Schulenberg 65c7c810bc Adjusting some indentation and some line wrapping.
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@5593 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2016-01-26 09:16:09 +00:00
Benno Schulenberg 7256b055b1 Not adding directories to the list of file positions.
This fixes Savannah bug #46971.


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@5592 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2016-01-26 09:06:31 +00:00
Benno Schulenberg 3331828696 Mentioning that the position history is limited to the 200 most recent files.
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@5591 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2016-01-25 20:51:00 +00:00
Benno Schulenberg 2b72f1d1f1 Documenting the --enable-altrcname configure option.
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@5590 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2016-01-25 20:38:10 +00:00
Benno Schulenberg ae42240c33 Handling an update of the first element correctly.
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@5589 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2016-01-25 20:26:01 +00:00
Benno Schulenberg 87460b5998 Eliding another small function that is used only once.
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@5588 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2016-01-24 21:02:09 +00:00
Benno Schulenberg decee32067 Eliding an unneeded function.
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@5587 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2016-01-24 20:44:39 +00:00
Benno Schulenberg f01dd29f48 Bundling four statements (that in total occur seven times)
into a separate function.


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@5586 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2016-01-24 20:36:02 +00:00
Benno Schulenberg 53c8ada24b Removing a superfluous free.
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@5585 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2016-01-24 16:04:25 +00:00
Benno Schulenberg eed1aab3f0 Chopping an always-FALSE parameter and deleting an unused return value.
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@5584 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2016-01-24 15:42:45 +00:00
Benno Schulenberg b8d32d8b7b Condensing the code by removing a triplication.
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@5583 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2016-01-24 15:32:13 +00:00
Benno Schulenberg 8c705b5dc2 Moving an updated position-history item to the end of the list,
so that it won't be dropped any time soon.


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@5582 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2016-01-24 14:49:42 +00:00
Benno Schulenberg cd1d435ac7 Renaming a variable for clarity and contrast.
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@5581 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2016-01-22 16:56:04 +00:00
Benno Schulenberg 3a3b1764af Not using $HOME when we're root, because some sudos don't filter it out
of the environment (which can lead to a root-owned .nano/ directory in
the invoking user's home directory).  This addresses Ubuntu bug #1471459.
(See https://bugs.launchpad.net/ubuntu/+source/nano/+bug/1471459.)


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@5580 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2016-01-22 16:10:36 +00:00
Benno Schulenberg 0af2f9e55c Deleting the unneeded blanking of a variable.
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@5579 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2016-01-21 20:44:22 +00:00
Benno Schulenberg a443760d80 Eliding an unneeded variable.
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@5578 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2016-01-21 18:29:39 +00:00
Benno Schulenberg 7a1709f03b Removing a now unneeded function, as nothing can break out of do_prompt()
any more, not a SIGWINCH either.  And deleting an always-FALSE 'if'.


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@5577 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2016-01-21 18:23:17 +00:00
Benno Schulenberg aa7edb7fc2 Preserving the cursor position on the statusbar when just toggling
a setting or making an excursion to the file browser.
This fixes Savannah bug #46945.


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@5576 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2016-01-21 17:29:37 +00:00
Benno Schulenberg a68e1627dc Adding to the Changelog the remark that Savannah bug #44950 is now fixed.
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@5575 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2016-01-20 16:17:21 +00:00
Benno Schulenberg fe3d849a75 Getting rid of a global variable.
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@5574 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2016-01-20 15:56:40 +00:00
Benno Schulenberg a91a1c7bbd Readjusting the indentation and a comment.
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@5573 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2016-01-20 15:33:41 +00:00
Benno Schulenberg 8bd76d8302 Verifying that the containing directory of the given filename exists.
Original patch by Rishabh Dave, edited by Benno.


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@5572 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2016-01-20 15:14:52 +00:00
Benno Schulenberg f8f2d63107 Limiting the number of loaded items in the positions history.
(So that most likely not more than two hundred plus a handful
will be written out.  This was the easiest to implement.)

See https://lists.gnu.org/archive/html/nano-devel/2016-01/msg00050.html.


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@5571 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2016-01-17 17:04:28 +00:00
Benno Schulenberg 13ba5432cd Removing a mistaken '+': only one menu name is allowed in key bindings.
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@5570 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2016-01-17 16:47:20 +00:00
Benno Schulenberg a3a69eec02 Fixing a typo in an #ifndef symbol. Reported by Frank.
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@5569 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2016-01-17 16:25:31 +00:00
Benno Schulenberg ffae582aab Allowing inline comments with key bindings.
Patch by Mike Frysinger.


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@5568 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2016-01-17 16:15:08 +00:00
Benno Schulenberg f845938e86 Freeing the items on the undo stack when a buffer is closed.
This fixes Savannah bug #46904 reported by Mike Frysinger.


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@5567 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2016-01-15 16:44:50 +00:00
Benno Schulenberg 38acacb461 Moving set_modified() to the file that has to do with files.
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@5566 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2016-01-15 14:42:07 +00:00
Benno Schulenberg caa759be31 Returning a fantastic file descriptor -- when opening
a non-existent file for reading succeeds.


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@5565 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2016-01-15 14:23:50 +00:00
Benno Schulenberg dfeb0f938f Plugging another memory leak.
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@5564 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2016-01-15 13:27:12 +00:00
Benno Schulenberg 0ee7729666 Freeing the full filename in all cases.
There's a bunch of return cases where we don't free the new full filename
which leads to leaks when writing out new files.  One way to reproduce:
$ rm -f foo
$ nano foo
<hit enter>
<ctrl+o to save>
<ctrl+x to exit>
-> memory leak

Patch by Mike Frysinger.


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@5563 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2016-01-15 13:17:44 +00:00
Benno Schulenberg 63370954bd Showing a key only when it was rebound.
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@5562 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2016-01-14 14:44:11 +00:00
Benno Schulenberg 33fb1746dd Eliding an unneeded function.
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@5561 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2016-01-14 14:34:05 +00:00
Benno Schulenberg 431cec477d Deleting two duplicate declarations.
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@5560 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2016-01-14 13:52:39 +00:00
Benno Schulenberg 8a9f71639f Eliding an unneeded variable and adjusting some wrappings and whitespace.
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@5559 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2016-01-14 13:41:45 +00:00
Benno Schulenberg 8f463778d1 Deleting an 'if' that is always FALSE.
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@5558 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2016-01-14 13:27:22 +00:00
Benno Schulenberg ba7ac78e36 Removing a reference to an obsolete file.
Bug was reported by Mike Frysinger.


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@5557 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2016-01-14 13:14:16 +00:00
Benno Schulenberg 34fbb1f4de Adjusting a few comments and rewrapping some lines.
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@5556 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2016-01-13 20:32:40 +00:00
Benno Schulenberg ecf3cd7244 Reducing the number of indentation steps elsewhere too.
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@5555 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2016-01-13 20:08:36 +00:00
Benno Schulenberg 96b9249f91 Reducing the number of indentation steps.
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@5554 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2016-01-12 20:26:59 +00:00
Benno Schulenberg 774c8ba1bf Condensing the preparsing of a line.
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@5553 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2016-01-12 20:17:05 +00:00
Benno Schulenberg 73ee7d7ee5 Removing a senseless iteration: simply add the new record at the tail.
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@5552 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2016-01-12 20:08:31 +00:00
Benno Schulenberg deb271d708 Differentiating a variable name from function names.
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@5551 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2016-01-12 19:20:40 +00:00
Benno Schulenberg cb832bef1b Removing some code duplication.
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@5550 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2016-01-12 19:07:01 +00:00
Benno Schulenberg 583b67bad2 Rename a variable, to match the save routine.
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@5549 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2016-01-12 11:16:39 +00:00
Benno Schulenberg 5b350b86ba Fixing some typos and whitespace, and normalizing the dates in the NEWS file.
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@5548 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2016-01-12 11:03:00 +00:00
Benno Schulenberg 53991cf073 Fixing the 2.5.1 tag in the Changelog.
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@5547 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2016-01-12 10:23:38 +00:00
Chris Allegretta 26347ed38e Forward date 2.5.1 up to the 11th since I didnt get to it before Midnight.
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@5543 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2016-01-11 05:03:20 +00:00
Benno Schulenberg 1b293ff34c Adjusting dates and version number.
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@5542 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2016-01-10 16:18:43 +00:00
Benno Schulenberg 83475b0d84 Adding a news item for the upcoming 2.5.1.
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@5541 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2016-01-10 16:10:57 +00:00
Benno Schulenberg 113cd506c9 Snipping inconsistent blank lines in the Changelog.
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@5540 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2016-01-09 21:10:39 +00:00
Benno Schulenberg ec4ee1c489 Not going beyond the number of available rows in the edit window.
This fixes Savannah bug #42188.


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@5539 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2016-01-09 20:21:29 +00:00
Benno Schulenberg ebbb5b5d1e Making sure to keep advancing also when regex matches are zero-length.
This fixes Savannah bug #26977 -- a hang on start="^" end="$".


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@5538 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2016-01-09 18:41:56 +00:00
Benno Schulenberg 1ac2c4cd4f Adding a comment and using a symbolic value.
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@5537 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2016-01-07 15:42:44 +00:00
Benno Schulenberg 6d6cda24c8 Delete two unneeded #ifdefs -- better fail to compile than create a cripple.
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@5536 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2016-01-07 15:21:59 +00:00
Benno Schulenberg 9962e3b65c Making "Tab" produce the appropriate keycode.
This fixes Savannah bug #46812.


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@5535 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2016-01-04 19:42:37 +00:00
Benno Schulenberg 9d72efa474 Gettextizing a forgotten string.
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@5534 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2016-01-04 11:10:07 +00:00
Benno Schulenberg 22557df600 Adding "Tab" as a key description, just like "Del" and "Enter" already are.
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@5533 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2016-01-04 10:50:21 +00:00
Benno Schulenberg 9e6b9a29a5 Improving the name of allow_pending_sigwinch() to allow_sigwinch(),
and improving its comments too.


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@5532 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2016-01-04 10:37:11 +00:00
Benno Schulenberg 0dd351a5c1 Condensing the exit code of do_linter().
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@5531 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2016-01-04 10:05:52 +00:00
Benno Schulenberg dd29c56993 Rewriting the loop, and constifying the input of sctofunc().
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@5530 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2016-01-04 09:52:43 +00:00
Benno Schulenberg 7a08fa63f5 No longer freeing any existing functions -- they are defined only once.
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@5529 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2016-01-04 09:44:35 +00:00
Benno Schulenberg 539a4b42be Constifying the input parameter of strtosc() and strtomenu().
Patch by Mike Frysinger.


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@5528 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2016-01-04 09:12:21 +00:00
Benno Schulenberg 42a761e77f Adjusting the indentation after the previous change.
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@5527 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2016-01-03 17:37:05 +00:00