Commit Graph

775 Commits (eac0446c86bdad5376e6620718ce7cac4fc16d2a)

Author SHA1 Message Date
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
Benno Schulenberg 95e77a9d5f Renaming '*cut_till_end' to '*cut_till_eof', to reduce
confusion with CUT_TO_END, which is about end-of-line.
Patch by Mark Majeres.


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@5041 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2014-06-30 20:39:27 +00:00
Benno Schulenberg 7e5324d164 Making 'meta_key' and 'func_key' into global variables, instead of
having them declared everywhere and passing them around endlessly.


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@5039 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2014-06-30 18:04:33 +00:00
Benno Schulenberg 8ea830f79b When toggling softwrap, only the edit window needs to be refreshed,
not the entire screen.


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@5010 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2014-06-22 19:23:54 +00:00
Benno Schulenberg f80dcb2b25 Miscellaneous whitespace fixes, one type fix, and one more #ifdef NANO_TINY.
Patch by David Lawrence Ramsey.


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@5004 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2014-06-21 19:01:51 +00:00
Benno Schulenberg 3060ce36d3 Letting +1 and +,1 make nano start on line one column one, overriding
a position from history.  This fixes Savannah bug #42538.


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@5003 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2014-06-20 19:10:24 +00:00
Benno Schulenberg 1930e8102d Fixing compilation with --enable-tiny --enable-mouse.
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@5001 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2014-06-20 18:06:22 +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 fcb4c3fc6e Allowing --historylog and --poslog to function
also when --ignorercfiles is given.


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@4987 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2014-06-19 15:09:23 +00:00
Benno Schulenberg e7c690d577 Renaming 'no_more_space()' to 'more_space()' for consistency.
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@4985 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2014-06-19 11:58:11 +00:00
Benno Schulenberg 4f3f976030 Displaying "No file name" on the statusbar for two seconds
when --tempfile was given and the current buffer has no name.
This fixes Savannah bug #41750.  Patch by David Lawrence Ramsey.


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@4974 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2014-06-16 20:44:34 +00:00
Benno Schulenberg 0ec771009c Putting a common statement outside of the then/else branches.
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@4969 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2014-06-16 12:40:14 +00:00
Benno Schulenberg 99a649ddf6 Avoiding an "Unknown Command" on every cursor-positioning mouse click.
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@4968 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2014-06-16 12:30:35 +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 3af22aad8d Letting a toggle not break a series of ^Ks.
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@4962 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2014-06-13 12:28:33 +00:00