Commit Graph

356 Commits (605f0318338ca43df3a1a57c116619eab7d5124d)

Author SHA1 Message Date
Benno Schulenberg aa1ae0a144 screen: concentrate the setting of placewewant
Instead of saving the current value of placewewant, then setting the
new value, and then passing the old value to edit_redraw() in seven
different places, just let edit_redraw() do this saving and setting.

In the bargain placewewant is now only recalculated when it matters
-- when allow_update is TRUE -- and not when it's superfluous.
2016-04-11 20:38:05 +02:00
Benno Schulenberg 023fccb966 search: avoid saving and restoring placewewant when bracket matching
Now that findnextstr() no longer sets placewewant, we can can make
a copy of the old value just where needed: when a bracket is found.
2016-04-10 11:14:03 +02:00
Benno Schulenberg ea4e9b3156 search: don't set placewewant when we are just iterating
In the innermost search loop, don't set placewewant, because this loop
is also used for replacing and spell fixing, when we don't really want
to be there: we are just passing through.  Not setting placewewant means
we don't need to save and restore it in those passing-through routines.

The value of placewewant is only relevant when doing cursor movement,
which doesn't happen during replacing nor spell checking, so there is
no need to keep placewewant up to date -- it is set when it matters:
at the end of go_looking().
2016-04-10 11:11:24 +02:00
Benno Schulenberg 7ba356a62c searching: don't keep track of current_y, but calculate it at the end
Stop keeping track of the vertical screen position when searching for
something.  If nothing is found, current_y doesn't change, and all the
incrementing/decrementing was a waste of time.  If something is found
and it is onscreen, it is easy to calculate the new current_y.  And if
something is found and it is offscreen, then current_y is irrelevant,
because we will be either centering the found occurrence (searching)
or putting it on the top or bottom line (bracket matching).

(The above does not take softwrapping into account, but neither did
the old code, so this doesn't introduce any new bugs.)

(Also, when the search wraps, and the viewport is away from head or
tail of the file, and the found occurrence is within the viewport,
then the incremented/decremented current_y would be way wrong, but
this didn't have any adverse effects as far as I could tell.  It
seems that current_y is irrelevant in most cases.)
2016-04-08 18:31:15 +02:00
Benno Schulenberg cb17732ac2 scrolling: don't scroll too much when having to bridge blank lines
Add a third mode of scrolling, FLOWING, besides CENTERING and STATIONARY.
This is used for word and paragraph jumping (and for bracket matching,
but that worked correctly already), and only when focusing is FALSE.

The new mode prevents the screen from scrolling too many lines when
there are several blank lines at the bottom of the edit window and
the next word or paragraph is out of view.

This fixes https://savannah.gnu.org/bugs/?47194.
2016-04-07 14:28:25 +02:00
Benno Schulenberg d92eb4fee3 all: eradicate SVN's $Id$ tags 2016-04-05 14:59:12 +02:00
Benno Schulenberg 284877104f search: fix compilation when configured with --enable-tiny
SVN revision 5748 could cause some 'else's to be orphaned.

This fixes https://savannah.gnu.org/bugs/?47610.

Reported-by: Thomas Rosenau <thomasr@fantasymail.de>
Signed-off-by: Benno Schulenberg <bensberg@justemail.net>
2016-04-04 19:44:39 +02:00
Benno Schulenberg c98afde096 Renaming 'do_replace_highlight()' to 'spotlight()', for clarity,
for aptness, for contrast.


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@5777 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2016-03-30 12:09:39 +00:00
Benno Schulenberg 400e7ce13f Reporting "Cancelled" instead of "Not found" when the user aborts a replace
that is taking too long.  This fixes Savannah bug #47439.


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@5776 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2016-03-30 12:00:48 +00:00
Benno Schulenberg b834ed3b28 Chopping a parameter that is now unused, or rather: always NULL.
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@5775 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2016-03-29 15:05:47 +00:00
Benno Schulenberg 51743233ed Removing the 'last_replace' variable that is never used.
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@5768 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2016-03-28 19:14:33 +00:00
Benno Schulenberg 108fe330d3 Providing feedback when searching takes longer than roughly half a second.
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@5767 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2016-03-28 19:00:19 +00:00
Benno Schulenberg 3660c62bc0 Polling the keyboard once per second instead of once per two seconds.
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@5762 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2016-03-23 10:27:54 +00:00
Benno Schulenberg 4b2751c3b9 Cleaning up, improving comments, and renaming a variable.
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@5761 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2016-03-23 10:19:01 +00:00
Benno Schulenberg 8704dde873 Preventing the internal spell checker from finding the first occurrence of
a misspelled word twice.  And deleting the piece of dead code that was meant
to do this.  This fixes Savannah bug #47188.

When we've reached again the same line where we started and we find an
instance there, then this can only be /before or at/ the position from
where we started, otherwise we would have found it when we commenced
searching.  And so... that little piece of dead code does absolutely
nothing -- it will never fire.

It's so nice... nano is full of Easter Eggs!  :)


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@5760 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2016-03-23 09:52:34 +00:00
Benno Schulenberg 2f817a6740 Checking for the existence of the REG_ENHANCED regex flag, and
using it when it's available (which it is on OS X systems).
This completes the fix for Savannah bug #47325.
Patch by Thomas Rosenau.


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@5759 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2016-03-22 10:42:28 +00:00
Benno Schulenberg f150894d4e Factoring out the common part of do_search() and do_research()
into the new function go_looking().


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@5756 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2016-03-20 16:57:15 +00:00
Benno Schulenberg b8a47f4e37 Not bothering to set 'answer'; just using 'last_search', which has already
been set to 'answer' in search_init() when 'answer' isn't empty, and when
'answer' /is/ empty we use 'last_search' anyway.


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@5755 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2016-03-20 16:19:30 +00:00
Benno Schulenberg b3b2fa8856 Using a 'return' instead of an 'else'.
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@5754 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2016-03-20 16:03:20 +00:00
Benno Schulenberg 036c5f9c1f Cycling through the tab-completion items from newest to oldest.
This fixes Savannah bug #47205.


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@5752 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2016-03-20 13:38:09 +00:00
Benno Schulenberg 311f0e8734 Snipping a useless setting of answer -- the Replace is being /cancelled/,
and the next time a Search or Replace is run, this answer is overwritten
with an empty string.


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@5749 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2016-03-19 20:19:49 +00:00
Benno Schulenberg 9f93b33d29 Reshuffling some stuff to reduce indentation.
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@5748 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2016-03-19 18:51:46 +00:00
Benno Schulenberg e291131d0a Snipping an always-FALSE condition -- do_prompt() will always
return with -2 when answer is empty, so when answer is empty
i cannot be zero.


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@5747 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2016-03-19 18:23:37 +00:00
Benno Schulenberg fc1edf28ce Deleting another unneeded variable. Fully redundant.
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@5746 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2016-03-19 17:19:30 +00:00
Benno Schulenberg 90cffe3fd0 Not bothering to set the current answer to the empty string,
as do_prompt() can handle a NULL.


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@5743 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2016-03-19 16:41:45 +00:00
Benno Schulenberg a6740ba3fd Storing always the last-typed string, also when it's an invalid regex.
This fixes Savannah bug #47440.


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@5742 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2016-03-19 16:19:44 +00:00
Benno Schulenberg e753cd1c38 Adjusting some indentation.
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@5741 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2016-03-17 19:30:29 +00:00
Benno Schulenberg 7098dd0cd0 Pruning two #ifdefs, like elsewhere, to reduce the clutter.
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@5740 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2016-03-17 18:51:46 +00:00
Benno Schulenberg 988274bb70 Removing two redundant returns, and condensing six comments.
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@5739 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2016-03-17 10:06:15 +00:00
Benno Schulenberg 19bc63db28 Using the Search key bindings also during a Re-search, to enable cancelling.
This fixes Savannah bug #47159.


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@5738 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2016-03-17 09:12:30 +00:00
Benno Schulenberg 57c50baa61 Allowing the use of word boundary markers \< and \> in search strings on
non-GNU systems.  This is a partial fix for Savannah bug #47325.


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@5731 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2016-03-13 19:19:12 +00:00
Benno Schulenberg e86dc0381c Avoiding a memory leak when tabbing on a string that doesn't occur in the
history.  This fixes Savannah bug #47124 reported by Mike Frysinger.


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@5653 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2016-02-20 12:16:43 +00:00
Benno Schulenberg 5fa5ccff43 Deleting a debugging leftover.
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@5652 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2016-02-18 20:10:02 +00:00
Benno Schulenberg 56cfab3df6 Fixing Savannah bug #47127 the proper way,
eliding two silly calls of edit_redraw().


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@5650 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2016-02-18 16:31:02 +00:00
Benno Schulenberg f3a1d7ba06 Making the iteration through replacement matches behave the same again as the
iteration through search matches: showing them centered when found offscreen.
This fixes Savannah bug #47127.


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@5641 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2016-02-14 10:19:27 +00:00
Benno Schulenberg 568d2a389c Switching the cursor on and off at the appropriate moments (that is: when
needed), so that it no longer shows in the help screen nor in the file list.
This fixes Savannah bug #47126.


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@5640 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2016-02-13 19:41:12 +00:00
Benno Schulenberg 65c7c810bc Adjusting some indentation and some line wrapping.
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@5593 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2016-01-26 09:16:09 +00:00
Benno Schulenberg 34fbb1f4de Adjusting a few comments and rewrapping some lines.
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@5556 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2016-01-13 20:32:40 +00:00
Benno Schulenberg 46db638435 Chopping a duplicate parameter.
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@5519 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2015-12-31 19:20:40 +00:00
Benno Schulenberg 1592ca0585 Chopping an always FALSE parameter.
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@5518 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2015-12-31 17:20:46 +00:00
Benno Schulenberg 8f0262f51e Deleting a now unused function.
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@5517 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2015-12-31 16:49:07 +00:00
Benno Schulenberg 5834638d53 It shouldn't be necessary to doubly check for being at the end of file.
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@5492 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2015-12-08 18:54:13 +00:00
Benno Schulenberg fbe4376822 Inserting a new node into a linked list by using just two parameters:
the insertion point and the new node.


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


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@5433 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2015-11-22 16:14:42 +00:00
Benno Schulenberg a1c03ed5c1 Correcting the logic for adjusting the x position of the mark,
and improving the comments.


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@5395 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2015-11-07 09:49:34 +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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 a2d74f7e5e Removing duplicate translator comments, and adding some others.
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@4921 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2014-05-28 14:34:11 +00:00
Benno Schulenberg 5298d5114c Removing an unneeded call of edit_refresh(), and
using 'size_t' instead of 'int' for line lengths.
Patch by David Lawrence Ramsey.


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@4895 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2014-05-16 10:50:01 +00:00
Benno Schulenberg 6081546161 Going to the correct positions for undoing and redoing cuts and
pastes.  This fixes many undo problems and Savannah bug #25585.
*Patch by Mark Majeres.*


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@4893 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2014-05-15 20:00:46 +00:00
Benno Schulenberg 7a9f4a456e Update the years in the copyright notices.
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@4826 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2014-04-30 20:18:26 +00:00
Benno Schulenberg e167afe14d Renaming MREPLACE2 to MREPLACEWITH, for clarity.
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@4784 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2014-04-16 09:26:15 +00:00
Benno Schulenberg 5bd359dbb9 Normalizing whitespace around '==' comparison.
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@4776 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2014-04-15 15:02:43 +00:00
Benno Schulenberg 8f6151198a Whitespace adjustments, plus a few comment tweaks.
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@4769 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2014-04-14 09:57:06 +00:00
Benno Schulenberg 7828a8096e Removing the unused parameter 'func_key' from get_shortcut().
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@4768 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2014-04-14 09:22:29 +00:00
Benno Schulenberg eea0908236 Converting #ifdef ENABLE_NANORC to #ifndef DISABLE_NANORC.
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@4765 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2014-04-13 20:50:20 +00:00
Benno Schulenberg d19be5aafa More editing of comment blocks and trimming of blank lines.
Patch by David Lawrence Ramsey, slightly tweaked.


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@4753 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2014-04-08 18:38:45 +00:00
Benno Schulenberg 26fd9b29a3 Fixing compilation with --enable-browser and tiny.
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@4724 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2014-04-04 15:31:40 +00:00
Benno Schulenberg 00389928d4 Converting #ifdef ENABLE_COLOR to #ifndef DISABLE_COLOR.
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@4719 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2014-04-04 11:59:03 +00:00
Benno Schulenberg 4171477fb5 Silencing a compiler warning about a possibly uninitialized variable.
Patch by Mike Frysinger (from November 2011).


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@4704 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2014-04-02 20:17:05 +00:00
Benno Schulenberg a65ef4244c Removing stray spaces before tabs.
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@4652 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2014-03-17 21:36:37 +00:00
Benno Schulenberg e4c34c3386 Adding, fixing, and removing some #endif comments.
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@4649 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2014-03-17 14:15:57 +00:00
Chris Allegretta 5575bfad2c 2014-02-24 Chris Allegretta <chrisa@asty.org>
* new linter functionality.  rcfile option "linter"
        * src/global.c (shortcut_init) - Actually free the sclist
          if it was allocated before.



git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@4600 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2014-02-24 10:18:15 +00:00
Chris Allegretta 76d61ec167 2013-01-02 Mike Frysinger <vapier@gentoo.org>
* src/search.c (search_init): Fix gcc complaints on certain versions




git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@4559 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2013-01-03 05:00:34 +00:00
Chris Allegretta 637daa85c5 * src/*: Retire iso_me_harder_funcmap based on suggestion by <bernd.spaeth@gmx.net>
This does add 20KB to nano's executable size but it gets rid of a lot of indirection
          that makes people stomach turn.  There are several new stub functions and need of more
          tidying as a result of this.



git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@4527 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2011-02-07 14:45:56 +00:00
Chris Allegretta df8c3debc8 2010-01-05 Tito <farmatito@tiscali.it>
* search.c (update_history) - Fix bad length check causing search crash on armel platform.



git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@4472 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2010-01-05 23:35:50 +00:00
Chris Allegretta 8a07a96eef 2009-12-01 David Lawrence Ramsey <pooka109@gmail.com>
* Update documentation for 2.2 features including sample nanorc file, texinfo
          file, man pages, UPGRADE file, and update copyright noticed for the current year.



git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@4453 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2009-12-02 03:36:22 +00:00
Chris Allegretta 86988b5026 Oh, reset multi data in search.c;do_replace_loop() too.
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@4380 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2009-02-17 02:01:03 +00:00
Chris Allegretta 0dc26dcd09 2009-01-24 Chris Allegretta <chrisa@asty.org>
* Add interruptability to search functions.  New functions enable_nodelay and
          disable_nodelay and changes to the routines to handle checking for pending
          searches.  Fixes Savnnah bug 24946: Need interrrupt for search.



git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@4350 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2009-01-24 22:40:41 +00:00
Chris Allegretta a117163a4c 2009-01-19 Chris Allegretta <chrisa@asty.org>
* Change funcion definitions to shorts instead of (void *)s.  New mapping function
          iso_me_harder_funcmap().  Fixes compilation complaints with -pedantic, 
          reported by Eitan Adler <eitanadlerlist@gmail.com>.



git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@4349 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2009-01-19 19:10:39 +00:00
Chris Allegretta 973addcde8 * global.c (shortcut_init), search.c (search_init): Fix add_to_sclist for ^W^T so
invalid messages will display properly.  Fixes Savannah bug 24507.



git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@4343 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2008-10-15 01:25:25 +00:00
Chris Allegretta 14c8620e0b - Change add_undo and current_undo to only take action arg, as openfilestruct arg is always openfile
- Add ability to undo a file/cmd insert, needed to add undoable flag to read_file and open_buffer as a result



git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@4291 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2008-08-03 04:48:05 +00:00
Chris Allegretta 3c1131a5b3 - Add very basic undo for text replace.
- Fix lots of warnings whe using -Wall
- Fix some comments



git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@4290 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2008-08-02 22:31:01 +00:00
Chris Allegretta 1b6ed07543 Add a fix for bug #23144 that actually works (several bugs in one here)
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@4264 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2008-06-03 08:09:05 +00:00
Chris Allegretta 1371fb6326 Tentative fix for bug #23144: using arrow keys in search buffer affects main window
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@4263 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2008-06-03 06:21:31 +00:00
Chris Allegretta 10f868d33c - Update man page a little bit more
- Change do_prompt and get_prompt_line to pass meta_key and func_key
  so the calling program can DTRT when it calsl get_shortcut.  In
  particular this allows the "new file buffer" toggle on the insert file
  menu to work, and presumably other rebinding stuff should now work also.


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@4226 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2008-03-14 04:08:51 +00:00