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
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
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
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
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
17429d7f38
tweaks: fix some whitespace errors, and convert alignment tabs to spaces
2017-12-29 21:35:14 +01:00
Benno Schulenberg
87206c0607
tweaks: convert the indentation to use only tabs
...
Each leading tab is converted to two tabs, and any leading four spaces
is converted to one tab. The intended tab size (for keeping most lines
within 80 columns) is now four.
2017-12-29 20:06:50 +01:00
Benno Schulenberg
b574f73e60
tweaks: add a separate function that actually wipes the status bar
2017-12-29 17:40:41 +01:00
Benno Schulenberg
eac90c3eff
prompt: blank the bar when a "continue?" is answered with No or ^C
...
This fixes https://savannah.gnu.org/bugs/?52755 .
Reported-by: Brand Huntsman <alpha@qzx.com >
2017-12-29 17:01:15 +01:00
Benno Schulenberg
440a128d25
indenting: keep affecting last line of marked region if it was at first
...
When unindenting/uncommenting affected the bottom line of the marked
region, keep affecting this line also during subsequent consecutive
indenting/commenting.
This fixes https://savannah.gnu.org/bugs/?52718 .
2017-12-29 16:52:17 +01:00
Benno Schulenberg
12073001c2
tweaks: condense, reword, and rewrap a bunch of comments
2017-12-26 22:14:25 +01:00
Benno Schulenberg
4c20135749
help: swap the order of the Complete and Comment functions
...
So that Commenting comes closer to the somewhat related Indenting
and Unindenting functions.
2017-12-26 21:36:29 +01:00
Benno Schulenberg
f9ebf038e0
tweaks: slightly rename four functions, for aptness and variety
2017-12-26 14:15:49 +01:00
David Lawrence Ramsey
62ebd93579
tweaks: use printf's z modifier for (s)size_t, instead of casting
2017-12-26 14:11:18 +01:00
Benno Schulenberg
a10fdc3fb1
help: show that "Tab" will indent, just like "Sh-Tab" will unindent
...
Also, make the descriptions for indenting/unindenting more precise.
2017-12-26 13:46:34 +01:00
Benno Schulenberg
8581e702d6
tweaks: move some frequently-used keystrokes to the top of the list
...
So they will be found quicker.
Also fold two assignments into one.
2017-12-26 13:31:50 +01:00
Benno Schulenberg
23d66949e1
tweaks: frob four comments, and rewrap two lines
2017-12-24 11:53:38 +01:00
Benno Schulenberg
184bb11fd9
tweaks: factor out a piece of common code
2017-12-24 11:25:10 +01:00
Benno Schulenberg
a70db34fc9
tweaks: remove two irrelevant conditions
...
They were mistakenly added by changeset fb85c055 , four commits ago.
2017-12-24 11:10:41 +01:00
Benno Schulenberg
fbde1b2d71
tweaks: reshuffle another bit of code, for conciseness
2017-12-24 10:56:16 +01:00
Benno Schulenberg
c22fef18e4
tweaks: reshuffle a bit of common code, moving it to an existing function
2017-12-23 21:50:18 +01:00
Benno Schulenberg
ee5b250b66
indenting: don't exclude last line of region when region is empty
...
This fixes https://savannah.gnu.org/bugs/?52717 .
2017-12-23 11:42:25 +01:00