Benno Schulenberg
a429dc4a76
tweaks: rename a variable, to better fit its usage
2018-01-23 13:09:12 +01:00
Benno Schulenberg
91073be49c
wrapping: don't trim a blank character that the user just typed
...
Trimming trailing spaces is good, but we should not trim the space
(or tab or other blank) that the user just typed and that caused the
hard-wrapping to occur.
This fixes https://savannah.gnu.org/bugs/?52948 .
Reported-by: Andreas Schamanek <schamane@fam.tuwien.ac.at>
2018-01-23 13:06:05 +01:00
Benno Schulenberg
d5f9be7dc8
painting: look for an end match only after a start match, if any
...
This fixes https://savannah.gnu.org/bugs/?52925 .
Reviewed-by: Brand Huntsman <alpha@qzx.com>
2018-01-22 11:03:40 +01:00
Benno Schulenberg
4ad0490ce4
tweaks: rename a variable, for more contrast
2018-01-20 18:22:24 +01:00
Benno Schulenberg
d85098abda
tweaks: reshuffle a couple of lines, to make a bit more sense
2018-01-19 20:27:53 +01:00
Benno Schulenberg
13f8ddcaf2
tweaks: remove a handful of redundant (because always true) asserts
...
And rewrap some lines, three of them to make them equal to another.
2018-01-19 20:09:06 +01:00
Benno Schulenberg
37e9ada964
tweaks: change a 'do' to a 'while', and return early to elide an 'if'
2018-01-19 18:05:24 +01:00
Benno Schulenberg
a99158c7c0
tweaks: remove a fragment of dead code
...
At that point, ptr will necessarily point at EOL -- *ptr == '\0'.
2018-01-19 17:56:17 +01:00
Benno Schulenberg
3981217e5a
startup: allow a named pipe as file argument when --noread is used
...
This fixes https://savannah.gnu.org/bugs/?52896 .
Reported-by: Miki Strange <mik@mikistrange.com>
Tested-by: Miki Strange <mik@mikistrange.com>
2018-01-16 21:43:16 +01:00
Benno Schulenberg
96b47f2877
tweaks: transform a parameter, from a pointer to the value itself
2018-01-15 20:09:03 +01:00
Benno Schulenberg
7da391beb7
tweaks: drop a superfluous parameter, as it is always 1
2018-01-15 19:54:12 +01:00
Benno Schulenberg
90cf4838d2
tweaks: don't bother to reallocate when the keybuffer size decreases
...
It will be reallocated soon enough when the size increases again.
2018-01-15 19:46:16 +01:00
Benno Schulenberg
4c7ec18a55
tweaks: rewrap a bunch of lines in the NEWS file
2018-01-15 19:29:46 +01:00
Benno Schulenberg
704a7d7b4f
tweaks: rename two variables, for preciseness and shortness
...
Also remove an unneeded nulling.
2018-01-15 16:38:13 +01:00
Benno Schulenberg
64366d9992
startup: make an error message succinct and to the point
...
The verbosity "hid" the really relevant information:
filename, line number, and the error message.
Valid values and other details can be found in the manual pages.
2018-01-15 13:24:14 +01:00
Benno Schulenberg
bd97ae7255
tweaks: set a modifier in a single place, for conciseness
2018-01-15 13:15:23 +01:00
Benno Schulenberg
2ff398c685
tweaks: reshuffle some stuff, and avoid a memory leak
2018-01-15 13:07:42 +01:00
Brand Huntsman
4b24ce1c11
startup: parse interface colors when they are read, not when initialized
...
When the palette is getting initialized, it is too late to send any
error messages about the rcfile options to standard error.
This fixes https://savannah.gnu.org/bugs/?52871 .
Reported-by: Brand Huntsman <alpha@qzx.com>
Signed-off-by: Brand Huntsman <alpha@qzx.com>
2018-01-15 13:04:55 +01:00
Benno Schulenberg
00c1105c1b
search: suppress the occurrence at the cursor only when replacing
...
When we're just searching, we do want to report the occurrence at
the cursor (after coming full circle) as a match, so that we can
mention that this is the only occurrence. When replacing, we do
not want to replace this match twice.
This fixes https://savannah.gnu.org/bugs/?52888 .
2018-01-15 11:38:19 +01:00
Benno Schulenberg
6a4d88cb4c
docs: update the FAQ for the changed default location of history files
...
And reword some things about translations and Unicode support.
2018-01-14 11:51:21 +01:00
Benno Schulenberg
898c4c6fbb
startup: move the initialization of colors, so any error gets printed
...
Suggested-by: Brand Huntsman <alpha@qzx.com>
2018-01-12 10:50:28 +01:00
Benno Schulenberg
c1bb6485de
tweaks: check for the type of terminal far earlier
...
So the result could be used during RC-file reading.
2018-01-12 09:51:43 +01:00
Benno Schulenberg
4bcce96a4f
docs: update the TODO file to the current state of affairs
2018-01-12 09:34:37 +01:00
Benno Schulenberg
caeed6821c
tweaks: reshuffle two condition series, to look better
2018-01-11 13:02:55 +01:00
Benno Schulenberg
eb1bf8f927
tweaks: rename a variable, and further condense some comments
2018-01-11 12:52:14 +01:00
Benno Schulenberg
2c8b99d5e9
tweaks: condense and rewrap some comments, and reindent two lines
...
Also drop an old debugging fragment.
2018-01-11 10:51:18 +01:00
Benno Schulenberg
091dd71f08
tweaks: remove a superfluous case -- there can never be four digits
2018-01-11 10:31:23 +01:00
Benno Schulenberg
837475519b
input: fully reset state when a three-digit character code is cut short
...
There shouldn't be two separate variables (but with the same name) that
count the number of digits seen. Fuse them into a single static var.
This fixes https://savannah.gnu.org/bugs/?52863 .
2018-01-11 10:17:51 +01:00
Benno Schulenberg
31540e3e7e
tweaks: remove a superfluous check, as we insert always one code
2018-01-10 21:32:32 +01:00
Benno Schulenberg
ae3b8579fa
tweaks: condense a condition and a comment, and reshuffle a line
2018-01-10 21:25:19 +01:00
Benno Schulenberg
e1199cd94d
tweaks: elide a tiny intermediate buffer, and rename two variables
...
Use the same method as in parse_verbatim_kbinput() for Unicode input.
2018-01-10 20:33:12 +01:00
Benno Schulenberg
45d2458b47
tweaks: don't bother freeing the key buffer, just reallocate it
2018-01-10 19:25:23 +01:00
Benno Schulenberg
4c505e5127
tweaks: rename a function, for aptness, and drop a superfluous check
2018-01-10 17:40:07 +01:00
Benno Schulenberg
e3b13ae124
tweaks: reshuffle a couple of lines
2018-01-09 16:52:42 +01:00
Benno Schulenberg
e5440b390e
replacing: don't skip the first character of a backwards-marked region
...
Also, when replacing forwards, do not first skip the occurrence at the
cursor and then replace it at the end of the cycle, but begin with it,
as one would expect.
This fixes https://savannah.gnu.org/bugs/?52789
and fixes https://savannah.gnu.org/bugs/?52791 .
2018-01-09 16:52:42 +01:00
Benno Schulenberg
2a17527381
tweaks: indenting text files with tabs is not a good idea
...
The tabsize can vary by configuring editor or viewer, but
the text has some kind of intended alignment.
Also, change the indentation a bit, to make things line up
more neatly.
2018-01-09 16:51:16 +01:00
Benno Schulenberg
8067efa6cc
syntax: nanohelp: color also the Sh-Tab key combo
2018-01-09 16:34:31 +01:00
Benno Schulenberg
0bb6c0234f
tweaks: condense the conditional compilation of shortcut reassignments
...
These three functions are needed only when both linter and speller
are available.
2018-01-09 13:31:58 +01:00
Benno Schulenberg
7947d9d2a5
build: fix compilation when configured with --enable(tiny,color,nanorc}
...
This fixes https://savannah.gnu.org/bugs/?52834 .
Reported-by: <akiko@mailbox.org>
2018-01-09 13:30:25 +01:00
Benno Schulenberg
c9ccb39752
tweaks: fully include Savefile and Wherewas in the tiny version
...
If help is enabled, those functions should be described too,
and if nanorc is enabled, they should both be rebindable.
2018-01-09 11:49:21 +01:00
Benno Schulenberg
ada78dc89d
build: fix compilation with --enable-tiny --enable-justify
2018-01-08 19:12:41 +01:00
Benno Schulenberg
c6f367268b
syntax: lua: do not color debug.setinfo as it doesn't exist
...
Reported-by: Tom Levy <tomlevy93@gmail.com>
2018-01-06 17:59:28 +01:00
Benno Schulenberg
084dda3837
po: update translations and regenerate POT file and PO files
2018-01-02 16:07:04 +01:00
Benno Schulenberg
30f367e0db
bump version numbers and add a news item for the 2.9.2 release
2018-01-02 15:51:12 +01:00
Benno Schulenberg
5965e80a38
tweaks: fold some regexes into one another, for conciseness
...
The anchored "^texture" appears to have been a mistake.
Inspired-by: Tom Levy <tomlevy93@gmail.com>
2018-01-01 16:00:18 +01:00
Tom Levy
a794c3318b
syntax: go: sign of exponent in number literal is optional
...
Signed-off-by: Tom Levy <tomlevy93@gmail.com>
2018-01-01 15:27:31 +01:00
Tom Levy
d04b0c123e
syntax: go: fix word boundary before dot in number literal
...
The fragment "\<\." can never match anything because \< matches the
beginning of a word but "." is not a word character.
Replace \< with \B (the empty string not at the edge of a word).
Signed-off-by: Tom Levy <tomlevy93@gmail.com>
2018-01-01 15:25:26 +01:00
Benno Schulenberg
21cd953e85
syntax: lua: condense some regexes, tweak comments, reorder things
...
Also remove some redundant backslashes and parentheses.
2018-01-01 14:59:00 +01:00
Tom Levy
058b9da9b9
syntax: lua: add new and missing standard library functions
...
The list now includes all the Lua 5.3 functions listed on
https://www.lua.org/manual/5.3/#index .
Also, remove the coloring of just the library name, so that
only known library functions get highlighted.
Signed-off-by: Tom Levy <tomlevy93@gmail.com>
2018-01-01 14:35:19 +01:00
Tom Levy
38a10a62d0
syntax: lua: support fractional part and exponent for decimal and hex
...
As of Lua 5.2: "Hexadecimal constants also accept an optional fractional
part plus an optional binary exponent, marked by a letter 'p' or 'P'"
(see at the end of https://www.lua.org/manual/5.2/manual.html#3.1 ).
The new regexes do not match a leading nor a trailing dot, but they
are good enough. Discussion on the mailing list:
https://lists.gnu.org/archive/html/nano-devel/2017-12/msg00121.html
Signed-off-by: Tom Levy <tomlevy93@gmail.com>
2018-01-01 14:15:14 +01:00