adjust the main shortcut list a bit more, per Benno Schulenberg's patch,
and better handle the insertion of blank lines after toggles when certain features are disabled git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@3418 35c25a1d-7b9e-4130-9fde-d3aeb78583b8master
parent
5a2dbe26d8
commit
2ca2356802
|
@ -87,7 +87,7 @@ CVS code -
|
||||||
shortcuts, followed by insertion and deletion shortcuts,
|
shortcuts, followed by insertion and deletion shortcuts,
|
||||||
followed by special movement shortcuts, followed by advanced
|
followed by special movement shortcuts, followed by advanced
|
||||||
word and paragraph shortcuts, followed by display shortcuts.
|
word and paragraph shortcuts, followed by display shortcuts.
|
||||||
(DLR, suggested by Benno Schulenberg)
|
(DLR and Benno Schulenberg, suggested by Benno Schulenberg)
|
||||||
toggle_init()
|
toggle_init()
|
||||||
- In the global toggle list, move the "Constant cursor position
|
- In the global toggle list, move the "Constant cursor position
|
||||||
display" toggle up to after the "Use more space for editing"
|
display" toggle up to after the "Use more space for editing"
|
||||||
|
|
56
src/global.c
56
src/global.c
|
@ -539,11 +539,10 @@ void shortcut_init(bool unjustify)
|
||||||
#endif
|
#endif
|
||||||
nano_disabled_msg);
|
nano_disabled_msg);
|
||||||
|
|
||||||
#ifndef NANO_TINY
|
sc_init_one(&main_list, NANO_GOTOLINE_KEY, go_to_line_msg,
|
||||||
sc_init_one(&main_list, NANO_NO_KEY, whereis_next_msg,
|
IFHELP(nano_gotoline_msg, FALSE), NANO_GOTOLINE_ALTKEY,
|
||||||
IFHELP(nano_whereis_next_msg, FALSE), NANO_WHEREIS_NEXT_KEY,
|
NANO_GOTOLINE_FKEY, NANO_NO_KEY, VIEW,
|
||||||
NANO_WHEREIS_NEXT_FKEY, NANO_NO_KEY, VIEW, do_research);
|
do_gotolinecolumn_void);
|
||||||
#endif
|
|
||||||
|
|
||||||
sc_init_one(&main_list, NANO_REPLACE_KEY, replace_msg,
|
sc_init_one(&main_list, NANO_REPLACE_KEY, replace_msg,
|
||||||
IFHELP(nano_replace_msg, FALSE), NANO_ALT_REPLACE_KEY,
|
IFHELP(nano_replace_msg, FALSE), NANO_ALT_REPLACE_KEY,
|
||||||
|
@ -554,12 +553,10 @@ void shortcut_init(bool unjustify)
|
||||||
sc_init_one(&main_list, NANO_MARK_KEY, N_("Mark Text"),
|
sc_init_one(&main_list, NANO_MARK_KEY, N_("Mark Text"),
|
||||||
IFHELP(nano_mark_msg, FALSE), NANO_MARK_ALTKEY, NANO_MARK_FKEY,
|
IFHELP(nano_mark_msg, FALSE), NANO_MARK_ALTKEY, NANO_MARK_FKEY,
|
||||||
NANO_NO_KEY, VIEW, do_mark);
|
NANO_NO_KEY, VIEW, do_mark);
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifndef NANO_TINY
|
sc_init_one(&main_list, NANO_NO_KEY, whereis_next_msg,
|
||||||
sc_init_one(&main_list, NANO_NO_KEY, cut_till_end_msg,
|
IFHELP(nano_whereis_next_msg, TRUE), NANO_WHEREIS_NEXT_KEY,
|
||||||
IFHELP(nano_cut_till_end_msg, TRUE), NANO_CUTTILLEND_ALTKEY,
|
NANO_WHEREIS_NEXT_FKEY, NANO_NO_KEY, VIEW, do_research);
|
||||||
NANO_NO_KEY, NANO_NO_KEY, NOVIEW, do_cut_till_end);
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
sc_init_one(&main_list, NANO_FORWARD_KEY, N_("Forward"),
|
sc_init_one(&main_list, NANO_FORWARD_KEY, N_("Forward"),
|
||||||
|
@ -618,14 +615,7 @@ void shortcut_init(bool unjustify)
|
||||||
sc_init_one(&main_list, NANO_NO_KEY, N_("Find Other Bracket"),
|
sc_init_one(&main_list, NANO_NO_KEY, N_("Find Other Bracket"),
|
||||||
IFHELP(nano_bracket_msg, FALSE), NANO_BRACKET_KEY, NANO_NO_KEY,
|
IFHELP(nano_bracket_msg, FALSE), NANO_BRACKET_KEY, NANO_NO_KEY,
|
||||||
NANO_NO_KEY, VIEW, do_find_bracket);
|
NANO_NO_KEY, VIEW, do_find_bracket);
|
||||||
#endif
|
|
||||||
|
|
||||||
sc_init_one(&main_list, NANO_GOTOLINE_KEY, go_to_line_msg,
|
|
||||||
IFHELP(nano_gotoline_msg, FALSE), NANO_GOTOLINE_ALTKEY,
|
|
||||||
NANO_GOTOLINE_FKEY, NANO_NO_KEY, VIEW,
|
|
||||||
do_gotolinecolumn_void);
|
|
||||||
|
|
||||||
#ifndef NANO_TINY
|
|
||||||
sc_init_one(&main_list, NANO_NO_KEY, N_("Scroll Up"),
|
sc_init_one(&main_list, NANO_NO_KEY, N_("Scroll Up"),
|
||||||
IFHELP(nano_scrollup_msg, FALSE), NANO_SCROLLUP_KEY,
|
IFHELP(nano_scrollup_msg, FALSE), NANO_SCROLLUP_KEY,
|
||||||
NANO_NO_KEY, NANO_SCROLLUP_ALTKEY, VIEW, do_scroll_up);
|
NANO_NO_KEY, NANO_SCROLLUP_ALTKEY, VIEW, do_scroll_up);
|
||||||
|
@ -663,9 +653,15 @@ void shortcut_init(bool unjustify)
|
||||||
NANO_NO_KEY, NOVIEW, do_delete);
|
NANO_NO_KEY, NOVIEW, do_delete);
|
||||||
|
|
||||||
sc_init_one(&main_list, NANO_BACKSPACE_KEY, N_("Backspace"),
|
sc_init_one(&main_list, NANO_BACKSPACE_KEY, N_("Backspace"),
|
||||||
IFHELP(nano_backspace_msg, TRUE), NANO_NO_KEY, NANO_NO_KEY,
|
IFHELP(nano_backspace_msg, FALSE), NANO_NO_KEY, NANO_NO_KEY,
|
||||||
NANO_NO_KEY, NOVIEW, do_backspace);
|
NANO_NO_KEY, NOVIEW, do_backspace);
|
||||||
|
|
||||||
|
#ifndef NANO_TINY
|
||||||
|
sc_init_one(&main_list, NANO_NO_KEY, cut_till_end_msg,
|
||||||
|
IFHELP(nano_cut_till_end_msg, TRUE), NANO_CUTTILLEND_ALTKEY,
|
||||||
|
NANO_NO_KEY, NANO_NO_KEY, NOVIEW, do_cut_till_end);
|
||||||
|
#endif
|
||||||
|
|
||||||
#ifndef DISABLE_JUSTIFY
|
#ifndef DISABLE_JUSTIFY
|
||||||
sc_init_one(&main_list, NANO_NO_KEY, fulljstify_msg,
|
sc_init_one(&main_list, NANO_NO_KEY, fulljstify_msg,
|
||||||
IFHELP(nano_fulljustify_msg, FALSE), NANO_FULLJUSTIFY_ALTKEY,
|
IFHELP(nano_fulljustify_msg, FALSE), NANO_FULLJUSTIFY_ALTKEY,
|
||||||
|
@ -1220,12 +1216,22 @@ void toggle_init(void)
|
||||||
toggle_init_one(TOGGLE_MORESPACE_KEY,
|
toggle_init_one(TOGGLE_MORESPACE_KEY,
|
||||||
N_("Use of more space for editing"), FALSE, MORE_SPACE);
|
N_("Use of more space for editing"), FALSE, MORE_SPACE);
|
||||||
|
|
||||||
toggle_init_one(TOGGLE_SMOOTH_KEY, N_("Smooth scrolling"), FALSE,
|
toggle_init_one(TOGGLE_SMOOTH_KEY, N_("Smooth scrolling"),
|
||||||
SMOOTH_SCROLL);
|
#ifdef ENABLE_NANORC
|
||||||
|
FALSE
|
||||||
|
#else
|
||||||
|
TRUE
|
||||||
|
#endif
|
||||||
|
, SMOOTH_SCROLL);
|
||||||
|
|
||||||
#ifdef ENABLE_NANORC
|
#ifdef ENABLE_NANORC
|
||||||
toggle_init_one(TOGGLE_WHITESPACE_KEY, N_("Whitespace display"),
|
toggle_init_one(TOGGLE_WHITESPACE_KEY, N_("Whitespace display"),
|
||||||
FALSE, WHITESPACE_DISPLAY);
|
#ifdef ENABLE_COLOR
|
||||||
|
FALSE
|
||||||
|
#else
|
||||||
|
TRUE
|
||||||
|
#endif
|
||||||
|
, WHITESPACE_DISPLAY);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef ENABLE_COLOR
|
#ifdef ENABLE_COLOR
|
||||||
|
@ -1248,7 +1254,13 @@ void toggle_init(void)
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
toggle_init_one(TOGGLE_TABSTOSPACES_KEY,
|
toggle_init_one(TOGGLE_TABSTOSPACES_KEY,
|
||||||
N_("Conversion of typed tabs to spaces"), TRUE, TABS_TO_SPACES);
|
N_("Conversion of typed tabs to spaces"),
|
||||||
|
#if defined(ENABLE_MULTIBUFFER) || !defined(DISABLE_MOUSE)
|
||||||
|
!ISSET(RESTRICTED) ? TRUE : FALSE
|
||||||
|
#else
|
||||||
|
FALSE
|
||||||
|
#endif
|
||||||
|
, TABS_TO_SPACES);
|
||||||
|
|
||||||
/* If we're using restricted mode, the backup toggle is disabled.
|
/* If we're using restricted mode, the backup toggle is disabled.
|
||||||
* It's useless since backups are disabled. */
|
* It's useless since backups are disabled. */
|
||||||
|
|
Loading…
Reference in New Issue