]> git.wh0rd.org Git - nano.git/log
nano.git
8 years agoPruning two #ifdefs, like elsewhere, to reduce the clutter.
Benno Schulenberg [Thu, 17 Mar 2016 18:51:46 +0000 (18:51 +0000)]
Pruning two #ifdefs, like elsewhere, to reduce the clutter.

git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@5740 35c25a1d-7b9e-4130-9fde-d3aeb78583b8

8 years agoRemoving two redundant returns, and condensing six comments.
Benno Schulenberg [Thu, 17 Mar 2016 10:06:15 +0000 (10:06 +0000)]
Removing two redundant returns, and condensing six comments.

git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@5739 35c25a1d-7b9e-4130-9fde-d3aeb78583b8

8 years agoUsing the Search key bindings also during a Re-search, to enable cancelling.
Benno Schulenberg [Thu, 17 Mar 2016 09:12:30 +0000 (09:12 +0000)]
Using the Search key bindings also during a Re-search, to enable cancelling.
This fixes Savannah bug #47159.

git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@5738 35c25a1d-7b9e-4130-9fde-d3aeb78583b8

8 years agoRearranging some things to reduce the indentation level by four steps,
Benno Schulenberg [Mon, 14 Mar 2016 17:14:35 +0000 (17:14 +0000)]
Rearranging some things to reduce the indentation level by four steps,
so we can unwrap a dozen lines.

git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@5737 35c25a1d-7b9e-4130-9fde-d3aeb78583b8

8 years agoMaking an error message equal to others, to reduce the msgid count.
Benno Schulenberg [Mon, 14 Mar 2016 16:09:52 +0000 (16:09 +0000)]
Making an error message equal to others, to reduce the msgid count.

git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@5736 35c25a1d-7b9e-4130-9fde-d3aeb78583b8

8 years agoAvoiding to dereference a possible NULL.
Benno Schulenberg [Mon, 14 Mar 2016 16:01:44 +0000 (16:01 +0000)]
Avoiding to dereference a possible NULL.

git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@5735 35c25a1d-7b9e-4130-9fde-d3aeb78583b8

8 years agoGiving a central variable a ringing name --
Benno Schulenberg [Sun, 13 Mar 2016 20:13:16 +0000 (20:13 +0000)]
Giving a central variable a ringing name --
tmp* is something for 5 lines, not for 300.

git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@5734 35c25a1d-7b9e-4130-9fde-d3aeb78583b8

8 years agoRenaming a variable, from 'endcolor' to 'lastcolor', to fully avoid
Benno Schulenberg [Sun, 13 Mar 2016 20:05:36 +0000 (20:05 +0000)]
Renaming a variable, from 'endcolor' to 'lastcolor', to fully avoid
the idea that it might have something to do with 'end_regex'.

git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@5733 35c25a1d-7b9e-4130-9fde-d3aeb78583b8

8 years agoCombining the regular-expression flags at compile time instead of at run time.
Benno Schulenberg [Sun, 13 Mar 2016 19:37:21 +0000 (19:37 +0000)]
Combining the regular-expression flags at compile time instead of at run time.

git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@5732 35c25a1d-7b9e-4130-9fde-d3aeb78583b8

8 years agoAllowing the use of word boundary markers \< and \> in search strings on
Benno Schulenberg [Sun, 13 Mar 2016 19:19:12 +0000 (19:19 +0000)]
Allowing the use of word boundary markers \< and \> in search strings on
non-GNU systems.  This is a partial fix for Savannah bug #47325.

git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@5731 35c25a1d-7b9e-4130-9fde-d3aeb78583b8

8 years agoMentioning SVN instead of CVS, in the docs and in a comment.
Benno Schulenberg [Sun, 13 Mar 2016 19:09:28 +0000 (19:09 +0000)]
Mentioning SVN instead of CVS, in the docs and in a comment.
Patch by Thomas Rosenau.

git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@5730 35c25a1d-7b9e-4130-9fde-d3aeb78583b8

8 years agoRefinding the tail of the colors list only when extending,
Benno Schulenberg [Sat, 12 Mar 2016 11:15:12 +0000 (11:15 +0000)]
Refinding the tail of the colors list only when extending,
not for every added color, thus saving some 15 microseconds.

git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@5729 35c25a1d-7b9e-4130-9fde-d3aeb78583b8

8 years agoRenaming a variable.
Benno Schulenberg [Sat, 12 Mar 2016 10:21:02 +0000 (10:21 +0000)]
Renaming a variable.

git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@5728 35c25a1d-7b9e-4130-9fde-d3aeb78583b8

8 years agoReducing the indentation by short-circuiting a loop.
Benno Schulenberg [Sat, 12 Mar 2016 09:52:16 +0000 (09:52 +0000)]
Reducing the indentation by short-circuiting a loop.

git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@5727 35c25a1d-7b9e-4130-9fde-d3aeb78583b8

8 years agoRenaming two functions, to be more distinguishable --
Benno Schulenberg [Sat, 12 Mar 2016 09:43:10 +0000 (09:43 +0000)]
Renaming two functions, to be more distinguishable --
a leading underscore as the only difference is not enough.

git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@5726 35c25a1d-7b9e-4130-9fde-d3aeb78583b8

8 years agoTweaking the Changelog a bit, and the NEWS file (double spacing version jumps).
Benno Schulenberg [Sat, 12 Mar 2016 09:37:48 +0000 (09:37 +0000)]
Tweaking the Changelog a bit, and the NEWS file (double spacing version jumps).

git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@5725 35c25a1d-7b9e-4130-9fde-d3aeb78583b8

8 years agoUnnesting two ifs -- to put filenames, headerlines, and magic strings
Benno Schulenberg [Sat, 12 Mar 2016 09:18:50 +0000 (09:18 +0000)]
Unnesting two ifs -- to put filenames, headerlines, and magic strings
on equal footing.

git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@5724 35c25a1d-7b9e-4130-9fde-d3aeb78583b8

8 years agoSetting the syntax and regex pointers just once, in a single place.
Benno Schulenberg [Sat, 12 Mar 2016 08:46:18 +0000 (08:46 +0000)]
Setting the syntax and regex pointers just once, in a single place.

git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@5723 35c25a1d-7b9e-4130-9fde-d3aeb78583b8

8 years agoFixing compilation when configured with --enable-tiny plus --enable-nanorc.
Benno Schulenberg [Fri, 11 Mar 2016 17:14:30 +0000 (17:14 +0000)]
Fixing compilation when configured with --enable-tiny plus --enable-nanorc.

git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@5722 35c25a1d-7b9e-4130-9fde-d3aeb78583b8

8 years agoChecking for an open syntax first, before checking it is named "default".
Benno Schulenberg [Fri, 11 Mar 2016 16:51:15 +0000 (16:51 +0000)]
Checking for an open syntax first, before checking it is named "default".

git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@5721 35c25a1d-7b9e-4130-9fde-d3aeb78583b8

8 years agoEliding a variable.
Benno Schulenberg [Fri, 11 Mar 2016 16:45:00 +0000 (16:45 +0000)]
Eliding a variable.

git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@5720 35c25a1d-7b9e-4130-9fde-d3aeb78583b8

8 years agoTweaking some comments and reshuffling/reindenting some lines.
Benno Schulenberg [Fri, 11 Mar 2016 16:39:27 +0000 (16:39 +0000)]
Tweaking some comments and reshuffling/reindenting some lines.

git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@5719 35c25a1d-7b9e-4130-9fde-d3aeb78583b8

8 years agoFixing compilation when configured with --enable-tiny plus --enable-browser.
Benno Schulenberg [Fri, 11 Mar 2016 16:30:29 +0000 (16:30 +0000)]
Fixing compilation when configured with --enable-tiny plus --enable-browser.

git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@5718 35c25a1d-7b9e-4130-9fde-d3aeb78583b8

8 years agoRenaming a variable to better fit its new role.
Benno Schulenberg [Thu, 10 Mar 2016 20:36:12 +0000 (20:36 +0000)]
Renaming a variable to better fit its new role.

git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@5717 35c25a1d-7b9e-4130-9fde-d3aeb78583b8

8 years agoTurning the linked list of syntaxes upside-down, so that the last-defined one
Benno Schulenberg [Thu, 10 Mar 2016 20:06:01 +0000 (20:06 +0000)]
Turning the linked list of syntaxes upside-down, so that the last-defined one
comes first, so that a search can stop at the first match instead of always
having to run through the entire list.

git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@5716 35c25a1d-7b9e-4130-9fde-d3aeb78583b8

8 years agoEliding the functions parse_header_exp() and parse_magic_exp(),
Benno Schulenberg [Thu, 10 Mar 2016 11:00:59 +0000 (11:00 +0000)]
Eliding the functions parse_header_exp() and parse_magic_exp(),
and reshuffling the parameters in grab_and_store().

git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@5715 35c25a1d-7b9e-4130-9fde-d3aeb78583b8

8 years agoFolding the parsing of a linter and formatter command into a single routine.
Benno Schulenberg [Thu, 10 Mar 2016 10:36:49 +0000 (10:36 +0000)]
Folding the parsing of a linter and formatter command into a single routine.

git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@5714 35c25a1d-7b9e-4130-9fde-d3aeb78583b8

8 years agoNot accepting 'header" and 'magic' commands for the default syntax.
Benno Schulenberg [Thu, 10 Mar 2016 09:46:21 +0000 (09:46 +0000)]
Not accepting 'header" and 'magic' commands for the default syntax.
This fixes Savannah bug #47323.

git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@5713 35c25a1d-7b9e-4130-9fde-d3aeb78583b8

8 years agoUsing the grab_and_store() function also for gathering up extension regexes.
Benno Schulenberg [Wed, 9 Mar 2016 21:00:42 +0000 (21:00 +0000)]
Using the grab_and_store() function also for gathering up extension regexes.

git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@5712 35c25a1d-7b9e-4130-9fde-d3aeb78583b8

8 years agoProducing an adequate error message when the syntax name is improperly quoted.
Benno Schulenberg [Wed, 9 Mar 2016 20:28:50 +0000 (20:28 +0000)]
Producing an adequate error message when the syntax name is improperly quoted.
This fixes Savannah bug #47324.

git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@5711 35c25a1d-7b9e-4130-9fde-d3aeb78583b8

8 years agoTweaking a few things and renaming a variable.
Benno Schulenberg [Fri, 4 Mar 2016 20:50:38 +0000 (20:50 +0000)]
Tweaking a few things and renaming a variable.

git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@5710 35c25a1d-7b9e-4130-9fde-d3aeb78583b8

8 years agoRenaming three variables.
Benno Schulenberg [Fri, 4 Mar 2016 20:22:27 +0000 (20:22 +0000)]
Renaming three variables.

git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@5709 35c25a1d-7b9e-4130-9fde-d3aeb78583b8

8 years agoEliding the now too tiny function free_list_item().
Benno Schulenberg [Fri, 4 Mar 2016 18:28:03 +0000 (18:28 +0000)]
Eliding the now too tiny function free_list_item().

git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@5708 35c25a1d-7b9e-4130-9fde-d3aeb78583b8

8 years agoDeleting a now-unused struct member.
Benno Schulenberg [Fri, 4 Mar 2016 17:04:56 +0000 (17:04 +0000)]
Deleting a now-unused struct member.

git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@5707 35c25a1d-7b9e-4130-9fde-d3aeb78583b8

8 years agoNot bothering to keep the compiled regular expression when it matched.
Benno Schulenberg [Fri, 4 Mar 2016 14:53:45 +0000 (14:53 +0000)]
Not bothering to keep the compiled regular expression when it matched.
Stopping instead to call malloc() pointlessly.

git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@5706 35c25a1d-7b9e-4130-9fde-d3aeb78583b8

8 years agoAllowing to select an empty syntax. And selecting the last
Benno Schulenberg [Tue, 1 Mar 2016 11:21:05 +0000 (11:21 +0000)]
Allowing to select an empty syntax.  And selecting the last
instead of the first syntax that matches a certain magic string
(forgotten in the previous commit).

git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@5705 35c25a1d-7b9e-4130-9fde-d3aeb78583b8

8 years agoNot bothering to discard a duplicate syntax -- selecting simply the
Benno Schulenberg [Tue, 1 Mar 2016 11:06:00 +0000 (11:06 +0000)]
Not bothering to discard a duplicate syntax -- selecting simply the
last-defined one.  This addresses Savannah bug #47303.

git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@5704 35c25a1d-7b9e-4130-9fde-d3aeb78583b8

8 years agoNot dereferencing symlinks, so that the syntax will be derived from the
Benno Schulenberg [Mon, 29 Feb 2016 16:56:54 +0000 (16:56 +0000)]
Not dereferencing symlinks, so that the syntax will be derived from the
name given on the command line, not from the name of the target file.
This fixes Savannah bug #47307.

git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@5703 35c25a1d-7b9e-4130-9fde-d3aeb78583b8

8 years agoFixing breakage of r5695 -- I confused nregcomp() with regcomp(). :(
Benno Schulenberg [Mon, 29 Feb 2016 15:40:13 +0000 (15:40 +0000)]
Fixing breakage of r5695 -- I confused nregcomp() with regcomp().  :(
Hhrr...  Names that don't seem to differ...

git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@5702 35c25a1d-7b9e-4130-9fde-d3aeb78583b8

8 years agoRenaming a variable and reshuffling a few lines.
Benno Schulenberg [Mon, 29 Feb 2016 12:17:53 +0000 (12:17 +0000)]
Renaming a variable and reshuffling a few lines.

git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@5701 35c25a1d-7b9e-4130-9fde-d3aeb78583b8

8 years ago"Closing" an extended syntax again, to prevent sneakily extending
Benno Schulenberg [Mon, 29 Feb 2016 12:04:22 +0000 (12:04 +0000)]
"Closing" an extended syntax again, to prevent sneakily extending
the last-defined syntax.

git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@5700 35c25a1d-7b9e-4130-9fde-d3aeb78583b8

8 years agoArranging some things more orderly.
Benno Schulenberg [Mon, 29 Feb 2016 10:54:48 +0000 (10:54 +0000)]
Arranging some things more orderly.

git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@5699 35c25a1d-7b9e-4130-9fde-d3aeb78583b8

8 years agoNot allocating a struct for the "none" syntax -- it doesn't need any.
Benno Schulenberg [Mon, 29 Feb 2016 10:29:52 +0000 (10:29 +0000)]
Not allocating a struct for the "none" syntax -- it doesn't need any.

git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@5698 35c25a1d-7b9e-4130-9fde-d3aeb78583b8

8 years agoRenaming a struct member.
Benno Schulenberg [Mon, 29 Feb 2016 09:17:03 +0000 (09:17 +0000)]
Renaming a struct member.

git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@5697 35c25a1d-7b9e-4130-9fde-d3aeb78583b8

8 years agoDisallowing the addition of further things to a syntax when
Benno Schulenberg [Sun, 28 Feb 2016 20:38:14 +0000 (20:38 +0000)]
Disallowing the addition of further things to a syntax when
an rcfile ends or when an invalid syntax command is found.
This fixes Savannah bug #47207

git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@5696 35c25a1d-7b9e-4130-9fde-d3aeb78583b8

8 years agoRearranging a few things in my style.
Benno Schulenberg [Sun, 28 Feb 2016 17:16:39 +0000 (17:16 +0000)]
Rearranging a few things in my style.

git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@5695 35c25a1d-7b9e-4130-9fde-d3aeb78583b8

8 years agoNot dropping regexes that were gathered earlier.
Benno Schulenberg [Sun, 28 Feb 2016 16:36:23 +0000 (16:36 +0000)]
Not dropping regexes that were gathered earlier.
This fixes Savannah bug #47285.

git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@5694 35c25a1d-7b9e-4130-9fde-d3aeb78583b8

8 years agoRenaming a variable and fusing an increment.
Benno Schulenberg [Sun, 28 Feb 2016 15:47:37 +0000 (15:47 +0000)]
Renaming a variable and fusing an increment.

git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@5693 35c25a1d-7b9e-4130-9fde-d3aeb78583b8

8 years agoUsing the now correct parsing of header regexes also for parsing magic regexes.
Benno Schulenberg [Sun, 28 Feb 2016 15:16:27 +0000 (15:16 +0000)]
Using the now correct parsing of header regexes also for parsing magic regexes.
This fixes Savannah bug #47292.

git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@5692 35c25a1d-7b9e-4130-9fde-d3aeb78583b8

8 years agoNot continuing when something is wrong, but instead skipping the rest of
Benno Schulenberg [Sun, 28 Feb 2016 11:04:36 +0000 (11:04 +0000)]
Not continuing when something is wrong, but instead skipping the rest of
the line.  This fixes Savannah bug #47289.

git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@5691 35c25a1d-7b9e-4130-9fde-d3aeb78583b8

8 years agoRenaming another struct element, because it refers not just
Benno Schulenberg [Fri, 26 Feb 2016 20:19:13 +0000 (20:19 +0000)]
Renaming another struct element, because it refers not just
to file extensions, but also to header lines and magic strings.

git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@5690 35c25a1d-7b9e-4130-9fde-d3aeb78583b8

8 years agoRenaming a struct element for aptness and contrast.
Benno Schulenberg [Fri, 26 Feb 2016 20:09:29 +0000 (20:09 +0000)]
Renaming a struct element for aptness and contrast.

git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@5689 35c25a1d-7b9e-4130-9fde-d3aeb78583b8

8 years agoEliding the function nfreeregex(), now used just once.
Benno Schulenberg [Fri, 26 Feb 2016 17:25:48 +0000 (17:25 +0000)]
Eliding the function nfreeregex(), now used just once.

git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@5688 35c25a1d-7b9e-4130-9fde-d3aeb78583b8

8 years agoRenaming a variable for conciseness.
Benno Schulenberg [Fri, 26 Feb 2016 17:11:35 +0000 (17:11 +0000)]
Renaming a variable for conciseness.

git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@5687 35c25a1d-7b9e-4130-9fde-d3aeb78583b8

8 years agoFactoring out a triple repetition into found_in_list().
Benno Schulenberg [Fri, 26 Feb 2016 16:37:23 +0000 (16:37 +0000)]
Factoring out a triple repetition into found_in_list().

git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@5686 35c25a1d-7b9e-4130-9fde-d3aeb78583b8

8 years agoStripping things bare to see the sameness.
Benno Schulenberg [Fri, 26 Feb 2016 16:18:18 +0000 (16:18 +0000)]
Stripping things bare to see the sameness.

git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@5685 35c25a1d-7b9e-4130-9fde-d3aeb78583b8

8 years agoLooking for the default syntax only when all else failed --
Benno Schulenberg [Fri, 26 Feb 2016 16:08:21 +0000 (16:08 +0000)]
Looking for the default syntax only when all else failed --
foregoing a small, complicating optimization.

git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@5684 35c25a1d-7b9e-4130-9fde-d3aeb78583b8

8 years agoBack to SVN, and tweaking whitespace in NEWS and Changelog.
Benno Schulenberg [Fri, 26 Feb 2016 09:20:59 +0000 (09:20 +0000)]
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

8 years agoCorrecting the description of 'justifytrim', adding it to the Info document,
Benno Schulenberg [Fri, 26 Feb 2016 09:04:54 +0000 (09:04 +0000)]
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

8 years agoGNU nano 2.5.3 release v2.5.3
Chris Allegretta [Thu, 25 Feb 2016 21:46:09 +0000 (21:46 +0000)]
GNU nano 2.5.3 release

git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@5680 35c25a1d-7b9e-4130-9fde-d3aeb78583b8

8 years agoCall kill_spaces_on_justify justifytrim, to match the rest of rcfile naming conventions.
Chris Allegretta [Thu, 25 Feb 2016 21:04:45 +0000 (21:04 +0000)]
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

8 years agoEliding splice_opennode() by handling the two cases (the creation of
Benno Schulenberg [Thu, 25 Feb 2016 18:58:17 +0000 (18:58 +0000)]
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

8 years agoNow putting things in the proper order: setting 'prev_dir' only when
Benno Schulenberg [Thu, 25 Feb 2016 14:08:47 +0000 (14:08 +0000)]
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

8 years agoPlugging a memory leak by not copying a string twice.
Benno Schulenberg [Thu, 25 Feb 2016 13:52:54 +0000 (13:52 +0000)]
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

8 years agoTweak KILL_TRAILING_SPACES. Still deciding on name...
Chris Allegretta [Wed, 24 Feb 2016 04:46:44 +0000 (04:46 +0000)]
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

8 years agoTweaking the Changelog.
Benno Schulenberg [Tue, 23 Feb 2016 12:49:08 +0000 (12:49 +0000)]
Tweaking the Changelog.

git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@5674 35c25a1d-7b9e-4130-9fde-d3aeb78583b8

8 years agoRewrapping and reshuffling some lines.
Benno Schulenberg [Tue, 23 Feb 2016 12:37:10 +0000 (12:37 +0000)]
Rewrapping and reshuffling some lines.

git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@5673 35c25a1d-7b9e-4130-9fde-d3aeb78583b8

8 years agoCentering the cursor when the thing being undone or redone is currently
Benno Schulenberg [Tue, 23 Feb 2016 12:18:10 +0000 (12:18 +0000)]
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

8 years agoNot moving the cursor when copying a backwardly marked region.
Benno Schulenberg [Tue, 23 Feb 2016 12:07:58 +0000 (12:07 +0000)]
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

8 years agoRenaming a variable, for contrast and correctness.
Benno Schulenberg [Tue, 23 Feb 2016 08:31:57 +0000 (08:31 +0000)]
Renaming a variable, for contrast and correctness.

git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@5670 35c25a1d-7b9e-4130-9fde-d3aeb78583b8

8 years agoUsing the correct column number also when messages are skipped.
Benno Schulenberg [Mon, 22 Feb 2016 19:49:45 +0000 (19:49 +0000)]
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

8 years agoShowing the cursor in the edit window when linting.
Benno Schulenberg [Mon, 22 Feb 2016 18:34:04 +0000 (18:34 +0000)]
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

8 years agoMaking the cursor visible again after a justification and after an
Benno Schulenberg [Mon, 22 Feb 2016 17:15:28 +0000 (17:15 +0000)]
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

8 years agoAs the charmove() already copies the terminating null byte,
Benno Schulenberg [Mon, 22 Feb 2016 16:51:39 +0000 (16:51 +0000)]
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

8 years agoMake that kill_spaces_on_justify, add hilighting.
Chris Allegretta [Mon, 22 Feb 2016 15:23:57 +0000 (15:23 +0000)]
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

8 years ago2016-02-22 Chris Allegretta <chrisa@asty.org>
Chris Allegretta [Mon, 22 Feb 2016 15:10:32 +0000 (15:10 +0000)]
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

8 years agoEliding a variable -- there is no need to optimize for calls of strlen(),
Benno Schulenberg [Mon, 22 Feb 2016 14:26:05 +0000 (14:26 +0000)]
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

8 years agoNot moving too many bytes -- that is: not moving them beyond the
Benno Schulenberg [Mon, 22 Feb 2016 13:17:53 +0000 (13:17 +0000)]
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

8 years agoSorting the prev_word() and next_word() functions in the standard way:
Benno Schulenberg [Mon, 22 Feb 2016 12:49:08 +0000 (12:49 +0000)]
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

8 years agoThe amount to scroll is never zero, so there is no need to check.
Benno Schulenberg [Mon, 22 Feb 2016 09:55:59 +0000 (09:55 +0000)]
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

8 years agoCondensing some code by factoring out a repetition.
Benno Schulenberg [Mon, 22 Feb 2016 09:34:33 +0000 (09:34 +0000)]
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

8 years agoEliding the function free_openfilestruct() as it is used only once.
Benno Schulenberg [Mon, 22 Feb 2016 09:02:58 +0000 (09:02 +0000)]
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

8 years agoRemoving four unneeded checks for NULL.
Benno Schulenberg [Sun, 21 Feb 2016 20:54:04 +0000 (20:54 +0000)]
Removing four unneeded checks for NULL.

git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@5657 35c25a1d-7b9e-4130-9fde-d3aeb78583b8

8 years agoNot requiring a third Tab to show the list of possible completions
Benno Schulenberg [Sun, 21 Feb 2016 13:33:52 +0000 (13:33 +0000)]
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

8 years agoReducing an allocation to what is actually needed.
Benno Schulenberg [Sat, 20 Feb 2016 16:35:09 +0000 (16:35 +0000)]
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

8 years agoParsing a character in the correct buffer: in the first match
Benno Schulenberg [Sat, 20 Feb 2016 12:30:07 +0000 (12:30 +0000)]
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

8 years agoAvoiding a memory leak when tabbing on a string that doesn't occur in the
Benno Schulenberg [Sat, 20 Feb 2016 12:16:43 +0000 (12:16 +0000)]
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

8 years agoDeleting a debugging leftover.
Benno Schulenberg [Thu, 18 Feb 2016 20:10:02 +0000 (20:10 +0000)]
Deleting a debugging leftover.

git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@5652 35c25a1d-7b9e-4130-9fde-d3aeb78583b8

8 years agoAllowing the parameter of free_filestruct() to be NULL,
Benno Schulenberg [Thu, 18 Feb 2016 19:58:18 +0000 (19:58 +0000)]
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

8 years agoFixing Savannah bug #47127 the proper way,
Benno Schulenberg [Thu, 18 Feb 2016 16:31:02 +0000 (16:31 +0000)]
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

8 years agoDeleting two dead prototypes, adjusting two comments for correctness,
Benno Schulenberg [Tue, 16 Feb 2016 10:09:26 +0000 (10:09 +0000)]
Deleting two dead prototypes, adjusting two comments for correctness,
and two other minute tweaks.

git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@5649 35c25a1d-7b9e-4130-9fde-d3aeb78583b8

8 years agoDeleting a redundant assignment. The multidata pointer is already
Benno Schulenberg [Tue, 16 Feb 2016 09:06:21 +0000 (09:06 +0000)]
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

8 years agoAvoiding the loss a buffer when getcwd() fails.
Benno Schulenberg [Mon, 15 Feb 2016 16:24:39 +0000 (16:24 +0000)]
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

8 years agoFreeing not just the struct but also the data it contains,
Benno Schulenberg [Mon, 15 Feb 2016 12:56:18 +0000 (12:56 +0000)]
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

8 years agoSaying that the 2.5 branch is a "rolling" release, that lock files are done,
Benno Schulenberg [Sun, 14 Feb 2016 12:17:17 +0000 (12:17 +0000)]
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

8 years agoRenaming and condensing some stuff, and correcting the main comment,
Benno Schulenberg [Sun, 14 Feb 2016 12:03:47 +0000 (12:03 +0000)]
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

8 years agoDoing the copying of typed stuff from input to output just once.
Benno Schulenberg [Sun, 14 Feb 2016 11:16:54 +0000 (11:16 +0000)]
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

8 years agoRestoring the mentioned behavior also for the internal spell fixer.
Benno Schulenberg [Sun, 14 Feb 2016 10:29:48 +0000 (10:29 +0000)]
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

8 years agoMaking the iteration through replacement matches behave the same again as the
Benno Schulenberg [Sun, 14 Feb 2016 10:19:27 +0000 (10:19 +0000)]
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

8 years agoSwitching the cursor on and off at the appropriate moments (that is: when
Benno Schulenberg [Sat, 13 Feb 2016 19:41:12 +0000 (19:41 +0000)]
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