Benno Schulenberg
02d8da3bdd
tweaks: rename a function, to be more fitting and descriptive
...
It is not an abort but simply a bit of cleaning up.
2018-04-13 10:32:29 +02:00
Benno Schulenberg
7a09b655c1
tweaks: rename a variable, for clarity
2018-04-13 10:22:39 +02:00
Benno Schulenberg
c8b26baee8
tweaks: elide a function that is called just once
...
Also adjust and correct a comment.
2018-04-13 10:17:08 +02:00
Liu Hao
bb394990cd
replacing: always clear the backwards flag for ^\, just like for ^W
...
This makes it easier to predict in which direction the replacements
will go when hitting ^\ or M-R.
Signed-off-by: Liu Hao <lh_mouse@126.com>
2018-04-12 20:32:15 +02:00
Benno Schulenberg
7c5d099c6f
tweaks: frob a couple of comments
2018-04-01 21:07:18 +02:00
Benno Schulenberg
152cc24d1f
tweaks: reshuffle two declarations
2018-04-01 20:08:57 +02:00
Benno Schulenberg
8965103a4d
tweaks: remove the group handling for undoing/redoing (un)indents
...
Indenting/unindenting always happens in a single contiguous block.
Lines that cannot or should not be indented or unindented do not
need to remembered separately as it follows from their content.
2018-04-01 11:41:26 +02:00
Benno Schulenberg
d0d293b8af
tweaks: correct or improve a couple of comments
2018-04-01 11:24:44 +02:00
Benno Schulenberg
839743fd24
tweaks: move a function to its proper location
2018-04-01 10:54:14 +02:00
Benno Schulenberg
0b30835dd0
tweaks: use meaningful names instead of puzzling values
...
Suggested-by: Brand Huntsman <alpha@qzx.com>
2018-04-01 09:49:58 +02:00
Benno Schulenberg
a865c25eea
build: fix compilation when configured with --disable-help
...
This fixes https://savannah.gnu.org/bugs/?53532 .
2018-03-31 16:52:22 +02:00
Benno Schulenberg
cf1129a8b4
syntax: sh: colorize options only when they are preceded by whitespace
...
To prevent any filenames containing hyphens getting partially colored.
Reported-by: Brand Huntsman <alpha@qzx.com>
2018-03-30 10:46:56 +02:00
Benno Schulenberg
0cd833e64b
tweaks: move a function to its proper location
...
Put it after the function that it calls, and before the functions
it is called from.
2018-03-30 10:34:40 +02:00
Benno Schulenberg
cbf226476d
rcfile: skip color commands where some color name is invalid
...
That is, do not fall back to the default background color when the
name for the background color is invalid, but reject the entire
color command, just like for an invalid foreground color.
2018-03-30 10:30:55 +02:00
Benno Schulenberg
9fcfee18e8
po: update translations and regenerate POT file and PO files
2018-03-29 10:17:00 +02:00
Benno Schulenberg
27eccbec23
bump version numbers and add a news item for the 2.9.5 release
2018-03-29 09:59:13 +02:00
Benno Schulenberg
0bce5ba4d9
syntax: sh: color options distinctively, and color also long options
...
Also add some comments, and accept hyphens in function names.
2018-03-29 09:51:39 +02:00
Benno Schulenberg
f9415e347a
docs: clarify how the Linux console is deficient: in the arrow keys
2018-03-28 19:34:26 +02:00
Benno Schulenberg
f3c4dadcf6
build: fix compilation with --enable-{tiny,help,multibuffer}
2018-03-28 16:37:47 +02:00
Benno Schulenberg
20d1823d90
syntax: sh: uncolor "tar" when it's part of a filename
2018-03-28 14:04:00 +02:00
Benno Schulenberg
e01bcddf16
docs: document the newly added color name "normal"
2018-03-28 14:03:52 +02:00
Benno Schulenberg
570fb6c606
small addition: understand color name "normal" to mean the default color
...
This allows a syntax to remove the color from things that were colored
overeagerly by earlier regexes.
2018-03-28 14:03:22 +02:00
Benno Schulenberg
1de3667555
syntax: sh: color also the 'cut', 'head', 'tail', and 'sort' commands
2018-03-27 14:09:38 +02:00
Benno Schulenberg
5726514869
linting: drop messages for other files when configured for one buffer
...
This fixes https://savannah.gnu.org/bugs/?53445 .
2018-03-26 08:56:03 +02:00
Benno Schulenberg
88234c90bc
tweaks: adjust the indentation after the previous changes
2018-03-26 08:53:06 +02:00
Benno Schulenberg
02719ec4bf
tweaks: fuse two ifs into one
2018-03-26 08:52:51 +02:00
Benno Schulenberg
415bf82690
tweaks: move an 'if' and then remove an unneeded label
2018-03-26 08:52:04 +02:00
Benno Schulenberg
9bce8bfeb3
build: fix compilation when configured with --disable-multibuffer
2018-03-23 19:14:56 +01:00
Benno Schulenberg
2c024a74a9
tweaks: adjust or correct some comments, and rename a function
...
Also, reshuffle a condition so it takes up less space.
2018-03-23 17:54:06 +01:00
Benno Schulenberg
ab8698df47
tweaks: condense some code, to remove a bit of duplication
2018-03-23 17:14:39 +01:00
Benno Schulenberg
206d89b739
tweaks: revert commit c88a2fd9
-- the extra variable is needed
...
This variable will be modified by go_forward_chunks(), but the value
of openfile->current itself should be maintained.
2018-03-23 11:31:08 +01:00
Benno Schulenberg
eff2e0e291
help: describe the Scroll-Up and Scroll-Down commands more precisely
...
An "if possible" would have been nice, but there is no room for that.
2018-03-23 11:10:19 +01:00
Benno Schulenberg
c5e20164c3
tweaks: rewrap and amend some lines in the NEWS file
2018-03-23 11:09:59 +01:00
Benno Schulenberg
0f1f53a441
tweaks: drop a handful of unhelpful asserts
2018-03-23 11:09:56 +01:00
Benno Schulenberg
bf1a080923
build: exclude more things when configured with --disable-multibuffer
...
This will make the tiny version slightly smaller.
2018-03-23 11:09:37 +01:00
Benno Schulenberg
b7f8d4819b
tweaks: frob some comments plus miscellaneous other stuff
2018-03-22 19:54:20 +01:00
Benno Schulenberg
30fc197b66
tweaks: adjust a couple of types, to reduce the number of warnings
...
This avoids eleven warnings of the kind "comparison between signed
and unsigned integer expressions [-Wsign-compare]".
2018-03-22 19:33:22 +01:00
Benno Schulenberg
c88a2fd9ca
tweaks: elide an unneeded and shadowing variable
2018-03-22 15:20:05 +01:00
Benno Schulenberg
b9de5525c4
tweaks: elide a parameter, as it's always the inverse of another
2018-03-22 12:52:28 +01:00
Benno Schulenberg
f4d1ef1c4e
tweaks: remove unneeded settings and unsettings of MULTIBUFFER
...
In the preceding commit, open_buffer() was changed so that it gets
told whether to load into a new buffer or not, so it is no longer
needed to convey this information through a flag.
2018-03-22 12:50:48 +01:00
Benno Schulenberg
dd157f1494
tweaks: change a parameter of open_buffer() and invert its logic
2018-03-22 12:35:50 +01:00
Benno Schulenberg
624918800b
tweaks: bundle some settings for a new buffer
2018-03-22 12:27:04 +01:00
Benno Schulenberg
8b8c6bb818
tweaks: factor out the check for 'viewok' into its own function
...
And also prevent a theoretical crash for restricted prompt functions.
2018-03-20 20:10:08 +01:00
Kamil Dudka
b830a7dd38
input: do not crash if sctofunc() returns NULL
...
This fixes a regression introduced by commit 54103d8e: a crash that
can be triggered by running 'nano --restrict' and pressing <Insert>.
This addresses https://bugzilla.redhat.com/1558532 .
2018-03-20 19:36:55 +01:00
Benno Schulenberg
3e5b0ea5fd
files: prevent an infinite loop when reading from standard input fails
2018-03-20 11:25:16 +01:00
Benno Schulenberg
a1132c81a1
files: prevent the undo of reading a file into a new buffer
...
When the file has just been read, it is in the state that it has
on disk, so there is nothing to undo.
This fixes https://savannah.gnu.org/bugs/?53387 .
2018-03-20 11:14:55 +01:00
Liu Hao
0496aed4ab
build: fix compilation error when configured with --disable-justify
...
Signed-off-by: Liu Hao <lh_mouse@126.com>
2018-03-19 13:39:15 +01:00
Benno Schulenberg
373e3b880f
scrolling: first move the cursor before pushing current chunk offscreen
...
When the cursor is on the first or last row of the edit window, and
thus Scroll-Down or Scroll-Up would push it offscreen, first move
the cursor away from the edge row and then scroll.
This fixes https://savannah.gnu.org/bugs/?53376 .
2018-03-18 20:06:29 +01:00
David Lawrence Ramsey
7b1f3f4fe7
tweaks: correct several parameter types
...
This avoids a bunch of warnings when compiled with -pedantic:
ISO C forbids comparison of ‘void *’ with function pointer
2018-03-18 20:01:25 +01:00
Benno Schulenberg
9517972b58
build: fix compilation again when configured with --enable-tiny
2018-03-18 16:33:21 +01:00