Commit Graph

770 Commits (43b42246d3d795acb6b4dbbaa87f38b5feae91d6)

Author SHA1 Message Date
Benno Schulenberg c3cd0f3411 help: reword the description of ^U to avoid the impression of "Undo"
Instead of "Uncut" use the word "Paste", which is the common name for
this function.
2019-03-07 20:36:03 +01:00
Benno Schulenberg 37c8232f4d bindings: provide usable shortcuts for prevword/nextword in tiny version
In the tiny version the feature toggles are absent, so most of the
Meta-key combinations do nothing, and when --with-slang was used, the
<Ctrl+Left/Right> keystrokes do not work (as they produce truncated
escape sequences under Slang), and the <Ctrl+Space> and <Alt+Space>
keystrokes are awkward to type and make no sense.  So... use some
of the free Meta combinations to jump a word to the left or right,
since these functions *are* present in the tiny version.
2019-03-03 14:25:51 +01:00
Benno Schulenberg de47b58dc1 tweaks: move declaration of variable that does not need to be global
More importantly: searching in src/history.c will now not only find
the uses of 'position_history' but also its declaration.
2019-02-27 19:54:43 +01:00
Benno Schulenberg 79ca3ceabf copyright: update the years for the FSF 2019-02-24 19:35:56 +01:00
Benno Schulenberg b5ca8a00af tweaks: rename three functions and two symbols, to match the new wording 2019-02-24 17:32:17 +01:00
Benno Schulenberg 2c7d336711 bindings: rename 'cutwordleft' to 'chopwordleft', and similar for right
These bindable functions should not connote cutting, as they don't put
anything into the cutbuffer.
2019-02-24 17:31:40 +01:00
Benno Schulenberg 15c3e924b8 help: reword the tags for deleting a word left and right
Don't use the word "Cut", as the words are discarded and
not added to the cutbuffer.
2019-02-24 16:49:44 +01:00
Benno Schulenberg 031166c34d help: don't list the unbound <Alt+Up> and <Alt+Down> in the tiny version 2019-02-24 11:27:10 +01:00
Benno Schulenberg df4d181987 help, docs: say "Delete" when things don't go into the cutbuffer
Reported-by: Božidar Putanec <bozidarp@yahoo.com>
2019-02-24 11:00:06 +01:00
Benno Schulenberg 7fcf6e6068 menus: don't show ^S and ^Q in the help lines in the tiny version
On small terminals (80 columns or so), ^S and ^Q would be in
the last position of the help lines.  But some terminals might
intercept ^S and stop all output (until ^Q is pressed), which
could be unexpected and frustrating.  So, rearrange things for
the tiny version so that ^S appears only on very wide terminals.

Also, having two keystrokes for saving the current buffer
(^O and ^S) in the two help lines is wasteful, more so as
in the tiny version there are no ^G help texts.

So, show the more useful M-Q and M-W instead.

This addresses https://bugs.debian.org/915017.
Reported-by: Steve McIntyre <steve@einval.com>
2019-02-21 17:42:51 +01:00
Benno Schulenberg 322a6f46fa tweaks: switch from checking SMOOTH_SCROLL to checking JUMPY_SCROLLING 2019-02-19 19:52:57 +01:00
Benno Schulenberg 54055b6174 tweaks: switch from referencing NO_WRAP to referencing BREAK_LONG_LINES 2019-02-19 19:45:55 +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 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
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 125cc0cd74 tweaks: elide a tiny function by making a variable global
And in the bargain it makes things clearer, because the name
cutbuffer_reset() is misleading.
2018-12-30 13:36:29 +01:00
Benno Schulenberg 0946153b47 tweaks: hard-bind ASCII DEL in a slightly more economical way
And in the bargain get rid of a duplicate help-text entry for
either "Del" or "Bsp".
2018-12-28 17:20:18 +01:00
Benno Schulenberg 55c52c50d0 bindings: hard-bind ASCII code 0x08 (BS) to the backspace function
ASCII code BS should always do a backspace, also on systems where the
"^H" string gets redirected (for rebinding purposes) to KEY_BACKSPACE.

This fixes https://savannah.gnu.org/bugs/?55247.
Reported-by: Norton Warner <nortonwarner@gmail.com>
2018-12-23 18:45:12 +01:00
David Lawrence Ramsey 77bd8c2630 tweaks: swap the names of the variables 'wrap_at' and 'fill'
Now 'fill' contains the original specified value,
and 'wrap_at' the column that 'fill' translates to.
2018-12-18 19:50:59 +01:00
Benno Schulenberg e8751d1d5c bindings: make the normal scrolling keystrokes work also in help viewer
There is no reason why they shouldn't work.
2018-12-17 17:05:56 +01:00
Benno Schulenberg 38ca2a41f4 tweaks: reduce the scope of two variables, and rename one of them
Also, swap the order of the 'if', and don't bother setting a freed
string pointer to NULL as it will never be used again.
2018-12-11 10:59:12 +01:00
Benno Schulenberg 3a79766da6 rcfile, docs: remove deprecated forms of two options and five bindables
This addresses https://savannah.gnu.org/bugs/?53785.
2018-12-03 10:25:55 +01:00
Benno Schulenberg 0f79a42333 browser: say "Close" instead of "Exit" for the ^X shortcut
When multiple buffers are open, the edit window says "Close" for ^X
instead of "Exit" (when one buffer is open).  In the help viewer ^X
says "Close".  Apparently the idea is that ^X should say "Exit" only
when pressing ^X leads to exiting from nano.  Pressing ^X in the file
browser does not exit from nano, so make it say "Close" instead.

(The help viewer says "Close" since version 2.8.6, commit 934a2192.)
2018-12-03 10:07:42 +01:00
Benno Schulenberg 3b79c7168e help: don't advertise ^S and ^Q when --preserve is used
When using --preserve, ^S and ^Q are "eaten" by the terminal and
do not reach nano: they have no effect in nano, so the help lines
and the help texts should not mention these shortcuts.

Also, to keep the help lines in the help viewer neatly arranged,
^L is not bound there when --preserve is used.
2018-12-03 09:50:00 +01:00
Benno Schulenberg 9a77c997e2 tweaks: remove two tag definitions that are no longer needed 2018-11-26 09:13:22 +01:00
Benno Schulenberg 2cee79fbbf tweaks: remove a variable that is no longer used
It was made superfluous by David's overhaul of the justify mechanism.
2018-11-26 09:07:22 +01:00
Benno Schulenberg 4bd423fc92 tweaks: reorder some code to put backward motion before the forward one 2018-11-07 20:48:04 +01:00
Benno Schulenberg cc01bc3edb tweaks: redefine MMOST to exclude MBROWSER, to simplify the bindings 2018-11-07 20:01:03 +01:00
Benno Schulenberg 5f6f8a8083 bindings: stop binding <Bsp> to do_backspace() in the browser menu
Further down, the <Backspace> key is bound to do_page_up() for MHELP
and MBROWSER, so this earlier binding should exclude MBROWSER.

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

Bug existed since version 2.9.2, commit 8581e702.
2018-11-07 19:57:10 +01:00
David Lawrence Ramsey f55a3fabef input: recognize some escape sequences for <Shift+Delete>
Also, hard-bind <Shift+Delete> in the same way as <Backspace>.

This fixes https://savannah.gnu.org/bugs/?54948,
and fixes https://savannah.gnu.org/bugs/?54975.
2018-11-07 19:17:16 +01:00
Benno Schulenberg 9d9ae8dc76 tweaks: add two more translator hints 2018-11-05 09:54:06 +01:00
Benno Schulenberg ca6281e821 tweaks: condense a handful of comments, and drop an assert 2018-11-05 09:38:07 +01:00
Benno Schulenberg 77826c2b06 tweaks: stop setting and requiring the Meta flag for special keycodes
Set the Meta flag only for the regular Meta keystrokes: "M-" plus a
printable ASCII character.  The special keycodes are unique and do
not need any extra flags to differentiate them.
2018-11-04 20:35:15 +01:00
Brand Huntsman 252f14796e bindings: hard-bind the zap function to M-Del (Alt+Delete)
So that the function is available in a default setup.

Signed-off-by: Brand Huntsman <alpha@qzx.com>
2018-11-04 11:47:03 +01:00
Brand Huntsman 5662a38802 new feature: a bindable 'zap', to erase text without changing cutbuffer
This function allows the user to "make space": annihilating lines or
regions while keeping intact for pasting the stuff in the cutbuffer
that was cut or copied earlier.

Signed-off-by: Brand Huntsman <alpha@qzx.com>
2018-11-04 11:46:19 +01:00
Benno Schulenberg e0d9fee5d6 build: exclude scrolling functions only from tiny version without help
This fixes https://savannah.gnu.org/bugs/?54891.
2018-10-24 17:33:54 +02:00
Benno Schulenberg 95dd873205 bindings: no longer bind F13 and F14 and F15
The bindings for F1 to F12 are there for compatibility with Pico.
But Pico does not know anything about F13 to F16; for unknown reasons
they were added to nano.  They seem hardly useful: normal keyboards
do not have the F13 to F16 keys, and very few people know that they
can "produce" those keys by holding Shift with F1 to F4.  But typing
Shift plus F1 to F4 are just as "hard" as, for example, M-G and M-W,
so why anyone would want to use the first ones...?  Especially since
many other functions of nano can only be accessed through Meta and
Control combinations.

Furthermore, F13 to F15 haven't been shown in the help texts since
version 2.3.3, so for more than four years no new user will have
learned about those keystrokes.

The rare user who wants these strange bindings can easily make them
herself.
2018-10-23 19:44:22 +02:00
David Lawrence Ramsey 16a3dc90c7 wrapping: make relative fill values work again also for screen resizes
The 'wrap_at' variable, removed in commit e90b7cf4, is actually needed
to store the original value of the --fill option when it is negative.
Otherwise, changing the screen width will not update the wrapping point
properly.

This fixes https://savannah.gnu.org/bugs/?54861.
Reported-by: Brand Huntsman <alpha@qzx.com>
2018-10-18 20:35:49 +02:00
Benno Schulenberg c43177487a help: pull "Older" and "Newer" into view on an 80-column terminal
The ^P and ^N keystrokes for Older and Newer are relevant to searching
and should be visible in the help lines.  FullJustify, paragraph jumps,
and top/tail jumping are there only for compatibility with Pico but
don't make any sense there, so it's no problem if they are pushed out
of view.
2018-10-15 17:33:51 +02:00
Benno Schulenberg f442f91187 bindings: rename 'prevhistory' to 'older' and 'nexthistory' to 'newer'
Rename not only the bindable functions, but more importantly reword the
tags that are shown for ^P and ^N in the help lines: "Older" / "Newer",
because these are clearer and not awkward abbreviations.
2018-10-15 17:31:40 +02:00
Benno Schulenberg a4e7d6b80b tweaks: define a symbol to make the code itself a little simpler 2018-10-15 16:55:36 +02:00
David Lawrence Ramsey 06416e3d5c tweaks: don't define controldelete or controlshiftdelete in tiny version
The tiny version never uses them because it doesn't know word deletion.
2018-10-15 16:52:01 +02:00
Benno Schulenberg e1c8dd0091 build: fix compilation when configured with --disable-multibuffer
Commit 7ea6d6bb from five days ago caused this breakage.
2018-10-12 12:32:21 +02:00
Benno Schulenberg 8c456423e9 display: correct a mistaken label in the help lines of the browser
This was a second pasting mistake made in commit 0c263bda, a good
two months ago.
2018-10-09 21:54:54 +02:00
David Lawrence Ramsey c2e4f77594 display: do spotlighting as part of drawing the screen
When something is spotlighted, it should survive a refresh of
the screen and an excursion to a help text, so the spotlight
should get painted whenever the edit window is drawn.

This fully fixes https://savannah.gnu.org/bugs/?54721.
2018-10-09 20:03:47 +02:00
Benno Schulenberg 7ea6d6bbda bindings: in tiny version with help, don't show unfunctional M-◀ and M-▶
The code for recognizing those keystrokes is not present in the tiny
version, so there is no point in binding anything to them.
2018-10-07 15:51:21 +02:00
Benno Schulenberg e4f5848425 tweaks: move all the function keys to the end of the shortcuts list
To have them grouped together, but also so that keystrokes that are
used more commonly are found slightly quicker.
2018-10-07 14:42:42 +02:00
Benno Schulenberg 10d9742c11 display: show the cursor also in a help text (when --showcursor is used)
The cursor can function as a reading aid for people with poor vision.

This fulfills https://savannah.gnu.org/bugs/?54654.
Requested-by: Ben Key <benk1976@yahoo.com>
2018-10-07 10:26:27 +02:00