Commit Graph

8716 Commits (f3b030c8e535c93c9a23cd09cb2b8bde43ece187)

Author SHA1 Message Date
Benno Schulenberg 3233e9cfe0 tweaks: correct a comment
The maximum length was increased two weeks ago, in commit 4dcbd40c.
2020-01-12 11:18:29 +01:00
Benno Schulenberg 5a98a51173 bindings: do not show the Full-Justify keystroke when in View mode
The file may not be modified when in View mode, so it makes no sense
to prominently show the M-J keystroke in the Search menu when in that
mode, especially since the keystroke does not really belong there.

This addresses https://savannah.gnu.org/bugs/?57574.
2020-01-10 17:24:29 +01:00
Benno Schulenberg 2eaba21a4c help: increase the minimum help-text width from 24 to 32 columns
Even at 32 columns, the key descriptions are already hopelessly
fragmented.  Any width smaller than that is useless.
2020-01-09 15:10:52 +01:00
Benno Schulenberg 9a227de3e7 tweaks: recompute the wrapping point just once
Instead of for every row after the intro.
2020-01-09 14:47:48 +01:00
Benno Schulenberg 3f57200e10 help: prevent double spaces from protruding across the right edge
This fixes https://savannah.gnu.org/bugs/?57563.
2020-01-09 12:02:49 +01:00
Benno Schulenberg 1486f32d42 help: when a key description wraps, indent its wrapped part
This prevents the wrapped text from cluttering up the two key columns.

This addresses https://savannah.gnu.org/bugs/?57451.
2020-01-09 11:37:49 +01:00
Benno Schulenberg e3edce4e7b tweaks: elide a helper function, in preparation for an improvement 2020-01-09 11:02:36 +01:00
Benno Schulenberg 0e559c5bbc tweaks: initialize three more booleans straightaway, at declaration
Also improve three comments.
2020-01-09 10:37:56 +01:00
Benno Schulenberg edfbfbfd0a tweaks: initialize three booleans straightaway, when they are declared
Also improve three comments.
2020-01-08 16:55:45 +01:00
Benno Schulenberg a4eae770ce tweaks: rename a function, to be a bit more expressive 2020-01-08 16:13:04 +01:00
Benno Schulenberg 72e5c15110 tweaks: move three functions to the file where they are mainly used
The extract() and copy_from_buffer() functions are mainly used for
cutting a line or a region, so move them to src/cut.c.  Also move
the function for which copy_from_buffer() is a wrapper.
2020-01-08 16:04:49 +01:00
Benno Schulenberg 97c8140cea tweaks: rename two functions, to make more sense 2020-01-08 11:09:57 +01:00
Benno Schulenberg c5b03ca4ae tweaks: rename two variables, to make more sense 2020-01-08 11:00:51 +01:00
Benno Schulenberg c2f2c659d9 tweaks: rename a parameter and invert its logic, and correct a comment
This changes the main injection routine in the same way that the prompt
injection routine was changed four years ago in commit e540053e.
2020-01-08 10:49:19 +01:00
Benno Schulenberg 9364bd6c81 tweaks: reword two comments, and rewrap another 2020-01-08 10:27:30 +01:00
Benno Schulenberg baa2be3217 tweaks: improve a comment by indirectly referring to the ncurses docs
See https://invisible-island.net/ncurses/ncurses-intro.html#xterm.
2020-01-07 20:25:31 +01:00
Benno Schulenberg 12742586e5 tweaks: adjust or reword a few items in the FAQ 2020-01-07 16:55:30 +01:00
Benno Schulenberg 194620c5f0 docs: add a FAQ item about a self-compiled nano not reading /etc/nanorc 2020-01-07 14:34:23 +01:00
Benno Schulenberg 67d37adf98 tweaks: renumber some FAQ items in preparation for adding another 2020-01-07 14:24:47 +01:00
Benno Schulenberg 3f0d2fd5ca display: don't let a message write over the second help line
When suspending nano on a Linux console (or FreeBSD console), the
helpful message about using the 'fg' command overwrote the start
of the second help line, kind of hiding the message.  So, output
a double newline before the message to make it stand out.

Also, drop a pointless cursor movement, as endwin() determines
the placement of the cursor all by itself.
2020-01-07 13:38:52 +01:00
Benno Schulenberg 5b07e5fd1f input: discard partial sequences that Slang produces for F17 to F24
This fixes https://savannah.gnu.org/bugs/?57503.
2020-01-03 12:34:15 +01:00
Benno Schulenberg 3cae32390d display: show the cursor during suspension also when built with Slang
This fixes https://savannah.gnu.org/bugs/?57517.

Bug existed since version 2.9.0.
2020-01-03 12:08:27 +01:00
Benno Schulenberg 1be0285832 tweaks: delete some fragments of code that have become irrelevant
Since the previous commit, USE_SLANG can only be defined when NANO_TINY
is also defined.  This means that code that is present only in non-tiny
versions does not need to cater for Slang.
2020-01-03 12:00:06 +01:00
Benno Schulenberg 2867f1bbde build: restrict the use of --with-slang to together with --enable-tiny
Slang contains bugs that get triggered when resizing the terminal,
or rather: when its existing data structures get reinitialized.
Avoid those bugs by forcing the exclusion of the resizing code
when nano is configured with --with-slang.

(The only reason for not entirely eliminating the support for Slang
is to allow Debian to build a tiny nano against Slang for on their
install image.)

This avoids https://savannah.gnu.org/bugs/?57520,
and avoids https://savannah.gnu.org/bugs/?57518,
and dodges https://savannah.gnu.org/bugs/?57513,
and dodges https://savannah.gnu.org/bugs/?57507.
2020-01-03 11:41:22 +01:00
Benno Schulenberg c4d2bf59fb display: adjust line and column count upon a resize also when using Slang
This partially fixes https://savannah.gnu.org/bugs/?57513.
2020-01-01 14:17:03 +01:00
Benno Schulenberg 5527883c43 input: don't discard the first keystroke after a resize when using Slang
With ncurses, a window resize will cause getch() to return immediately
with some dummy value, which nano can discard.  But with Slang, getch()
will return only when the next keystroke is typed, so the received code
should then not be discarded.

This fixes https://savannah.gnu.org/bugs/?57507.
2020-01-01 13:54:07 +01:00
Benno Schulenberg ade93ccf25 docs: use more generally available arrows in the cheatsheet
Use bolded HTML entities for the four arrows, instead of the literal
triangular Unicode "arrows" which many fonts don't include.

This addresses https://savannah.gnu.org/bugs/?57505.
2019-12-30 16:41:22 +01:00
Benno Schulenberg 84b305f3f0 build: exclude the escape sequences for F13...F16 from the tiny version
The F13 to F16 function keys are no longer bound by default, and when
there is no nanorc file, there is no way to bind them, so there is no
point in recognizing their escape sequences.
2019-12-30 11:55:41 +01:00
Benno Schulenberg 67b89459d5 tweaks: drop an unneeded call of keypad() -- we never read from topwin
The title bar is used only for showing things, never for typing anything
into.  That is: we never call wgetch() with 'topwin' as an argument.
2019-12-29 14:14:08 +01:00
Benno Schulenberg 6d916c6c4a tweaks: rewrap a comment and a line, and reshuffle a fragment of code 2019-12-29 14:13:27 +01:00
Benno Schulenberg 87542eeaf1 tweaks: move a function to before the one that calls it
And condense its logic.  And improve its comment.
2019-12-27 17:01:15 +01:00
Benno Schulenberg 29f2e3181a tweaks: rename a function and its parameter, to be more fitting
Also, avoid calling a case-changing function when it's not needed.
And elide a default case that can never occur (because the function
always gets called with one of the four letters).
2019-12-27 16:48:07 +01:00
Benno Schulenberg 8255696b45 tweaks: condense five more fragments of repetitious code 2019-12-27 13:49:03 +01:00
Benno Schulenberg fc00e89499 tweaks: comment fully, so that all handled escape sequences are findable
Also correct a few other comments.
2019-12-27 13:48:36 +01:00
Benno Schulenberg 55946c15e7 tweaks: reshuffle some lines, to group all ignored keystrokes together 2019-12-27 12:16:50 +01:00
Benno Schulenberg 2e539e2c97 tweaks: stop recognizing escape sequences for a key without meaning
Nano does not do anything for the keystroke anyway (KEY_B2, the center
key on the numeric keypad, gets translated to ERR later on), so there
is no point in recognizing some of its escape sequences -- let those
sequences result in "Unknown sequence" instead.
2019-12-27 12:13:40 +01:00
Benno Schulenberg 38c286c019 input: recognize the raw escape sequences for F13 to F16 on xterm too
For symmetry with Gnome Terminal, Konsole, and the Linux console.

This fixes https://savannah.gnu.org/bugs/?57482.
2019-12-26 17:07:51 +01:00
Benno Schulenberg 56d842258c tweaks: condense three fragments of repetitious code 2019-12-26 16:50:19 +01:00
Benno Schulenberg 8ed8ab69d5 tweaks: make a couple of comments more precise 2019-12-26 14:32:44 +01:00
Benno Schulenberg 4dcbd40c49 input: consume and ignore the raw escape sequences for F17 to F24
When --rawsequences is used, consume the full escape sequences for
the F17 to F24 function keys (on xterm-compatible terminals and on
the Linux console), to prevent them entering junk into the buffer.

This fixes https://savannah.gnu.org/bugs/?57483.
2019-12-26 14:02:17 +01:00
Benno Schulenberg 72645b160d input: correct the escape sequence for PageUp/PageDown on Eterm/Urxvt
There is not a single terminal in the terminfo database that has an
"Esc [ n ^" sequence for any keystroke (where n is a digit).
2019-12-26 12:23:08 +01:00
Benno Schulenberg dda1b167c9 help: don't waste the last column in the help viewer on narrow terminals
When a line in a help text is wider than the terminal, then do not break
that line at COLS - 1, but simply at COLS.  In olden times it made some
sense to have an empty column on the right of the introductory text, to
mirror the one on the left.  But since the width of the introductions
got limited to 74 columns (four years ago, in commit a9aa0ef9), those
texts have (on a default 80-column terminal) at least six empty columns
on their righthand side.  And on narrower terminals, we really don't
want to waste anything and should use all available space.

Also, this whole mechanism of making an exception for end-of-string or
end-of-paragraph and letting only those make use of the final column,
it was a waste of time: it kind-of did the whole break_line() process
again, but then for the entire string (which can be some five hundred
characters long in the introductory texts).  So... get rid of it, make
it simple.  On an 80-column terminal it doesn't make any difference.
2019-12-25 14:39:17 +01:00
Benno Schulenberg 074cf40409 tweaks: remove a superfluous check
When break_line() is called with its last parameter set to TRUE
(meaning that it will break also at a newline) it will return a
value that is bigger than 1.  So it is pointless to ensure that
it is at least 1.
2019-12-25 14:32:04 +01:00
Benno Schulenberg 6c09504040 docs: stop saying that 'set fill' enables hard-wrapping -- it does not
This fixes https://savannah.gnu.org/bugs/?57477.
2019-12-25 14:20:35 +01:00
Benno Schulenberg 4991b3bb1a input: Ctrl+arrow is "Esc O x" on Eterm, as on rxvt -- not "Esc o x"
(Checked on Eterm-0.9.6 running on Xubuntu 18.04.)
2019-12-24 20:01:48 +01:00
Benno Schulenberg 075b7e75bc po: update translations and regenerate POT file and PO files 2019-12-23 11:37:33 +01:00
Benno Schulenberg c00431134f bump version numbers and add a news item for the 4.7 release 2019-12-23 11:15:53 +01:00
Benno Schulenberg 51065ff24b gnulib: update to its current upstream state 2019-12-22 13:25:32 +01:00
Benno Schulenberg 4314feae11 build: fix compilation for --enable-tiny --enable-wrapping 2019-12-22 12:56:18 +01:00
Benno Schulenberg 410280b089 build: fix compilation when configured with --disable-justify 2019-12-22 11:32:49 +01:00