remove various redundant key checks
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@3477 35c25a1d-7b9e-4130-9fde-d3aeb78583b8master
parent
90b60edc3f
commit
b22c80ad1d
|
@ -68,6 +68,9 @@ CVS code -
|
||||||
- Add the ability to move to the first and last line of the help
|
- Add the ability to move to the first and last line of the help
|
||||||
text via Meta-\ (Meta-|) and Meta-/ (Meta-?). Changes to
|
text via Meta-\ (Meta-|) and Meta-/ (Meta-?). Changes to
|
||||||
shortcut_init() and do_help(). (DLR)
|
shortcut_init() and do_help(). (DLR)
|
||||||
|
- browser.c:
|
||||||
|
parse_browser_input()
|
||||||
|
- Remove redundant key checks. (DLR)
|
||||||
- files.c:
|
- files.c:
|
||||||
open_file()
|
open_file()
|
||||||
- Remove redundant wording in the error message when we try to
|
- Remove redundant wording in the error message when we try to
|
||||||
|
@ -125,6 +128,7 @@ CVS code -
|
||||||
to check for a main shortcut key instead of both it and all of
|
to check for a main shortcut key instead of both it and all of
|
||||||
its equivalents. (DLR)
|
its equivalents. (DLR)
|
||||||
- Clean up the handling of NANO_REFRESH_KEY. (DLR)
|
- Clean up the handling of NANO_REFRESH_KEY. (DLR)
|
||||||
|
- Remove redundant key checks. (DLR)
|
||||||
help_init()
|
help_init()
|
||||||
- If we have at least two entries' worth of blank space, use it
|
- If we have at least two entries' worth of blank space, use it
|
||||||
to display more of "^Space" and "M-Space". (DLR, suggested by
|
to display more of "^Space" and "M-Space". (DLR, suggested by
|
||||||
|
@ -133,6 +137,7 @@ CVS code -
|
||||||
- Add Space and - as aliases for PageDown and PageUp, for
|
- Add Space and - as aliases for PageDown and PageUp, for
|
||||||
consistency with the file browser. (DLR, suggested by Benno
|
consistency with the file browser. (DLR, suggested by Benno
|
||||||
Schulenberg)
|
Schulenberg)
|
||||||
|
- Remove redundant key checks. (DLR)
|
||||||
- nano.c:
|
- nano.c:
|
||||||
renumber()
|
renumber()
|
||||||
- Remove invalid assert. (DLR, found by Filipe Moreira)
|
- Remove invalid assert. (DLR, found by Filipe Moreira)
|
||||||
|
@ -171,6 +176,8 @@ CVS code -
|
||||||
- Change all rcfile error messages to refer to commands instead
|
- Change all rcfile error messages to refer to commands instead
|
||||||
of directives, for consistency with nanorc.5. (DLR)
|
of directives, for consistency with nanorc.5. (DLR)
|
||||||
- text.c:
|
- text.c:
|
||||||
|
do_justify()
|
||||||
|
- Remove redundant key checks. (DLR)
|
||||||
do_spell()
|
do_spell()
|
||||||
- Clarify the error message when creating a temporary file
|
- Clarify the error message when creating a temporary file
|
||||||
fails. (DLR)
|
fails. (DLR)
|
||||||
|
|
|
@ -493,7 +493,7 @@ void parse_browser_input(int *kbinput, bool *meta_key, bool *func_key)
|
||||||
get_shortcut(browser_list, kbinput, meta_key, func_key);
|
get_shortcut(browser_list, kbinput, meta_key, func_key);
|
||||||
|
|
||||||
/* Pico compatibility. */
|
/* Pico compatibility. */
|
||||||
if (*meta_key == FALSE && *func_key == FALSE) {
|
if (*meta_key == FALSE) {
|
||||||
switch (*kbinput) {
|
switch (*kbinput) {
|
||||||
case ' ':
|
case ' ':
|
||||||
*kbinput = NANO_NEXTPAGE_KEY;
|
*kbinput = NANO_NEXTPAGE_KEY;
|
||||||
|
|
|
@ -136,8 +136,8 @@ void do_help(void (*refresh_func)(void))
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
if ((kbinput != ERR && line == old_line) || (!meta_key &&
|
if ((kbinput != ERR && line == old_line) || kbinput ==
|
||||||
!func_key && kbinput == NANO_REFRESH_KEY))
|
NANO_REFRESH_KEY)
|
||||||
goto skip_redisplay;
|
goto skip_redisplay;
|
||||||
|
|
||||||
blank_edit();
|
blank_edit();
|
||||||
|
@ -574,7 +574,7 @@ void parse_help_input(int *kbinput, bool *meta_key, bool *func_key)
|
||||||
{
|
{
|
||||||
get_shortcut(help_list, kbinput, meta_key, func_key);
|
get_shortcut(help_list, kbinput, meta_key, func_key);
|
||||||
|
|
||||||
if (*meta_key == FALSE && *func_key == FALSE) {
|
if (*meta_key == FALSE) {
|
||||||
switch (*kbinput) {
|
switch (*kbinput) {
|
||||||
/* For consistency with the file browser. */
|
/* For consistency with the file browser. */
|
||||||
case ' ':
|
case ' ':
|
||||||
|
|
|
@ -1671,8 +1671,7 @@ void do_justify(bool full_justify)
|
||||||
kbinput = do_input(&meta_key, &func_key, &s_or_t, &ran_func,
|
kbinput = do_input(&meta_key, &func_key, &s_or_t, &ran_func,
|
||||||
&finished, FALSE);
|
&finished, FALSE);
|
||||||
|
|
||||||
if (!meta_key && !func_key && s_or_t &&
|
if (s_or_t && kbinput == NANO_UNJUSTIFY_KEY) {
|
||||||
kbinput == NANO_UNJUSTIFY_KEY) {
|
|
||||||
/* Splice the justify buffer back into the file, but only if we
|
/* Splice the justify buffer back into the file, but only if we
|
||||||
* actually justified something. */
|
* actually justified something. */
|
||||||
if (first_par_line != NULL) {
|
if (first_par_line != NULL) {
|
||||||
|
|
Loading…
Reference in New Issue