Commit Graph

2982 Commits (3522751c6b3a30abd8a4b12107203270490099a8)

Author SHA1 Message Date
Benno Schulenberg 427eff6780 Adjusting some comments and whitespace.
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@5360 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2015-08-16 09:14:42 +00:00
Benno Schulenberg 5440796f31 Reducing the scope of a variable.
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@5359 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2015-08-16 08:49:29 +00:00
Benno Schulenberg a9aa0ef997 Avoiding wide paragraphs of running text in the help screens,
wrapping them at 74 columns if the screen is wider.


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@5358 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2015-08-16 08:43:56 +00:00
Benno Schulenberg f811846dc5 Allowing to change the file format in restricted mode, but actually disabling
Appending, Prepending, making Backups, and opening the File Browser.


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@5357 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2015-08-13 19:29:55 +00:00
Benno Schulenberg 8a058d1f9a Speeding up the finding of the longest filename in the current folder.
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@5356 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2015-08-13 18:22:29 +00:00
Benno Schulenberg 677e9474f7 Removing the mistaken comparison between a pointer and a literal character.
(It will always be false, so it is apparently unneeded.)


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@5355 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2015-08-13 17:46:19 +00:00
Benno Schulenberg 58a0ddebac Not bothering to reset any state, because UTF-8 is a stateless encoding.
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@5354 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2015-08-12 19:27:13 +00:00
Benno Schulenberg 07fdf46154 Avoiding a possibly erroneous message, because failing to delete
the temporary file does not mean that copying failed.


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@5353 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2015-08-11 17:43:08 +00:00
Benno Schulenberg c9337dd4ed Avoiding a call of copy_file() with a null pointer.
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@5352 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2015-08-11 17:27:30 +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 2a5bd555e7 Putting in the null byte "manually", and only when using UTF-8.
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@5347 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2015-08-08 08:10:57 +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 95e1f55574 Plugging a tiny leak.
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@5341 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2015-08-03 19:52:48 +00:00
Benno Schulenberg 455fb4f063 Plugging a memory leak.
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@5340 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2015-08-03 08:32:52 +00:00
Benno Schulenberg 3d2784e113 Checking the value of shortcut->toggle only if it actually is a toggle.
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@5339 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2015-08-03 08:03:22 +00:00
Benno Schulenberg 8a06dfa4d7 Initializing also openfile->syntax.
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@5338 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2015-08-02 20:27:45 +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 45f873a6a7 Showing also the dedicated keys in the ^G help text,
to clarify some keys and to see which ones can be rebound.


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@5336 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2015-08-01 08:41:36 +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 b3e4051ded Adding two new bindable functions which delete all characters
from the cursor to the preceding or succeeding word start.


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@5334 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2015-07-31 11:52:26 +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 b7f7df93df Changing "Justify" to a tag and regrouping a couple.
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@5332 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2015-07-30 19:51:08 +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 2ee18d635f Not showing ^R and ^T in the help lines in restricted mode (if possible),
to give visual feedback.


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@5329 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2015-07-30 10:37:28 +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 e4294a211e It is better to say that this function is disabled
than that no linter has been defined.


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@5326 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2015-07-29 17:36:39 +00:00
Benno Schulenberg 0b15c42a5c Dropping two superfluous checks for restricted mode, and
two superfluous checks for the definition of a formatter.


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@5325 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2015-07-28 20:04:18 +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 c7f5691637 Making the calculation of the new line size more efficient and symmetrical,
and renaming two variables in the process.


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@5323 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2015-07-26 17:29:34 +00:00
Benno Schulenberg 17ab9a2dba Improving a few comments.
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@5322 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2015-07-26 17:04:29 +00:00
Benno Schulenberg f7e8861770 Tweaking a string, to match the --help text.
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@5321 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2015-07-26 09:29:42 +00:00
Benno Schulenberg 4990f74f83 Adding two new bindable functions that repeat the last search command
in a fixed direction without prompting.


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@5320 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2015-07-26 09:23:24 +00:00
Benno Schulenberg 8ffc33cd89 Finding each zero-length match only once, when doing regex replacements.
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@5319 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2015-07-26 08:20:28 +00:00
Benno Schulenberg ee7b095678 Adding a new bindable function that writes a file to disk without
first asking for its name.  Patch was suggested by Seiya Nuta.


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@5318 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2015-07-25 19:25:50 +00:00
Benno Schulenberg b967368d41 Finding only valid UTF-8 byte sequences when searching.
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@5316 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2015-07-23 19:18:25 +00:00
Benno Schulenberg 474b390816 Plugging a few memory leaks.
Patch by Mike Frysinger.


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@5314 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2015-07-22 18:02:36 +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 3f1878d9a9 Looking for a new start only after an end,
instead of right after the last start.


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@5307 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2015-07-18 07:34:27 +00:00
Benno Schulenberg 6039cd7f6e Avoiding an unfounded warning about a possibly uninitialized variable.
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@5306 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2015-07-17 21:11:32 +00:00
Benno Schulenberg 1dc298d28b Removing an earlier attempt at making M-W work at startup.
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@5305 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2015-07-17 21:06:46 +00:00
Benno Schulenberg 98ffb642f3 Verifying that a named and existing file is a normal file, to avoid
opening an empty buffer when the name of a directory is specified. 


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@5304 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2015-07-17 20:40:44 +00:00
Benno Schulenberg 8cde95e170 Using the proper type (off_t) for the size of a file,
and avoiding warnings about too large bit shifts.
Patch by Mike Frysinger.


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@5303 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2015-07-17 19:38:22 +00:00
Benno Schulenberg 1f866c29db Renaming the 'menu' item to 'menus' in the shortcut struct.
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@5301 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2015-07-15 20:13:05 +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 5e53c6ee9e Preventing a segfault when spellchecking a marked region
and nonewlines isn't set.


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@5298 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2015-07-13 18:04:05 +00:00
Benno Schulenberg 42f307ef75 (Putting in the original patch, from before I got overzealous.)
Removing an unneeded condition -- 'added_magicline' can only be
true when NO_NEWLINES isn't.


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@5297 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2015-07-13 17:57:58 +00:00
Benno Schulenberg 674ab835e8 Arh! I tested that without actually making any spell correction.
That wasn't very clever.


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@5296 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2015-07-13 05:32:17 +00:00
Benno Schulenberg badbc676fb Removing a stray space from a statusbar message.
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@5295 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2015-07-12 19:31:08 +00:00
Benno Schulenberg aee86996de Renaming the variable 'totsize_save' to 'size_of_surrounding',
to better describe what it contains.


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@5294 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2015-07-12 19:27:26 +00:00
Benno Schulenberg 3d01486409 Removing the variable 'added_magicline', as it will always be FALSE
and thus will never cause anything to be done.


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@5293 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2015-07-12 19:20:46 +00:00
Benno Schulenberg 5bb096d32f Rearranging a few lines plus some whitespace.
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@5292 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2015-07-10 17:49:30 +00:00
Benno Schulenberg aff252aed6 Removing two lines of dead code.
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@5291 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2015-07-10 17:42:32 +00:00
Benno Schulenberg 08d9f572a4 Unwrapping some lines and rewrapping some others in a more congenial manner;
tweaking some comments and whitespace and braces.


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@5290 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2015-07-10 17:25:51 +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 93e391eba3 Renaming a variable.
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@5288 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2015-07-10 15:57:49 +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 6095ff3d39 Adjusting whitespace and bracings after the previous changes.
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@5286 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2015-07-06 19:17:27 +00:00
Benno Schulenberg fc7825d00d Not removing and then re-adding the magic line when a Backspace happens
at the end-of-file; just adding a token undo item to be able to put the
cursor back at the very tail of the file.


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@5285 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2015-07-06 19:08:13 +00:00
Benno Schulenberg 8f5fa24e51 Moving the check for a Delete at the end-of-file to a less frequently
travelled code path.


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@5284 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2015-07-06 18:48:15 +00:00
Benno Schulenberg 619666460e Making it more transparent what WAS_FINAL_BACKSPACE does.
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@5283 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2015-07-06 18:03:14 +00:00
Benno Schulenberg 5ac6a87522 Giving each toggle a sequence number, to be able to show them in a fixed order.
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@5282 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2015-07-06 17:51:17 +00:00
Benno Schulenberg 953ccc990f Unwrapping some lines, rewrapping some others more logically,
plus several other esthetic tweaks.


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@5275 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2015-06-28 14:12:25 +00:00
Benno Schulenberg 296ff1ed2a Not checking again for a condition that was checked before.
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@5274 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2015-06-28 14:04:03 +00:00
Benno Schulenberg 6062a040e1 Limiting the selected file to the available ones in the list.
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@5273 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2015-06-28 06:32:56 +00:00
Benno Schulenberg 954f98c448 Removing a duplicate binding of ^T, to prevent it being shown twice.
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@5272 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2015-06-27 15:58:20 +00:00
Benno Schulenberg 076fcbf631 Removing the obsolete execute flag from the shortcut struct.
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@5271 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2015-06-27 15:47:39 +00:00
Benno Schulenberg 38e8ed14ca Normalizing the whitespace and some comments in src/files.c.
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@5270 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2015-06-27 15:10:58 +00:00
Benno Schulenberg ecffb85656 Forgetting the case of an empty filename for replace_buffer(),
and not bothering to put the pointer at the top.


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@5269 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2015-06-27 15:03:45 +00:00
Benno Schulenberg f0bb50306c Renaming three flags for clarity.
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@5268 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2015-06-27 09:27:19 +00:00
Benno Schulenberg 412b9fc0a2 Skipping the undo of a backspace *only* when it really
tried to delete the final, magic newline.


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@5267 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2015-06-27 09:17:36 +00:00
Benno Schulenberg 75ac24b25e Verifying that there exists multidata for the found starting line
before trying to use this multidata -- when a file is inserted, all
its lines will not have any multidata associated with them.


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@5266 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2015-06-23 18:06:30 +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 57f52a8a20 Reverting the last commit, as it is making things worse:
backspacing at the tail of the file no longer has any efffect.


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@5263 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2015-06-20 09:42:26 +00:00
Benno Schulenberg e219bb9dba Not deleting the magic line, instead of removing and then re-adding it.
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@5262 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2015-06-20 09:00:22 +00:00
Benno Schulenberg e06472a249 Keeping homedir NULL when no home directory could be determined,
so that nano will show a message about it.


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@5259 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2015-06-20 08:21:35 +00:00
Benno Schulenberg a267699440 Making M-W work also right after startup.
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@5258 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2015-06-20 08:10:25 +00:00
Benno Schulenberg 025553769e Deleting two unused things, and adding two comments.
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@5257 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2015-06-18 19:07:56 +00:00
Benno Schulenberg 7c2f53b2a9 Allowing a tiny nano to enable search and position histories.
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@5256 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2015-06-18 18:51:27 +00:00
Benno Schulenberg 3021a04c1c Improving the visibility of the undo-related debugging messages.
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@5255 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2015-06-17 15:17:09 +00:00
Benno Schulenberg 86cbd959f6 Renaming the parameter 'current_action' to 'action',
in order to match the other functions.


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@5254 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2015-06-17 11:18:20 +00:00
Benno Schulenberg ef2593695d Oops! Misplaced a closing parenthesis.
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@5253 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2015-06-17 11:12:42 +00:00
Benno Schulenberg 6404101407 Eliding an unneeded variable and correcting two comments.
And putting the more frequent condition first.


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@5252 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2015-06-17 10:59:16 +00:00
Benno Schulenberg 67667af233 Adjusting whitespace after the previous change.
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@5251 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2015-06-17 10:47:00 +00:00
Benno Schulenberg 82373d85f9 Preventing the addition of an extra newline when undoing a Backspace or Delete
at the tail of the file while nonewlines is not set.


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@5250 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2015-06-17 10:41:57 +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 26ae9dbd12 Not bothering to look for any starting matches on the current line
when the whole line has already been coloured.


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@5248 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2015-06-14 18:06:36 +00:00
Benno Schulenberg d49c267f91 Skipping to the next step when a found start has been qualified as
an end earlier.  This helps with Python's triple-quoted strings.


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@5247 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2015-06-14 17:56:44 +00:00
Benno Schulenberg 2e121fa08c Adding some debugging code to track which multidata codes get assigned.
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@5246 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2015-06-14 15:58:57 +00:00
Benno Schulenberg e00b3e8587 Making it easy to see what codes a key stroke produces when debugging.
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@5245 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2015-06-11 19:01:28 +00:00
Benno Schulenberg a1c4da8b04 Fixing compilation with --enable-tiny.
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@5239 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2015-06-04 17:59:50 +00:00
Benno Schulenberg 40bfc729ca Preventing a floating-point exception when the available length
for an answer becomes zero.  The answer will instead wrap to the
next line, which does not look nice but is better than crashing.
Patch by Mahyar Abbaspour.


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@5235 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2015-05-31 08:45:17 +00:00
Benno Schulenberg 2661d6d397 Using 'width' instead of hardcoded 16. And doing things in the same order
for all three cases: setting the string and then positioning the cursor.


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@5230 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2015-05-28 13:51:03 +00:00
Benno Schulenberg 59187b8051 Normalizing the whitespace after the recent changes in logic.
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@5229 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2015-05-28 13:28:37 +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 f111c0d6ab Limiting the number of backup files to one hundred thousand, well
before finding a unused filename takes an annoying amount of time.


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@5225 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2015-05-08 21:11:30 +00:00
Benno Schulenberg 55d1e1a9b8 Taking the distant possibility of terabyte files into account,
and in the bargain getting rid of the need to calculate the
number of digits in UINT_MAX.


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@5224 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2015-05-08 19:35:47 +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 46464105f2 Displaying an ellipsis only when the filename is longer than
the available space, not when it still fits.


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@5221 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2015-05-03 13:25:24 +00:00
Benno Schulenberg 7f3bd26593 Unwrapping a bunch of comments.
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@5220 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2015-04-28 20:09:40 +00:00
Benno Schulenberg ec8d51bee3 Matching the file regex of a syntax against the absolute,
canonical path instead of against the path the user gave.
This fixes Savannah bug #44288, reported by Mike Frysinger.


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@5218 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2015-04-28 19:18:38 +00:00
Benno Schulenberg df7524d7e8 Renaming the parameter 'whole_word' to 'whole_word_only',
because the first sounds too much like "found_whole" to me.


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@5216 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2015-04-25 15:26:09 +00:00
Benno Schulenberg b454d9c89b Deleting an always-FALSE parameter.
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@5215 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2015-04-25 15:17:22 +00:00
Benno Schulenberg af708843f6 Removing the unintended special case for replacing
multiple occurrences of a literal ^ or $.


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@5214 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2015-04-25 14:52:58 +00:00
Benno Schulenberg ca1983adb4 Eliding another tiny function.
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@5213 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2015-04-21 18:47:58 +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 583a30e971 Saving and restoring the global flags the short and quick way.
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@5211 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2015-04-21 17:37:59 +00:00
Benno Schulenberg 6bdcc8faa9 Saving the settings of the global case-sens, direction, and regexp flags,
and restoring them on exit.


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@5210 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2015-04-21 17:27:33 +00:00
Benno Schulenberg e68759bf12 Deleting redundant reprises of a bol/eol regular-expression search.
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@5209 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2015-04-20 18:01:06 +00:00
Benno Schulenberg ec0e0235fa Renaming a function to the simpler 'need_statusbar_update()'
as there is no vertical counterpart.


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@5208 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2015-04-20 08:35:41 +00:00
Benno Schulenberg 7edd350593 Fusing two identical functions into one: need_screen_update().
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@5207 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2015-04-20 08:16:41 +00:00
Benno Schulenberg 455a918071 Making sure an invalid starting byte of a multibyte sequence is properly
terminated, to prevent the displaying of ghost characters.


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@5206 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2015-04-18 20:07:31 +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 cc65a42035 Arranging the movement keys in the File Browser in the order of
ascending stride, as in the Help Viewer.


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@5202 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2015-04-17 10:06:03 +00:00
Benno Schulenberg 5b83d7df51 Binding the unbound Home and End keys to goto_top and goto_bottom in the
Help Viewer and the File Browswer, to mimic the behaviour of these keys
in file viewers and web browsers.


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@5201 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2015-04-17 09:42:04 +00:00
Benno Schulenberg f225991b05 Distinguishing a failure to launch the linter from receiving 0 parsable lines.
Adding a new function to glue together the invocation-error string.


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@5199 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2015-04-17 09:24:17 +00:00
Benno Schulenberg fd759d5ca3 Fixing compilation with --enable-tiny (oops), and mentioning
also the Savannah page as a place for reporting bugs.


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@5195 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2015-04-13 10:59:12 +00:00
Benno Schulenberg 1cf9deb603 Using mallocstrcpy() in a correct manner and
not letting it free an unrelated string.


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@5193 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2015-04-12 11:15:57 +00:00
Benno Schulenberg 4e5ea18394 Removing an unused variable, and adjusting the introductory comment
for the recently tweaked logic.


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@5192 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2015-04-12 09:04:30 +00:00
Benno Schulenberg 4e9b3687ba Rebinding ^Y and ^V in the WhereisFile menu
to the effective and consistent first_file() and last_file().


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@5191 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2015-04-12 08:44:37 +00:00
Benno Schulenberg 99d2358510 Stopping M-\ and M-/ in the WhereisFile menu from doing also an
unrequested search after having performed their function.
Fixes Savannah bug #44790.


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@5190 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2015-04-12 08:31:53 +00:00
Benno Schulenberg 08a52c1dab Not splitting off the marked region into a separate partition, but
doing the replacings in situ in the current one, to fix an undo bug.


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@5189 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2015-04-11 15:21:08 +00:00
Benno Schulenberg ce48ca2223 Correcting and adjusting some comments.
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@5188 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2015-04-08 19:57:31 +00:00
Benno Schulenberg 2dc9cbefd3 Renaming some things, for more contrast or to be more fitting.
And condensing the renamed function, and making it void because
the result isn't used anyway.


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@5187 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2015-04-08 18:40:40 +00:00
Benno Schulenberg ab21161a69 Eliding another miniscule function.
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@5184 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2015-04-07 14:24:18 +00:00
Benno Schulenberg d8b6dbfffe Letting bottombars() set the global variable 'currmenu'.
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@5183 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2015-04-07 14:16:07 +00:00
Benno Schulenberg d5177059e8 Greatly simplifying the searching for the next matching filename.
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@5182 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2015-04-07 13:34:12 +00:00
Benno Schulenberg a9647b0508 Avoiding to set 'focusing' when searching for filenames;
it should be set only when searching/replacing text.


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@5181 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2015-04-07 11:04:32 +00:00
Benno Schulenberg 37fd348a1d Eliding a miniscule function, and renaming a variable for clarity.
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@5180 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2015-04-07 10:41:00 +00:00
Benno Schulenberg 2aac470cb9 Consistently using the appropriate variable in the appropriate function.
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@5179 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2015-04-07 08:44:24 +00:00
Benno Schulenberg 25ce5f6759 Removing an unfitting comment and tweaking some others.
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@5178 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2015-04-07 08:23:52 +00:00
Benno Schulenberg 5d0b267aaa Not searching for the empty string when nothing was sought yet
in the file browser (when historylig is set).


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@5177 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2015-04-07 08:19:04 +00:00
Benno Schulenberg d7ade1f346 Ignoring magic without libmagic, and ignoring formatter without spell checking.
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@5175 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2015-04-03 17:28:30 +00:00
Benno Schulenberg de53c53c6e Removing two superfluous #ifndefs.
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@5174 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2015-04-03 15:57:22 +00:00
Benno Schulenberg 7fe830fd20 Only scrolling the required number of lines
when pasting lines onto the bottom line.


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@5171 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2015-03-28 17:11:28 +00:00
Benno Schulenberg 07e199ff0e When searching, put a found off-screen string on the center line
instead of at the bottom or top, to show it in context.


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@5170 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2015-03-28 17:01:46 +00:00
Benno Schulenberg 6f2da6b9b2 Adjusting the end point of the marked region to compensate
for any change in length of the region's last line.
Patch by Mark Majeres.


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@5169 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2015-03-27 20:16:36 +00:00
Benno Schulenberg 14a9c8aa0b Treating the formatter like a speller,
to fix compilation with --disable-speller.
This fixes Savannah bug #44607.


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@5168 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2015-03-27 16:55:49 +00:00
Benno Schulenberg 52d7d5f55a The linter is only available when colour is.
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@5167 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2015-03-27 15:34:41 +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 0a79c78e05 Removing two unneeded calls to edit_refresh(), to greatly speed up nano
when doing a Replace All with *lots* of occurrences.


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@5165 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2015-03-27 11:29:23 +00:00
Benno Schulenberg ad827a6aef Adjusting some whitespace and wrapping.
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@5164 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2015-03-27 10:49:19 +00:00
Benno Schulenberg b455fa3a16 Allowing to rebind the linter when nano was configured with --disable-speller.
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@5162 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2015-03-25 19:33:00 +00:00
Benno Schulenberg ff4a457d82 Removing unneeded statement -- nothing has changed the value of 'currmenu'.
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@5161 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2015-03-25 16:23:45 +00:00
Benno Schulenberg eae9f282de Removing a mistaken menu name -- as the formatter allows no interaction
it needs no associated menu.


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@5160 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2015-03-25 16:20:45 +00:00
Benno Schulenberg a37ebcf2f8 Not unsetting the mark before the possible bailout for zero size.
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@5156 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2015-03-23 17:12:49 +00:00
Benno Schulenberg 92142bed34 Avoiding a spell-check error when the marked region is zero bytes long.
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@5155 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2015-03-23 17:01:25 +00:00
Chris Allegretta a0a0556993 2015-02-25 Chris Allegretta <chrisa@asty.org>
* src/text.c (do_alt_speller): timestamp can just be a __time_t.
        Fixes compilation on win32.



git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@5153 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2015-03-23 04:32:45 +00:00
Benno Schulenberg 2456dd2a85 Not centering the current line when smooth scrolling is used.
This fixes Savannah bug #42654.


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@5149 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2015-03-22 13:23:42 +00:00
Benno Schulenberg a44cf41d37 Stepping backward or forward not simply one byte
but one character (possibly multibyte).
This fixes Savannah bug #42175.


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@5148 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2015-03-22 11:42:29 +00:00
Benno Schulenberg 76e7aaf514 Starting to look for a multibyte character not at the start of the string,
but only as far back as such a character can possibly be.
Speedup suggested by Mark Majeres.


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@5147 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2015-03-22 11:20:02 +00:00
Benno Schulenberg cb776fad88 Placing some comments better and unwrapping some lines.
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@5146 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2015-03-21 21:40:56 +00:00
Benno Schulenberg a4f28694c8 Removing some leftovers after Mark's patch.
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@5145 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2015-03-21 21:13:03 +00:00
Benno Schulenberg 82d737ee6d Restoring the positions of the mark and the cursor in a better way.
Patch by Mark Majeres.


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@5144 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2015-03-21 21:02:13 +00:00
Benno Schulenberg 138add24c8 Keeping related items together in the ^G help screen.
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@5143 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2015-03-20 12:22:49 +00:00
Benno Schulenberg 532d55c8bd Making a message equal to another one.
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@5142 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2015-03-20 11:37:53 +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 52d1c20973 Not setting the modified flag when an external spell checker
didn't make any changes.


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@5140 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2015-03-17 20:10:59 +00:00
Benno Schulenberg 69d26c35fb Fixing a mistaken message plus a few comments too.
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@5138 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2015-03-14 20:17:21 +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 79ff393dc2 Fixing the rebinding of toggles.
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@5134 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2015-03-08 15:42:52 +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
Chris Allegretta 184cf609c0 2015-02-25 Chris Allegretta <chrisa@asty.org>
* src/rcfile.c (parse_binding): Add exception for do_toggle as
        rebinding toggles broke with r5022.



git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@5124 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2015-02-25 19:04:53 +00:00
Benno Schulenberg 1b65b19abd The user does the editing, not the editor. So rephrasing.
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@5118 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2015-02-15 16:28:08 +00:00
Benno Schulenberg 35cd49ec50 Also showing the name of the affected file when finding a lock file,
for when many files are opened at once.


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@5117 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2015-02-15 16:20:09 +00:00
Chris Allegretta 86c6cd1725 2015-02-03 Alex Henrie <alexhenrie24@gmail.com>
* src/cut.c (do_cut_text): Make sure to set modified even when
        using --enable-tiny.



git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@5112 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2015-02-03 22:49:57 +00:00
Benno Schulenberg bd98ff02f6 Avoiding to trim the nano version number on the status bar.
Patch by Kamil Dudka.


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@5111 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2015-02-01 10:07:08 +00:00
Benno Schulenberg 057ef182cd Avoiding to print a wrong PID on the status bar.
Patch by Kamil Dudka.  Bug reported by Don Swaner.


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@5110 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2015-02-01 09:58:02 +00:00
Benno Schulenberg 67cdd5ee1e Making sure that 'lockprog' and 'lockuser' are properly terminated.
Patch by Kamil Dudka.


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@5109 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2015-02-01 09:48:50 +00:00
Benno Schulenberg 92896a708d Avoiding to write uninitialized bytes to the lock file.
Patch by Kamil Dudka.


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@5108 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2015-02-01 09:39:27 +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
Benno Schulenberg 8d53aa3ad2 Adding a general entry for all translators plus the TP.
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@5106 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2015-02-01 09:19:58 +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
Chris Allegretta 6948d2e779 2015-01-13 Chris Allegretta <chrisa@asty.org>
* src/files.c (open_buffer): Check here for locking and properly
        handle choosing to not open a file when locked instead of in
        open_file().  Fixes Savannah bug 42373 reported by Benno Schulenberg



git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@5104 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2015-01-14 02:36:30 +00:00
Chris Allegretta 4b3f2771b5 2015-01-03 Chris Allegretta <chrisa@asty.org>
* New formatter code to support syntaxes like
        go which have tools to automatically lint and reformat the text for
        you (gofmt), which is lovely.  rcfile option formatter, function
        text.c:do_formatter() and some other calls.



git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@5100 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2015-01-03 07:24:17 +00:00
Benno Schulenberg a44def03a0 Adding Mark to the scroll.
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@5099 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2014-12-28 22:27:56 +00:00
Benno Schulenberg 9f1b1e2b14 Removing the names of past translators from the Easter-egg scroll.
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@5098 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2014-12-28 22:23:31 +00:00
Benno Schulenberg e99f0b609b Gettextizing the "File being edited" prompt,
and improving its wording.


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@5097 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2014-12-28 21:58:27 +00:00
Benno Schulenberg 97a5d1270a Replacing the old get_shortcut() wrapper with the new func_from_key().
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@5094 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2014-08-29 20:03:58 +00:00
Benno Schulenberg cf9f32b009 Reordering a few things, and adjusting some whitespace.
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@5086 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2014-07-31 20:49:32 +00:00
Benno Schulenberg fcd4468f90 Adjusting some indentation.
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@5085 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2014-07-31 20:44:19 +00:00
Benno Schulenberg 7239fda971 Using still further the func_from_key() wrapper instead of get_shortcut().
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@5084 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2014-07-27 21:07:15 +00:00
Benno Schulenberg 47dffa483f Using still more the func_from_key() wrapper instead of get_shortcut().
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@5083 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2014-07-27 20:16:28 +00:00
Benno Schulenberg 266e0496ab Using the more direct func_from_key() wrapper instead of get_shortcut().
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@5082 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2014-07-27 19:32:03 +00:00
Benno Schulenberg dbb5e7cd8e Moving first_sc_for() next to its sister function too.
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@5081 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2014-07-27 19:23:41 +00:00
Benno Schulenberg 80750632d0 Moving strtokeytype() next to its sister function.
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@5080 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2014-07-27 19:18:00 +00:00
Benno Schulenberg d23283e249 Removing the now unused and unneeded addition ability to the shortcut list.
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@5079 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2014-07-27 19:13:46 +00:00
Benno Schulenberg a9fdfd0799 Normalizing some tabbing.
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@5068 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2014-07-16 08:53:16 +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 5dde918e24 Not speaking of "line wrap" but of "text add" when undoing/redoing
text additions that caused automatic line breaks.
Patch by Mark Majeres.


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@5064 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2014-07-11 19:14:25 +00:00
Benno Schulenberg 300e27745b Refixing a typo in a statusbar error message.
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@5063 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2014-07-11 18:35:08 +00:00
Chris Allegretta 733ca94f8e 2014-07-11 Chris Allegretta <chrisa@asty.org>
* src/files.c (do_lockfile, open_file): If locking fails,
        allow the lock failure message to be preserved AND
        preserve the filename passed on the cmdline.  Fixes
        Savannah bug #42668.



git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@5059 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2014-07-11 11:16:15 +00:00
Chris Allegretta a9c3bbf8e0 files.c:do_lockfile(): Actually reference the variable we're using for the dir.
Also name it more appropriately.



git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@5058 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2014-07-11 10:39:38 +00:00
Chris Allegretta 6d5b2fd936 2014-07-02 Chris Allegretta <chrisa@asty.org>
* src/files.c (do_lockfile): Check whether the directory
          of the file we're trying to lock exists, and make the
          resulting error message more intuitive.  Fixes
          Savannah bug 42639 by bens.



git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@5056 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2014-07-03 03:54:22 +00:00
Benno Schulenberg 637b76b582 Freeing the cutbuffer after use.
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@5055 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2014-07-02 20:52:27 +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 6c86ee1a5b Deleting old wrapper 'getfuncfromkey()', and replacing its call
with a call of the new wrapper 'func_from_key()'.


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@5052 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2014-07-02 19:12:38 +00:00
Benno Schulenberg 6418ffa289 Making use of the new wrapper in the help viewer and the file browser.
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@5051 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2014-07-02 09:29:05 +00:00
Benno Schulenberg 3933a30c9e Adding a typedef for a pointer to a function: functionptrtype.
And starting to use this to make the code a bit cleaner.


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@5050 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2014-07-02 08:47:09 +00:00
Benno Schulenberg e6a4a64619 Adding two defines to make the functions list clearer.
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@5049 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2014-07-01 18:52:21 +00:00
Benno Schulenberg b095725429 Now delete these case-sensitive, regular-expressive and backwards
file-searching capabilities again and all provisions for them.


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@5048 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2014-07-01 16:24:01 +00:00
Benno Schulenberg 4947ad83cb Showing that it is possible to have case-sensitive, regular-expressive,
and backwards searching in the file browser.


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@5047 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2014-07-01 15:42:08 +00:00
Benno Schulenberg ebcc68f51d Grouping the arguments better.
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@5046 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2014-07-01 11:50:35 +00:00
Benno Schulenberg 645841fd25 Not passing the menu but setting it earlier.
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@5045 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2014-07-01 11:42:28 +00:00
Benno Schulenberg 3cd3e32ec3 There are no tagless functions, so there is no need to check.
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@5044 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2014-07-01 10:52:07 +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 3b031b1bad Making sure to always set 'currmenu', so that we can rely on it.
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@5042 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2014-07-01 08:38:08 +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 776931a0b0 Fixing a bug where binding a movement function to a Meta key would make
the corresponding Arrow key stop working (producing a character instead).


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@5040 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2014-06-30 18:20:32 +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 eaf235f1e6 Moving some variables to a better place.
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@5038 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2014-06-30 17:49:53 +00:00
Benno Schulenberg e94a00a26c When there are no syntaxes, for example with --ignorercfiles,
do not try to find one, because that would lead to the magic
database being searched, which slows down startup a lot.


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@5037 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2014-06-30 17:47:07 +00:00
Benno Schulenberg 09dd0a4acb Making Ctrl-Left and Ctrl-Right produce special codes,
and mapping these codes to Prevword and Nextword.


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@5036 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2014-06-29 20:53:00 +00:00
Benno Schulenberg 6f28d35eef Fixing compilation with --enable-tiny --enable-nanorc.
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@5035 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2014-06-29 09:33:51 +00:00
Benno Schulenberg 484a0be6e6 Updating the pointer to the bottom of the file
when undoing line deletions at file's end.
Patch by Mark Majeres.


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@5033 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2014-06-29 08:49:06 +00:00
Benno Schulenberg d48d84a3ba Now trimming the superfluous braces.
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@5032 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2014-06-28 15:34:10 +00:00
Benno Schulenberg b71cf98ec7 Using a single assignment of do_toggle_void.
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@5031 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2014-06-28 15:22:41 +00:00
Benno Schulenberg 0a1e56ed3c Moving (the recognition of) the toggles to the end, like everywhere else.
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@5030 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2014-06-28 15:00:29 +00:00
Benno Schulenberg d4623f3ca3 Eradicating the execute flag -- it is almost always TRUE, and when it's FALSE
then it's for a function that is an empty placeholder, so executing it will
not do anything anyway.  Handling the one exception (do_gotolinecolumn_void)
specially, just like the other one (do_cancel) already is.


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@5029 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2014-06-28 14:42:18 +00:00
Benno Schulenberg b5895f0a51 Removing the useless parameters 'have_shortcut and 'allow_funcs'.
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@5028 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2014-06-28 08:29:18 +00:00
Benno Schulenberg 26de2dd843 Normalizing some indentation and whitespace.
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@5025 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2014-06-27 20:01:27 +00:00
Benno Schulenberg 29dfb68b6e Removing the ability to search for a matching bracket in a prompt input line.
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@5024 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2014-06-27 19:32:12 +00:00
Benno Schulenberg 4651f49fca Allowing only those menus where the bound function is actually present,
when rebinding keys.


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@5022 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2014-06-27 16:14:52 +00:00
Benno Schulenberg a8c13d79fe Adding default keybindings for Cut, PrevWord and NextWord in the prompt input lines.
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@5021 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2014-06-27 15:51:24 +00:00
Benno Schulenberg 40ae394b6a Allowing 'firstline' and 'lastline' to be rebound to Ctrl keys.
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@5020 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2014-06-25 09:17:38 +00:00
Benno Schulenberg 0c0fbd585c Allowing 'firstfile' and 'lastfile' to be rebound to Ctrl keys.
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@5019 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2014-06-25 09:05:55 +00:00
Benno Schulenberg 45417c76f3 Giving audible feedback when flipping the new buffer to off
is not allowed in view mode.


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@5018 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2014-06-23 20:30:23 +00:00
Benno Schulenberg cfa1338fb0 Normalizing the indentation in do_help().
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@5017 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2014-06-23 20:22:42 +00:00
Benno Schulenberg ef16223661 Adding the bindable function 'gotodir', documenting it, and also
documenting 'tofiles' and 'flipnewbuffer', and correcting the
description of 'gototext' (not being about the file browser).


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@5015 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2014-06-23 20:03:25 +00:00
Benno Schulenberg a0f66c0691 Renaming 'no_replace_void()' to 'flip_replace_void()',
to show what it actually does.


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@5014 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2014-06-23 18:30:35 +00:00
Benno Schulenberg ce0ea44596 Renaming UP_DIR and DOWN_DIR to UPWARD and DOWNWARD, for clarity,
to reduce the slight confusion with DIR meaning directory.


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@5013 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2014-06-23 18:20:12 +00:00
Benno Schulenberg 4cf39e4191 Renaming 'undidmsg' to 'redidmsg', to be apt.
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@5012 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2014-06-22 21:26:56 +00:00
Benno Schulenberg 64039e9337 Removing a superfluous abortion variable, and placing two comments better.
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@5011 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2014-06-22 21:21:00 +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 cda06a9491 Removing two pointless calls of get_shortcut(), and adjusting the comments.
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@5009 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2014-06-22 19:17:02 +00:00
Benno Schulenberg 016669128b Fixing three leaks of the cutbuffer, shortening and regrouping some stuff,
and removing an unneeded iteration of cutbottom.
Patch by Mark Majeres.


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@5008 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2014-06-22 11:03:49 +00:00
Benno Schulenberg 07f40612e1 When redoing a line join at the tail of the file,
make sure openfile->filebot is updated.
Patch by Mark Majeres.


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


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


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@5005 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2014-06-21 19:32:17 +00:00
Benno Schulenberg 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 691689d2b3 Fixing compilation with --enable-tiny --enable-histories --enable-multibuffer.
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@5000 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2014-06-20 16:33:12 +00:00
Benno Schulenberg 3b47ff756e Fixing compilation with --enable-tiny --enable-wrapping.
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@4999 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2014-06-20 16:13:54 +00:00
Benno Schulenberg cf8a296279 Fixing compilation with --enable-tiny --enable-histories --enable-nanorc.
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@4998 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2014-06-20 16:03:38 +00:00
Benno Schulenberg b0555990c2 Fixing compilation with --enable-tiny --enable-browser.
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@4996 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2014-06-20 15:35:26 +00:00
Benno Schulenberg 492e9f605b Miscellaneous whitespace adjustments and comment tweaks.
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@4995 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2014-06-20 10:48:26 +00:00
Benno Schulenberg ac6846a3e9 Wrapping long lines and actually reporting the name that is not a directory.
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@4994 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2014-06-20 10:39:31 +00:00
Benno Schulenberg 03f37add07 Another removal and more regrouping.
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@4993 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2014-06-20 10:34:52 +00:00
Benno Schulenberg 4147c5e0fc Removing two obsolete variables and regrouping some stuff.
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@4992 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2014-06-20 07:55:24 +00:00
Benno Schulenberg 3f816eeb58 Huh!? Why doesn't the build fail here without this change?
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@4991 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2014-06-19 21:01:39 +00:00
Benno Schulenberg ae2d300375 Pfff... Getting all iterations right is difficult.
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@4990 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2014-06-19 20:19: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 d840302f28 Updating some comments to match the current state of affairs.
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@4986 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2014-06-19 13:08: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 a81e141326 Removing a condition and a break that cancel each other.
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@4984 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2014-06-18 21:23:50 +00:00
Benno Schulenberg 336d1b8902 Renaming 'function_type' to 'key_type', for clarity.
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@4983 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2014-06-18 20:43:05 +00:00
Benno Schulenberg 45fe2adf72 Renaming the undo type UNSPLIT to JOIN, for clarity.
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@4982 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2014-06-18 20:11:52 +00:00
Benno Schulenberg b39db7bc63 And eliding a totally unused 'strdata2'.
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@4981 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2014-06-18 20:01:30 +00:00
Benno Schulenberg 3cf338aca8 Eliding the in fact unneeded 'to_eof'
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@4980 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2014-06-18 19:59:12 +00:00
Benno Schulenberg c55c0db2bb Renaming 'to_end' to 'to_eof', to lessen confusion with CUT_TO_END.
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@4979 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2014-06-18 19:46:35 +00:00
Benno Schulenberg a872709ab4 Making sure the cutbuffer is cleared at the appropriate moments.
Patch by Mark Majeres.


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


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@4976 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2014-06-17 15:50:34 +00:00
Benno Schulenberg 38cb8fc328 Removing an obsolete boolean variable.
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@4975 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2014-06-17 15:37:34 +00:00
Benno Schulenberg 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 1f67c1244d Removing an "-I m4" flag; it is needed only at the top level.
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@4970 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2014-06-16 12:45:03 +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 948b8e9bcf Putting the cursor back in front of a backwards cut,
where it was when the cut was made.
Patch by Mark Majeres, edited by Benno Schulenberg.


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


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@4964 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2014-06-13 15:20:26 +00:00
Benno Schulenberg cd59a646e6 Not treating the holding of both Control and Meta the same as only Control.
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@4963 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2014-06-13 14:58:02 +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
Benno Schulenberg 1d06455ca5 Letting a click on titlebar or statusbar not break a series of ^Ks.
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@4961 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2014-06-13 12:19:44 +00:00
Benno Schulenberg 454563c9dc Letting a mousal repositioning of the cursor break a series of ^Ks.
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@4960 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2014-06-13 12:07:18 +00:00
Benno Schulenberg 62bb6e85fc Setting not just the meta_key but also the func_key boolean when a key is
reinserted into the keyboard buffer.  This fixes Savannah bug #42092.


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@4959 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2014-06-11 19:24:38 +00:00
Benno Schulenberg 8cc8b08dfc Removing a superfluous switch statement.
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@4958 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2014-06-11 18:34:35 +00:00
Benno Schulenberg fc35e20052 Always accepting mouse events, also when just looking for Unjustify.
This fixes Savannah bug #42322.


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@4957 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2014-06-11 18:23:29 +00:00
Benno Schulenberg a3f421ca2b Producing the correct return value for when a mouse event reinserted something
into the keyboard buffer.  And not continuing but getting out when there is a
spurious  mouse event.  Continuing would result in the cutbuffer being cleared
upon the next cut.  These two changes together fix Savannah bug #42326.


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@4956 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2014-06-11 18:04:36 +00:00
Benno Schulenberg 7d5f42ca08 Using the right type to avoid a compiler warning.
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@4955 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2014-06-10 19:50:44 +00:00
Benno Schulenberg a8a23abc00 Making a couple of minimalistic whitespace adjustments.
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@4954 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2014-06-10 19:12:14 +00:00
Benno Schulenberg 53435b0efc One more type fix and two tiny message tweaks.
Patch by David Lawrence Ramsey.


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@4953 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2014-06-10 19:07:47 +00:00
Benno Schulenberg 6af5bdea27 A few more cosmetic tweaks and type fixes.
Patch by David Lawrence Ramsey.


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


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


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@4950 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2014-06-09 15:08:59 +00:00
Benno Schulenberg ed0086bde5 Eliding four function calls by not comparing with an
empty string but checking for the terminating '\0'.
Patch by David Lawrence Ramsey.


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@4949 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2014-06-09 14:33:00 +00:00
Benno Schulenberg 505125e259 A few cosmetic tweaks of comments and whitespace.
Patch by David Lawrence Ramsey.


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


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@4945 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2014-06-09 10:01:54 +00:00