Commit Graph

789 Commits (e0d0ca4b97143fb2846362c40d747c320a3af39d)

Author SHA1 Message Date
Benno Schulenberg e0d0ca4b97 Renaming a variable for clarity.
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@5438 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2015-11-24 13:28:32 +00:00
Benno Schulenberg fbe4376822 Inserting a new node into a linked list by using just two parameters:
the insertion point and the new node.


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@5437 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2015-11-24 13:24:01 +00:00
Benno Schulenberg f08d79d204 Making Ctrl+Left and Ctrl+Right work on more terminals by asking
ncurses for the keycodes.  This addresses Debian bug #800681.


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@5434 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2015-11-23 08:52:23 +00:00
Benno Schulenberg 72caa54020 Deleting a node right after unlinking it.
This now mirrors unlink_opennode() and delete_opennode().


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@5433 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2015-11-22 16:14:42 +00:00
Benno Schulenberg 6007d6227b Rewrapping, rewriting, renaming, and reordering some things.
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@5431 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2015-11-22 16:08:28 +00:00
Benno Schulenberg 1f027a838e Letting the value of a --fill option on the command line
override the value of a "set fill" option in an rcfile.
This fixes Savannah bug #46492.


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@5428 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2015-11-21 19:44:27 +00:00
Benno Schulenberg 54c2f6b5ae Chopping the now unused parameter 'undoing'.
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@5401 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2015-11-11 19:04:31 +00:00
Benno Schulenberg df80bfd2fc Improving comments and combining two conditions.
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@5385 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2015-10-31 20:17:09 +00:00
Benno Schulenberg 4a1835fd93 Refreshing the mark's pointer only when it is on the same line as the cursor,
and recalculating the mark's x coordinate only when the mark comes after it.
Also correcting the recalculation in one case.


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@5384 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2015-10-31 19:03:53 +00:00
Benno Schulenberg 0d9397e5b0 Making ^O work the same way as under Pico when option -t is given:
writing out the file immediately, without prompting.
Patch by David Lawrence Ramsey.


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@5378 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2015-10-29 10:36:07 +00:00
Benno Schulenberg 8925eabd5e Not bothering to set things to NULL when they will be initialized right away,
nor bothering with a separate initialization function when it's used only once.


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@5365 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2015-08-16 15:21:32 +00:00
Benno Schulenberg 149b1fe439 Removing some duplication in the initialization of a new openfile node.
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@5364 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2015-08-16 13:05:35 +00:00
Benno Schulenberg f5234e583f Making a message sound more definitive instead of temporary.
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@5351 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2015-08-09 18:12:32 +00:00
Benno Schulenberg ea2b51a41d Removing an unneeded and mistaken condition:
if something should be blanked, then both.


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@5350 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2015-08-09 18:10:13 +00:00
Benno Schulenberg eac0446c86 Fixing compilation with --enable-tiny: file formats don't exist then.
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@5349 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2015-08-09 16:31:01 +00:00
Benno Schulenberg 90798fbfba Allowing to toggle whitespace display also when support for nanorc files
has not been built in, since the default values are quite usable.


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@5348 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2015-08-09 16:05:50 +00:00
Benno Schulenberg 30daf4d43f Letting malloc() help to find initialization failures and uses-after-free.
Change was suggested by Mike Frysinger.


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@5345 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2015-08-06 09:01:33 +00:00
Benno Schulenberg 70cbbda87c Adding the option --unix (and 'set unix'),
to save a file by default in Unix format.


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@5342 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2015-08-04 18:49:57 +00:00
Benno Schulenberg ace151778b Adding "and exit" to the description of --help, for veracity, to match
--version, and to distinguish it more from the description of ^G.


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@5337 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2015-08-01 08:47:38 +00:00
Benno Schulenberg e919c22793 Setting each multiline-color value instead of OR-ing it.
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@5335 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2015-08-01 08:35:14 +00:00
Benno Schulenberg 20ba559b9f Providing feedback for ^Z when suspension is not enabled.
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@5333 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2015-07-30 20:15:01 +00:00
Benno Schulenberg 6847616aee Differentiating between something being disabled/restricted and
help texts being unavailable.


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@5331 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2015-07-30 18:10:16 +00:00
Benno Schulenberg 104ea6b0c3 Normalizing whitespace after the preceding changes.
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@5330 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2015-07-30 11:29:45 +00:00
Benno Schulenberg efbf7b6ef3 Making the four toggles that don't have any effect in restricted mode
say that they're disabled.


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@5328 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2015-07-29 20:21:45 +00:00
Benno Schulenberg 5885e34b23 Not showing options that don't have any effect when asking for --help in
restricted mode.


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@5327 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2015-07-29 19:31:50 +00:00
Benno Schulenberg bff6a905af Reenabling SIGWINCH-es also when invocation of the formatter fails,
and correcting some comments.


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@5324 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2015-07-28 19:39:34 +00:00
Benno Schulenberg d52f108526 Adjusting some comments for clarity and accuracy, and rewrapping some lines.
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@5312 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2015-07-19 09:25:25 +00:00
Benno Schulenberg 9dc544acbd Accepting again a +LINE argument for each file given on the command line,
instead of only for the first.


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@5311 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2015-07-19 09:01:59 +00:00
Benno Schulenberg 74e7521478 Adjusting some comments.
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@5308 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2015-07-18 10:32:01 +00:00
Benno Schulenberg cadb4f3689 Unabbreviating the long option --poslog to --positionlog.
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@5300 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2015-07-15 19:50:55 +00:00
Benno Schulenberg 79526151d5 Unabbreviating the long option --const to --constantshow.
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@5299 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2015-07-15 19:40:37 +00:00
Benno Schulenberg ea4b775a3e Eliding an unneeded variable.
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@5289 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2015-07-10 16:00:12 +00:00
Benno Schulenberg 9fcde23009 Plugging a small memory leak.
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@5287 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2015-07-10 15:54:06 +00:00
Benno Schulenberg 4499520c03 Removing the obsolete long option --undo, and sorting some things.
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@5265 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2015-06-20 18:48:43 +00:00
Benno Schulenberg c32a58a826 Not checking for non-NULL before freeing a variable, as it's unnecessary.
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@5249 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2015-06-14 19:14:41 +00:00
Benno Schulenberg 75d64e677e Handling a SIGWINCH (which signals a change in window size) not when it
happens but only when checking for keyboard input.  It now reports the
SIGWINCH via a special key value to the calling routine, to allow not
only the main editor but also the help viewer and the file browser to
adapt their display to the new size.
Patch by Mahyar Abbaspour, somewhat edited by Benno.


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@5228 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2015-05-28 13:02:29 +00:00
Benno Schulenberg a338798559 Adjusting a few comments and line wrappings.
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@5222 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2015-05-03 13:56:51 +00:00
Benno Schulenberg 1cf22d4d4f Initializing the search and replace strings in a central place.
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@5212 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2015-04-21 18:42:11 +00:00
Benno Schulenberg 296152ec67 Making the descriptions of the multibuffer feature more accurate.
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@5205 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2015-04-18 16:07:53 +00:00
Benno Schulenberg 0b6d6f45d2 Normalizing some whitespace.
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@5166 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2015-03-27 13:46:50 +00:00
Benno Schulenberg 3345e3407d Normalizing some whitespace, removing an old comment,
and placing another one better.


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@5141 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2015-03-20 11:18:22 +00:00
Benno Schulenberg 4d9b5e92b3 Getting out if there is nothing to renumber,
to prevent do_undo() from falling over when trying to renumber emptiness.
Patch basically by Mark Majeres.


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@5137 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2015-03-14 15:59:01 +00:00
Benno Schulenberg 18a2edfb84 Dropping compile time from version information to enable a reproducible
build.  Proposed by Jérémy Bobbio and Jordi Mallach.


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@5136 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2015-03-08 20:14:10 +00:00
Benno Schulenberg 03bcaf6067 Fixing compilation with --enable-tiny plus --enable-nanorc.
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@5133 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2015-03-08 12:10:52 +00:00
Benno Schulenberg 57fa775f25 Updating the copyright years to include 2015.
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@5107 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2015-02-01 09:32:02 +00:00
Chris Allegretta 5b1fb56a8f Take 2 at file locking fixes. New args to close_buffer() and
switch_to_prevnext_buffer() to support message passthrough
when trying to lock files using multibuffer.



git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@5105 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2015-01-20 06:15:34 +00:00
Benno Schulenberg 2394e52ebc Making sure line renumbering starts far enough back after
undoing a cut or paste.  And fixing two memory leaks.
Patch by Mark Majeres.


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@5067 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2014-07-16 08:46:42 +00:00
Benno Schulenberg 92213f9de8 Handling the cases of cutting-from-cursor-to-end-of-line
(that is, when CUT_TO_END is set) properly.
Patch by Mark Majeres.


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@5054 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2014-07-02 20:29:57 +00:00
Benno Schulenberg 85ddc718f8 Properly excluding the --quiet option when --disable-nanorc was given.
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@5053 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2014-07-02 19:57:23 +00:00
Benno Schulenberg 49816fed70 Now that 'currmenu' is really global, stop passing it around.
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@5043 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2014-07-01 10:41:10 +00:00