Commit Graph

7162 Commits (09d8ee82b73c6a19fa1ce900043e80a41e09601a)

Author SHA1 Message Date
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
Benno Schulenberg 83c264939b tweaks: move a bunch of comments to the lines that they refer to 2018-01-28 13:41:46 +01:00
Benno Schulenberg d48f3e5e7b help: don't get stuck when there is an unwrappable piece of text
When a fragment of help text does not contain any whitespace that
we can wrap at, just advance the pointer, because returning zero
would mean we stay forever at the same place: nano would hang.
2018-01-27 21:02:47 +01:00
Benno Schulenberg b18e76d4d8 tweaks: drop two unneeded initializations, and trim a comment 2018-01-27 20:26:15 +01:00
Benno Schulenberg f5c87a7fee tweaks: swap the row and col parameters to a more consistent order 2018-01-27 20:00:14 +01:00
Benno Schulenberg 90ebff00ca tweaks: rename two variables, and swap their declaration order 2018-01-27 19:47:00 +01:00
Benno Schulenberg cdc9a29598 tweaks: move two functions to their proper place, orderingwise 2018-01-27 19:33:03 +01:00
Benno Schulenberg ddc1de1939 docs: remove the note about needing a recent ncurses for macros to work
After commit e739448c, macros should work also when ncurses produces
escape sequences instead of keycodes.
2018-01-27 17:54:32 +01:00
Benno Schulenberg 18bf2af9c1 tweaks: rename a function, to be more distinct
So one doesn't find it when grepping for get_input().
2018-01-27 11:29:11 +01:00
Benno Schulenberg 452008c81d syntax: go: colorize only valid octal numbers
Reported-by: Tom Levy <tomlevy93@gmail.com>
2018-01-26 11:15:26 +01:00
Benno Schulenberg 97cbbb0cc8 prompt: show whitespace only in the filename, not in the whole line
That is, call display_string() just on the filename, not on the rest
of the prompt text.

This fixes https://savannah.gnu.org/bugs/?52967.
Reported-by: Andreas Schamanek <schamane@fam.tuwien.ac.at>
2018-01-26 09:37:18 +01:00
Benno Schulenberg 7b9bd65362 tweaks: drop a useless assert, and don't abort over an unhandled option 2018-01-24 10:29:50 +01:00