Commit Graph

354 Commits (6007d6227bb82d699e7668050302cd3da64c31be)

Author SHA1 Message Date
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 d6bd276c8c Deleting a condition that will never occur.
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@5430 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2015-11-22 16:07:23 +00:00
Benno Schulenberg f9274a5a29 Deleting an unneeded variable alias.
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@5405 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2015-11-12 19:50:33 +00:00
Benno Schulenberg ec26fd5e7c Storing the correct end position of an inserted file,
and using it for an undo and redo.


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@5404 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2015-11-12 19:01:57 +00:00
Benno Schulenberg bde996db67 Discarding a now useless function.
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@5403 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2015-11-11 19:56:35 +00:00
Benno Schulenberg 7be493047c Oops! Blackout!
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@5402 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2015-11-11 19:15:36 +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 f1d9fcc77b Redoing an Enter from stored undo data, instead of running do_enter() again,
because the latter behaves differently depending on the setting of autoindent.


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@5400 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2015-11-11 18:51:39 +00:00
Benno Schulenberg b66e4bfa5b Deleting a redundant assignment.
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@5394 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2015-11-06 21:02:50 +00:00
Benno Schulenberg 452066bc88 Chopping the 'undoing' parameter, so that the calls of do_cut_text() become
more symmetrical: wrapped in add_undo() + update_undo() where needed.


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@5390 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2015-11-02 13:46:40 +00:00
Benno Schulenberg d0e8887e3b Eliding two variables.
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@5389 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2015-11-02 11:24:22 +00:00
Benno Schulenberg 499c2af385 Removing an 'if' that will never be true, and removing some
assignments that have already been done.


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@5381 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2015-10-29 17:27:33 +00:00
Benno Schulenberg bf64514283 Checking for "nothing to redo" earlier, in order to restore the
possible warning about an internal error.


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@5380 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2015-10-29 17:02:13 +00:00
Benno Schulenberg b0a2f9853b Skipping the addition of an undo only when the current action equals the
last action.  Necessary for when typing text is broken by an undo+redo.


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@5379 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2015-10-29 16:52:42 +00:00
Benno Schulenberg d0b72552bf Oops! You can't swap those two conditions.
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@5377 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2015-10-29 09:04:30 +00:00
Benno Schulenberg 26eed9d406 Removing a condition that can never occur.
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@5376 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2015-10-28 20:49:16 +00:00
Benno Schulenberg 3059e16c25 Spoofing a line number for the redoing of an INSERT, because
'u->mark_begin_lineno' is being used as the length of the insertion.


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@5375 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2015-10-28 20:24:15 +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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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