Commit Graph

7023 Commits

Author SHA1 Message Date
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
Benno Schulenberg
f72fecee9b copyright: update the years for the FSF
And one for me, for the much changed keyboard stuff.
2018-01-24 10:14:43 +01:00
Benno Schulenberg
97a8a62128 gnulib: update to its current upstream state 2018-01-24 10:02:28 +01:00
Benno Schulenberg
f095e20a86 tweaks: exclude --trimblanks when no wrapping or justifying is configured
Also, actually add the long option --trimblanks to the table.
2018-01-24 09:59:01 +01:00
Benno Schulenberg
fa7e9b11df input: recognize more escape sequences for <Shift+Home> and <Shift+End>
This fixes the second part of https://savannah.gnu.org/bugs/?52960.
2018-01-23 19:44:18 +01:00
Benno Schulenberg
838b175d4f input: recognize escape sequences for <Shift+PageUp> and <Shift+PageDown>
This fixes the first part of https://savannah.gnu.org/bugs/?52960.
2018-01-23 19:32:13 +01:00
Benno Schulenberg
ba1f990582 build: let ./configure fail (not just warn) when curses.h is missing
This fixes https://savannah.gnu.org/bugs/?52930.
Reported-by: Michail Tsiolkas <mtsio@cryptolab.net>
2018-01-23 19:15:18 +01:00
Benno Schulenberg
6795d079b1 tweaks: mark the two blocks that have a deviant indentation
Also, reshuffle a case, to put the short one first and lose a line.
2018-01-23 18:10:22 +01:00
Benno Schulenberg
e739448cd0 input: consume only the actual length of an escape sequence
Instead of assuming that the entire contents of the keybuffer are an
escape sequence (even if this is far longer than any escape sequence
can be), remove from the keybuffer only those integers that actually
constituted a sequence, valid or invalid.

This fixes https://savannah.gnu.org/bugs/?48659.
2018-01-23 17:31:48 +01:00
Benno Schulenberg
8e328e43c2 input: make <Shift+Tab> do an unindent also on a Manjaro console
This fixes https://savannah.gnu.org/bugs/?52943.
2018-01-23 16:52:51 +01:00
Benno Schulenberg
cb56a575fd options: recognize -M and --trimblanks on the command line 2018-01-23 13:49:48 +01:00
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