Commit c91696e6 authored by David Lawrence Ramsey's avatar David Lawrence Ramsey
Browse files

add function key alias for unjustify

git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@1639 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
parent d03216a1
Showing with 7 additions and 3 deletions
+7 -3
...@@ -9,6 +9,9 @@ CVS code - ...@@ -9,6 +9,9 @@ CVS code -
NANO_NEXTLINE_KEY, and the help messages for them have been NANO_NEXTLINE_KEY, and the help messages for them have been
changed accordingly. Also remove extraneous references to changed accordingly. Also remove extraneous references to
NANO_DOWN_KEY in the search history shortcut entries. (DLR) NANO_DOWN_KEY in the search history shortcut entries. (DLR)
- Add NANO_UNJUSTIFY_FKEY (the same as NANO_UNCUT_FKEY) to the
shortcut list, and tweak the unjustify routine to use it.
(DLR)
- files.c: - files.c:
write_marked() write_marked()
- New function used to write the current marked selection to a - New function used to write the current marked selection to a
......
...@@ -494,7 +494,7 @@ void shortcut_init(int unjustify) ...@@ -494,7 +494,7 @@ void shortcut_init(int unjustify)
if (unjustify) if (unjustify)
/* Translators: try to keep this string under 10 characters long */ /* Translators: try to keep this string under 10 characters long */
sc_init_one(&main_list, NANO_UNJUSTIFY_KEY, _("UnJustify"), sc_init_one(&main_list, NANO_UNJUSTIFY_KEY, _("UnJustify"),
IFHELP(nano_unjustify_msg, NANO_NO_KEY), NANO_NO_KEY, IFHELP(nano_unjustify_msg, NANO_NO_KEY), NANO_UNJUSTIFY_FKEY,
NANO_NO_KEY, NOVIEW, do_uncut_text); NANO_NO_KEY, NOVIEW, do_uncut_text);
else else
/* Translators: try to keep this string under 10 characters long */ /* Translators: try to keep this string under 10 characters long */
......
...@@ -2663,7 +2663,7 @@ int do_para_operation(int operation) ...@@ -2663,7 +2663,7 @@ int do_para_operation(int operation)
#endif #endif
} }
if (i != NANO_UNJUSTIFY_KEY) { if (i != NANO_UNJUSTIFY_KEY && i != NANO_UNJUSTIFY_FKEY) {
ungetch(i); ungetch(i);
/* Did we back up anything at all? */ /* Did we back up anything at all? */
if (cutbuffer != cutbuffer_save) if (cutbuffer != cutbuffer_save)
......
...@@ -404,7 +404,8 @@ typedef struct historyheadtype { ...@@ -404,7 +404,8 @@ typedef struct historyheadtype {
#define NANO_REFRESH_KEY NANO_CONTROL_L #define NANO_REFRESH_KEY NANO_CONTROL_L
#define NANO_JUSTIFY_KEY NANO_CONTROL_J #define NANO_JUSTIFY_KEY NANO_CONTROL_J
#define NANO_JUSTIFY_FKEY KEY_F(4) #define NANO_JUSTIFY_FKEY KEY_F(4)
#define NANO_UNJUSTIFY_KEY NANO_CONTROL_U #define NANO_UNJUSTIFY_KEY NANO_UNCUT_KEY /* Same key as uncut. */
#define NANO_UNJUSTIFY_FKEY NANO_UNCUT_FKEY /* Same key as uncut. */
#define NANO_PREVLINE_KEY NANO_CONTROL_P #define NANO_PREVLINE_KEY NANO_CONTROL_P
#define NANO_NEXTLINE_KEY NANO_CONTROL_N #define NANO_NEXTLINE_KEY NANO_CONTROL_N
#define NANO_FORWARD_KEY NANO_CONTROL_F #define NANO_FORWARD_KEY NANO_CONTROL_F
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment