Commit Graph

7790 Commits (d79b9823aea9ce80ec38a6482306351fad227a99)

Author SHA1 Message Date
Benno Schulenberg cb7c8255f4 options: warn when option -O or -S is given, and ignore them
If these two command-line options would override an rcfile setting of
their counterpart new option, the user might come to expect being able
to do this also in the future.  But these old options will be obsoleted
at some moment, so... better start ignoring them right now.
2019-02-19 19:13:53 +01:00
Benno Schulenberg 60bdac2bbc docs: describe breaklonglines, emptyline, finalnewline, jumpyscrolling 2019-02-19 19:06:26 +01:00
Benno Schulenberg f6c767a372 docs: describe the four new options (-b, -f, -j, -e) 2019-02-19 17:48:43 +01:00
Benno Schulenberg 6c89815e8b docs: stop saying that --fill switches on automatic hard-wrapping
The two were decoupled in the previous commit.  Just say that --fill
sets the target width for both justifying and automatic hard-wrapping.
2019-02-18 09:41:56 +01:00
Benno Schulenberg 894aff0816 options: let --fill no longer imply automatic hard-wrapping
Now --fill only sets the target width for hard-wrapping and justifying,
but automatic hard-wrapping itself is switched on with --breaklonglines.
2019-02-18 09:34:18 +01:00
Benno Schulenberg 556c0a3865 rcfile: when an old flag is unset, set the corresponding new flag
This fixes https://savannah.gnu.org/bugs/?55583.
2019-02-18 09:34:18 +01:00
Benno Schulenberg 4d40bea58a rcfile: add the options that correspond to -b, -f, -j, and -e 2019-02-18 09:34:18 +01:00
Benno Schulenberg ee979ae7b3 options: add -e, --emptyline, the counterpart of --morespace 2019-02-18 09:34:18 +01:00
Benno Schulenberg 401e43969c options: add -j, --jumpyscrolling, the counterpart of --smooth 2019-02-18 09:34:18 +01:00
Benno Schulenberg 5dbd9c0043 options: add -f, --finalnewline, the counterpart of --nonewlines 2019-02-18 09:34:18 +01:00
Benno Schulenberg cd9328fbf5 options: add -b, --breaklonglines, the counterpart of --nowrap 2019-02-18 09:34:18 +01:00
Benno Schulenberg 7811f3fc5a menus: put the ^T toggle in Search in the same position as in Goto-Line
So that when toggling it, the ^T in the help lines stays roughly in the
same place.
2019-02-17 10:24:03 +01:00
Benno Schulenberg 5f07b96d47 menus: move the paragraph-jumping functions from Search to Goto-Line
The start-of-paragraph and end-of-paragraph seeking functions are only
vaguely related to searching, and have nothing to do with replacing --
the functions make more sense in the Goto-Line menu.

Also, the Goto-Line menu is much less crowded, so the functions are
more likely to be noticed there.  Furthermore, this makes harmless a
typo that I sometimes make: typing ^W again when I've already done so.
2019-02-17 09:53:35 +01:00
Benno Schulenberg bc98dbcab4 menus: remove the ^Y and ^V shortcuts from the Search menus
Jumping to the first or last line of the buffer doesn't have anything
to do with searching, so these functions shouldn't be present in the
search menus.  They make perfect sense in the Goto-Line menu, though.
2019-02-17 09:52:57 +01:00
Benno Schulenberg 252bb60036 display: highlight the ">"/"<" continuation characters in reverse video
To make it obvious that they are not actual characters in the file.

The default highlighting is in reverse video, but this can be changed
to bold by using --bold or 'set boldtext'.

This fulfills https://savannah.gnu.org/bugs/?55571.
2019-02-15 17:15:28 +01:00
Benno Schulenberg 6d34b8a5cd display: change the "$" continuation character to ">" and "<"
The angular brackets look a bit like arrows and thus hint much more
at the idea of continuation than a dollar sign.

With-help-from: David Lawrence Ramsey <pooka109@gmail.com>
2019-02-15 17:12:57 +01:00
Benno Schulenberg ad505e7fff display: represent half of a double-width character with "[" and "]"
When the screen's edge leaves just one column for a two-column
character, then show its left half as "[" and its right half as "]".

(They used to be shown as ">" and "<", but these characters will be
repurposed in the next commit.)

This addresses https://savannah.gnu.org/bugs/?55657.
Reported-by: David Lawrence Ramsey <pooka109@gmail.com>
2019-02-15 17:12:34 +01:00
Benno Schulenberg e7557a9293 tweaks: condense a handful of comments 2019-02-12 17:32:56 +01:00
Benno Schulenberg 757d223064 tweaks: don't bother executing two functions that are empty
The get_history_older_void() and get_history_newer_void() functions
are mere names, they don't actually do anything.  So... don't bother
to execute them, so the 'finished' variable doesn't have to be reset
after calling them.

Also, normalize the order of those two empty functions.
2019-02-12 16:06:24 +01:00
Benno Schulenberg ea4ba3a150 tweaks: add an alias for a string variable, so the code makes more sense 2019-02-12 16:06:24 +01:00
Benno Schulenberg 32d7d3900d tweaks: reshuffle a few lines, and condense some comments 2019-02-12 16:06:24 +01:00
Benno Schulenberg b57336ad00 tweaks: rename some variables, to match others that have the same task 2019-02-12 16:06:24 +01:00
Benno Schulenberg ebfe752841 tweaks: rename some variables from a single letter to meaningful word 2019-02-12 16:06:24 +01:00
Benno Schulenberg 14f32577ee display: ensure that spotlighted text is not treated as a prompt answer
When doing replacements or fixing misspelled words, and edit_refresh()
is called to highlight the relevant word, then the current menu can be
anything from MREPLACEWITH, MYESNO, MSPELL, or MMAIN.  Make sure it is
always set to the latter just before calling edit_refresh(), so that
display_string() will use the full length and the word gets properly
highlighted.

This fixes https://savannah.gnu.org/bugs/?55680.
Reported-by: David Lawrence Ramsey <pooka109@gmail.com>

Bug was introduced by the previous commit, 56181896.
2019-02-12 15:07:55 +01:00
Benno Schulenberg 5618189643 prompt: trim a double-width character at the screen's edge
It needs to be trimmed and substituted with a single-width placeholder
to prevent the continuation character ">" from getting pushed to the
next row.

Also, use the correct width for the answer so that the continuation
character is only displayed when the answer does not fit any more.

This fixes https://savannah.gnu.org/bugs/?55620.
Reported-by: David Lawrence Ramsey <pooka109@gmail.com>

Original-patch-by: David Lawrence Ramsey <pooka109@gmail.com>
2019-02-07 20:04:56 +01:00
Benno Schulenberg cf634d1aff browser: show the ^G item again in the help lines
Also, prune another statement as MMOST no longer includes MBROWSER.

This fixes https://savannah.gnu.org/bugs/?55655.

Bug existed since version 3.2, commit cc01bc3e.
2019-02-06 16:36:42 +01:00
David Lawrence Ramsey edc0d6280a display: properly trim double-width characters at the edit window's edge
When a line ends with a two-column character, and this character straddles
the edit window's edge, then, although we've reached the end of 'buf', we
have exceeded the 'beyond' column and this two-column character needs to
be trimmed from the 'converted' string, otherwise it would get printed on
the next row.

This fixes https://savannah.gnu.org/bugs/?55638.

Bug existed since version 2.8.0, commit 5283acdc.
2019-02-06 10:09:55 +01:00
Benno Schulenberg 6470106eef docs: mention nano's major features directly instead of referring
In addition, the referral in the FAQ was to nano's home page,
which does not mention any advantages or features of nano.
2019-01-31 20:30:53 +01:00
Benno Schulenberg b89540218d tweaks: add two comments, and reduce the scope of another variable 2019-01-27 11:18:55 +01:00
Benno Schulenberg 77c60201d5 tweaks: reduce the scope of a variable, and rename it 2019-01-27 11:10:29 +01:00
Benno Schulenberg 2482cfca56 build: eradicate the --disable-wrapping-as-root configure option
Hard-wrapping is disabled by default for any user, so this special
configure option is no longer needed.
2019-01-25 11:37:51 +01:00
Benno Schulenberg 946755a307 options: disable hard-wrapping and automatic newlines by default
Also, enable smooth scrolling by default, and don't waste the row
directly below the title bar.  The use of the latter also serves
as a small visual reminder that this nano is different.

This addresses https://savannah.gnu.org/bugs/?55067.
2019-01-25 11:37:21 +01:00
Benno Schulenberg 98b1f8f059 options: stop recognizing and ignoring -b, -e, -f, -j, and -q
This signals our break from trying to be as compatible with Pico as
possible.  We were already incompatible with modern Pico in the -n
and -W options, and in several character-set and color options, so
ignoring those five options brought us very little.

Anyway, soon some of those options will be reused and will have the
effect of making nano look and behave more like Pico.
2019-01-25 11:22:56 +01:00
Benno Schulenberg 38e3318e5f tweaks: reword the description of the disadvantages of Pico
Also reword a list of features to exclude the ones that only
make sense when contrasting nano with Pico.
2019-01-25 11:00:51 +01:00
Benno Schulenberg 6aad99bd81 docs: stop implying that nano wants to be fully compatible with Pico 2019-01-25 10:50:14 +01:00
Benno Schulenberg 4b8bd27d08 bindings: change the action of <Alt+Up>/<Alt+Down> to 'scroll linewise'
Using the cursor keys for movement-related functions makes more sense
than using them for jumping to the previous or next occurrence of the
search string.

(For searching another occurrence backward the M-Q binding has become
available, while M-W will search another occurrence always forward.)
2019-01-24 20:24:09 +01:00
Benno Schulenberg 757f558f3b tweaks: renumber some FAQ items, to compensate for the deleted ones
Also, reshuffle one item, to have related items next to each other.
2019-01-23 20:59:30 +01:00
Benno Schulenberg 1f9283ec82 docs: remove from the FAQ some items that are no longer relevant 2019-01-23 20:53:08 +01:00
Benno Schulenberg 2eb1960523 docs: mention that 'quotestr' enables the rewrapping of comment blocks
Inspired-by: David Griffith <dave@661.org>
2019-01-23 20:01:49 +01:00
Benno Schulenberg 4bf650f021 tweaks: condense a comment, and drop two others
And replace a statement with a self-explanatory one.
2019-01-22 20:25:07 +01:00
Benno Schulenberg 63db58cbfd docs: adjust for the enhancement of the default quoting regex 2019-01-22 20:06:14 +01:00
Benno Schulenberg c5a72103bf justify: extend the quoting regex, to cover more types of comments
Now also comment blocks in Fortran, Lisp, Lua, Postgres, and TeX
can be rewrapped with ^J.

This partially addresses https://savannah.gnu.org/bugs/?55435.
Kind-of-requested-by: David Griffith <dave@661.org>
2019-01-22 17:57:19 +01:00
Benno Schulenberg da4b7e430f files: retain a Shift-selected region when switching between buffers
The user did not move the cursor nor intend to move the cursor, so
leave things as they are.

This fixes https://savannah.gnu.org/bugs/?55535.
Indirectly-reported-by: David Lawrence Ramsey <pooka109@gmail.com>
2019-01-21 12:24:45 +01:00
David Lawrence Ramsey e771503ee5 tweaks: adjust indentation after the previous commit 2019-01-15 19:47:11 +01:00
David Lawrence Ramsey 194d18586c input: properly handle <Escape>s followed by a shifted Meta+letter
After a series of escapes, also <Shift+Meta+letter> should be recognized
as a command keystroke, not just <Meta+letter>.

This fixes https://savannah.gnu.org/bugs/?55442.

Bug existed since the ignoring of <Escape>s before a valid command
keystroke was introduced in version 3.0, commit ecc9211a.
2019-01-15 19:41:48 +01:00
Benno Schulenberg e1a6f58da6 startup: check that a backup directory is valid also when backups are off
When the user switches backups on later (with M-B in the ^O menu),
the specified folder should have been checked for validity.

This fixes https://savannah.gnu.org/bugs/?55423.

Bug existed since the check for a valid backup directory was introduced
in version 2.8.7, commit 751e7f0f.
2019-01-10 20:31:48 +01:00
Benno Schulenberg 0ae80ce362 tweaks: reduce two parameters to a single one by summing them
Also, rename the remaining parameter and rename a variable.
2019-01-06 17:56:46 +01:00
Benno Schulenberg 0c42c51aa4 tweaks: rename two variables, to indicate better what they mean 2019-01-06 15:46:23 +01:00
Benno Schulenberg f74a120803 tweaks: refer to the magic line as "magic line", not as "magicline" 2019-01-06 15:35:31 +01:00
Benno Schulenberg 911eb0cf2a tweaks: rename and invert a function, to avoid double negatives 2019-01-06 13:12:44 +01:00