Commit Graph

7173 Commits (299e710845546a4a8c6c6dd6d19d90b6a4b11709)

Author SHA1 Message Date
Benno Schulenberg d9ac785a07 input: handle the implant() function separately also for the prompt
To prevent getting kicked out of it.

This fixes https://savannah.gnu.org/bugs/?53234.
2018-02-27 13:20:27 +01:00
Benno Schulenberg 01457ae3d3 input: handle the implant() function separately, as it is special
The implant() function itself cannot be bound to anything, so it
is not in the linked list of functions -- trying to find it would
lead to a NULL pointer, and thus to a segfault.

This fixes https://savannah.gnu.org/bugs/?53233.
2018-02-27 11:11:02 +01:00
Benno Schulenberg c757aee235 tweaks: correct a typo that broke binding a key to a string
Commit 0cf455bc introduced the typo.
2018-02-27 10:28:52 +01:00
Benno Schulenberg 48749a9500 docs: note also in the Info manual that text can be selected with Shift
And remove a detail that is untrue when 'set selectedcolor' is used.
2018-02-27 09:50:45 +01:00
Benno Schulenberg 4cd3987791 tweaks: correct a typo in NEWS 2018-02-27 09:45:38 +01:00
David Lawrence Ramsey aa41eb69c0 docs: mention that errorcolor does have default colors
This fixes https://savannah.gnu.org/bugs/?53225.
2018-02-27 09:41:17 +01:00
Benno Schulenberg 54103d8ed1 tweaks: elide another variable, to call a function less often
Instead of always calling sctofunc(), it is now only called when
in view mode OR when (after the keystroke's function has been run)
no need for a refresh has been established yet.
2018-02-25 10:41:51 +01:00
Benno Schulenberg 53a10ddcaf tweaks: elide an unneeded variable
A shortcut's function must be among the existing ones, otherwise
nano's code is fundamentally broken.
2018-02-24 20:47:17 +01:00
Benno Schulenberg 65bf04060b tweaks: remove another superfluous check
Commit bb667beb removed do_gotolinecolumn_void() from the MWHEREIS
menu (replacing it with the empty flip_goto() function), so there
is no longer any need to check for this one special case.
2018-02-24 20:47:01 +01:00
Benno Schulenberg a95fb64dd6 tweaks: remove a superfluous check
A shortcut's function can never be NULL.
2018-02-24 19:53:19 +01:00
Benno Schulenberg b235404ade tweaks: elide an unused variable and parameter
It is only ever set and never referenced.
2018-02-24 19:42:43 +01:00
Benno Schulenberg ffebd31cbb tweaks: shorten the name of two record elements
Exclude the confusing, pleonastic 'sc' abbreviation from their names.
2018-02-24 19:31:11 +01:00
Benno Schulenberg e55227f65f tweaks: unabbreviate two variable names 2018-02-24 18:20:30 +01:00
Benno Schulenberg b77b54bf73 tweaks: elide two unneeded booleans 2018-02-24 17:51:27 +01:00
Benno Schulenberg 2428620b16 prompt: disallow pasting when in restricted mode 2018-02-24 13:54:49 +01:00
Benno Schulenberg cb0289f0dc tweaks: fix a copy-and-paste error 2018-02-24 13:31:59 +01:00
Benno Schulenberg b027263a37 small addition: allow customizing the color of an error message
The new option 'set errorcolor' allows the user to specify the color
combination for the status bar when an error message is displayed.
2018-02-23 12:35:17 +01:00
Benno Schulenberg 1a926d79c5 help: mention that some keys work on a region when the mark is on
This fixes https://savannah.gnu.org/bugs/?53188.
Reported-by: Ken Tyler <kent@werple.net.au>
2018-02-23 12:35:12 +01:00
Benno Schulenberg c79fe1a160 bindings: show ^/ instead of ^_ for Go-To-Line
The slash is easier to read than the underscore (which almost
disappears at the bottom of the screen), and easier to type
(no Shift needed on a US keyboard), and it kind of harmonizes
with the ^\ for Replace and the M-/ for End-of-buffer.
2018-02-23 12:26:30 +01:00
Tom Levy fef195bce9 syntax: go: highlight also floats with leading zeroes as valid
See the discussion on the mailing list:
https://lists.gnu.org/archive/html/nano-devel/2018-01/msg00022.html
https://lists.gnu.org/archive/html/nano-devel/2018-02/msg00090.html

Signed-off-by: Tom Levy <tomlevy93@gmail.com>
2018-02-20 10:31:38 +01:00
Benno Schulenberg dd9766c2e0 editing: when --smooth is used, make <Enter>-at-bottom scroll one row
When using --smooth or 'set smooth', the screen should scroll the
minimum amount needed to get the cursor back into view.  (The only
exceptions are search, undo, and redo -- when there the cursor goes
offscreen, the cursor line is centered.)

This change brings the behavior of pressing <Enter> on the bottom
row into line with, for example, pasting a single line.  See also
http://lists.gnu.org/archive/html/nano-devel/2018-02/msg00027.html.
2018-02-16 11:48:24 +01:00
Benno Schulenberg 5b870a7632 goto: avoid a segfault, by initializing 'answer' when it is NULL
This fixes https://savannah.gnu.org/bugs/?53157.
2018-02-14 19:40:30 +01:00
Benno Schulenberg 0cf455bc48 build: fix compilation when configured with --enable-tiny
And when configured with --enable-tiny --enable-nanorc.
2018-02-14 19:29:29 +01:00
Benno Schulenberg 3e1fc6385b syntaxes: remove quotes from each syntax name, and color it differently
The different color will make the name stand out, as it should, instead
of looking the same as all the regex strings.
2018-02-14 17:36:50 +01:00
Benno Schulenberg 544cda6a62 rcfile: allow a syntax name to be unquoted 2018-02-14 17:35:37 +01:00
Benno Schulenberg 28933cf572 tweaks: remove two superfluous checks, and restrict two others
When 'refresh_needed' is already TRUE, there is no need any more
to check whether it should be set.

[Those first two calls are leftovers from before the time that
reset_multis() morphed into check_the_multis().]
2018-02-14 17:29:59 +01:00
Benno Schulenberg 1635060ba6 tweaks: plug a memory leak when using Verbatim Input at a prompt
This fixes https://savannah.gnu.org/bugs/?53089.
2018-02-08 17:54:31 +01:00
David Lawrence Ramsey 7a038adfd4 input: don't stop prepending when the user adds text via a shortcut
When characters are added via Verbatim Input or by pressing <Tab>,
the prepend flag should be retained, just like when characters are
typed directly.

This fixes https://savannah.gnu.org/bugs/?52956.
2018-02-08 17:35:56 +01:00
Benno Schulenberg f1b5be4bbf tweaks: elide an unneeded variable 2018-02-07 19:42:19 +01:00
Benno Schulenberg 9ceeabda38 memory: avoid a leak when toggling from Search to Goto
This fixes https://savannah.gnu.org/bugs/?53088.
2018-02-07 19:34:52 +01:00
Benno Schulenberg 204e1b8353 memory: squeal when there is something wrong, instead of stumbling on
When copying a string, source and destination may not be equal --
complain loudly when they are, instead of failing to free memory.

Also, instead of freeing the destination string and then allocating
it afresh, just reallocate it -- that should be slightly quicker.
2018-02-07 19:34:43 +01:00
Benno Schulenberg d865d7ac8f search: clear the existing answer when starting a new search
When doing for example: ^W xx ^R ^C ^W, the "xx" would again be shown
after the prompt.  This is wrong -- when starting a new search, the
current answer should be empty.

Reported-by: Marco Diego Aurélio Mesquita <marcodiegomesquita@gmail.com>
2018-02-05 12:47:55 +01:00
Benno Schulenberg 16d237ba1b tweaks: rename two variables, to be more meaningful 2018-02-04 22:07:33 +01:00
Benno Schulenberg c3031b9b8f tweaks: reshuffle some of the search-and-replace cleanup calls 2018-02-04 21:31:04 +01:00
Benno Schulenberg d289510724 tweaks: adjust comments and indentation after the previous change 2018-02-04 21:23:48 +01:00
Benno Schulenberg 60f1090da0 search: get rid of some unneeded recursion when just toggling things
Instead of weaving back and forth between do_search()/do_replace() and
search_init() every time that one of the options is toggled, just keep
looping in the latter function until the user presses <Enter>.

The weaving for the do_gotolinecolumn() function remains, but is
shortened to involve only search_init().
2018-02-04 20:26:06 +01:00
David Lawrence Ramsey 8f6ee22b41 tweaks: fix typo in rebindable function name
This fixes https://savannah.gnu.org/bugs/?53062.
2018-02-04 18:31:24 +01:00
Benno Schulenberg a083d7f1e1 tweaks: rename a variable to be more distinct and greppable 2018-02-04 18:25:10 +01:00
Benno Schulenberg 919df09ffa general: detect in a better way whether we're running on a Linux console
Suggested-by: Mike Frysinger <vapier@gentoo.org>
2018-02-04 18:23:13 +01:00
Benno Schulenberg ddbff6dcb2 tweaks: slightly rewrap the FAQ's table of contents 2018-02-04 18:20:13 +01:00
Benno Schulenberg 4295baa5fe tweaks: transform a 'do' to a 'while', and reshuffle a comment 2018-02-04 18:14:28 +01:00
Benno Schulenberg 467cc8edf3 tweaks: remove two deprecated options and six rebindable function names
This addresses https://savannah.gnu.org/bugs/?48992.
2018-02-04 13:51:13 +01:00
Benno Schulenberg 6d111c9343 new feature: allow binding a key to a string (in a nanorc file)
In this way a single keystroke can produce a fragment of text or a
series of commands, or a mix of the two.  It is like a prerecorded
macro.

This fulfills https://savannah.gnu.org/bugs/?52931.
2018-02-04 12:44:12 +01:00
Benno Schulenberg bb667beb5a bindings: rename the bindable function 'gototext' to 'flipgoto'
This brings it in line with the other three "flip" toggles.
2018-02-04 10:34:39 +01:00
Benno Schulenberg eed765f4f7 tweaks: elide an unneeded variable 2018-02-04 10:15:26 +01:00
Benno Schulenberg 361267cf25 po: update translations and regenerate POT file and PO files 2018-01-29 09:57:32 +01:00
Benno Schulenberg ed493bb99b build: fix the source URL in the spec file 2018-01-29 09:46:47 +01:00
Benno Schulenberg ae7366616f bump version numbers and add a news item for the 2.9.3 release 2018-01-29 09:31:12 +01:00
Benno Schulenberg 58ed3a8152 display: wipe the status bar when doing a total refresh
This fixes https://savannah.gnu.org/bugs/?52997.
2018-01-28 21:08:28 +01:00
Benno Schulenberg e11021a7a5 input: recognize the deviant keycode for <Ctrl+End> in urxvt
This fixes https://savannah.gnu.org/bugs/?52972.
Reported-by: Brand Huntsman <alpha@qzx.com>
2018-01-28 16:15:21 +01:00