[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Nano-devel] [PATCH 2/2] menus: move the paragraph-jumping functions fro
From: |
Benno Schulenberg |
Subject: |
[Nano-devel] [PATCH 2/2] menus: move the paragraph-jumping functions from Search to Goto-Line |
Date: |
Tue, 12 Feb 2019 19:52:53 +0100 |
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.
---
src/global.c | 12 ++++++------
1 file changed, 6 insertions(+), 6 deletions(-)
diff --git a/src/global.c b/src/global.c
index 8812c821..5270bbd4 100644
--- a/src/global.c
+++ b/src/global.c
@@ -885,9 +885,9 @@ void shortcut_init(void)
add_to_funcs(do_next_block, MMAIN,
N_("Next Block"), WITHORSANS(nextblock_gist), TOGETHER, VIEW);
#ifdef ENABLE_JUSTIFY
- add_to_funcs(do_para_begin_void, MMAIN|MWHEREIS,
+ add_to_funcs(do_para_begin_void, MMAIN|MGOTOLINE,
N_("Beg of Par"), WITHORSANS(parabegin_gist), TOGETHER, VIEW);
- add_to_funcs(do_para_end_void, MMAIN|MWHEREIS,
+ add_to_funcs(do_para_end_void, MMAIN|MGOTOLINE,
N_("End of Par"), WITHORSANS(paraend_gist), BLANKAFTER, VIEW);
#endif
@@ -1273,10 +1273,6 @@ void shortcut_init(void)
add_to_sclist(MWHEREIS|MREPLACE, "M-R", 0, regexp_void, 0);
add_to_sclist(MWHEREIS|MREPLACE, "M-B", 0, backwards_void, 0);
add_to_sclist(MWHEREIS|MREPLACE, "^R", 0, flip_replace, 0);
-#ifdef ENABLE_JUSTIFY
- add_to_sclist(MWHEREIS|MREPLACE|MREPLACEWITH, "^W", 0,
do_para_begin_void, 0);
- add_to_sclist(MWHEREIS|MREPLACE|MREPLACEWITH, "^O", 0,
do_para_end_void, 0);
-#endif
add_to_sclist(MWHEREIS|MGOTOLINE, "^T", 0, flip_goto, 0);
#ifdef ENABLE_HISTORIES
add_to_sclist(MWHEREIS|MREPLACE|MREPLACEWITH|MWHEREISFILE|MFINDINHELP|MEXTCMD,
"^P", 0, get_history_older_void, 0);
@@ -1291,6 +1287,10 @@ void shortcut_init(void)
add_to_sclist(MWHEREIS|MREPLACE|MREPLACEWITH|MWHEREISFILE|MFINDINHELP|MEXTCMD,
"Up", KEY_UP, get_history_older_void, 0);
add_to_sclist(MWHEREIS|MREPLACE|MREPLACEWITH|MWHEREISFILE|MFINDINHELP|MEXTCMD,
"Down", KEY_DOWN, get_history_newer_void, 0);
}
+#endif
+#ifdef ENABLE_JUSTIFY
+ add_to_sclist(MGOTOLINE, "^W", 0, do_para_begin_void, 0);
+ add_to_sclist(MGOTOLINE, "^O", 0, do_para_end_void, 0);
#endif
add_to_sclist(MGOTOLINE, "^Y", 0, to_first_line, 0);
add_to_sclist(MGOTOLINE, "^V", 0, to_last_line, 0);
--
2.20.1