tweaks: rename a function, for some contrast and to get rid of a suffix
parent
11fec6f63c
commit
9e982f3283
|
@ -981,7 +981,7 @@ void shortcut_init(void)
|
||||||
N_("Refresh"), WITHORSANS(refresh_gist), TOGETHER, VIEW);
|
N_("Refresh"), WITHORSANS(refresh_gist), TOGETHER, VIEW);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
add_to_funcs(do_suspend_void, MMAIN,
|
add_to_funcs(suspend_nano, MMAIN,
|
||||||
N_("Suspend"), WITHORSANS(suspend_gist), BLANKAFTER, VIEW);
|
N_("Suspend"), WITHORSANS(suspend_gist), BLANKAFTER, VIEW);
|
||||||
|
|
||||||
#ifndef NANO_TINY
|
#ifndef NANO_TINY
|
||||||
|
@ -1105,7 +1105,7 @@ void shortcut_init(void)
|
||||||
add_to_funcs(cut_till_eof, MEXECUTE,
|
add_to_funcs(cut_till_eof, MEXECUTE,
|
||||||
N_("Cut Till End"), WITHORSANS(cuttilleof_gist), BLANKAFTER, NOVIEW);
|
N_("Cut Till End"), WITHORSANS(cuttilleof_gist), BLANKAFTER, NOVIEW);
|
||||||
|
|
||||||
add_to_funcs(do_suspend_void, MEXECUTE,
|
add_to_funcs(suspend_nano, MEXECUTE,
|
||||||
N_("Suspend"), WITHORSANS(suspend_gist), BLANKAFTER, VIEW);
|
N_("Suspend"), WITHORSANS(suspend_gist), BLANKAFTER, VIEW);
|
||||||
}
|
}
|
||||||
#endif /* !NANO_TINY */
|
#endif /* !NANO_TINY */
|
||||||
|
@ -1334,7 +1334,7 @@ void shortcut_init(void)
|
||||||
#ifndef NANO_TINY
|
#ifndef NANO_TINY
|
||||||
add_to_sclist(MMAIN, "M-T", 0, cut_till_eof, 0);
|
add_to_sclist(MMAIN, "M-T", 0, cut_till_eof, 0);
|
||||||
add_to_sclist(MEXECUTE, "^V", 0, cut_till_eof, 0);
|
add_to_sclist(MEXECUTE, "^V", 0, cut_till_eof, 0);
|
||||||
add_to_sclist(MEXECUTE, "^Z", 0, do_suspend_void, 0);
|
add_to_sclist(MEXECUTE, "^Z", 0, suspend_nano, 0);
|
||||||
add_to_sclist(MMAIN, "^Z", 0, suggest_ctrlT_ctrlZ, 0);
|
add_to_sclist(MMAIN, "^Z", 0, suggest_ctrlT_ctrlZ, 0);
|
||||||
add_to_sclist(MMAIN, "M-D", 0, count_lines_words_and_characters, 0);
|
add_to_sclist(MMAIN, "M-D", 0, count_lines_words_and_characters, 0);
|
||||||
#else
|
#else
|
||||||
|
@ -1483,7 +1483,7 @@ void shortcut_init(void)
|
||||||
#endif
|
#endif
|
||||||
#if defined(KEY_CANCEL) && defined(KEY_SUSPEND) && defined(KEY_SIC)
|
#if defined(KEY_CANCEL) && defined(KEY_SUSPEND) && defined(KEY_SIC)
|
||||||
add_to_sclist((MMOST & ~MMAIN) | MYESNO, "", KEY_CANCEL, do_cancel, 0);
|
add_to_sclist((MMOST & ~MMAIN) | MYESNO, "", KEY_CANCEL, do_cancel, 0);
|
||||||
add_to_sclist(MMAIN|MEXECUTE, "", KEY_SUSPEND, do_suspend_void, 0);
|
add_to_sclist(MMAIN|MEXECUTE, "", KEY_SUSPEND, suspend_nano, 0);
|
||||||
add_to_sclist(MMAIN, "", KEY_SIC, do_insertfile_void, 0);
|
add_to_sclist(MMAIN, "", KEY_SIC, do_insertfile_void, 0);
|
||||||
#endif
|
#endif
|
||||||
#ifndef NANO_TINY
|
#ifndef NANO_TINY
|
||||||
|
|
|
@ -212,15 +212,17 @@ bool in_restricted_mode(void)
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#ifndef NANO_TINY
|
||||||
/* Say how the user can achieve suspension (when they typed ^Z). */
|
/* Say how the user can achieve suspension (when they typed ^Z). */
|
||||||
void suggest_ctrlT_ctrlZ(void)
|
void suggest_ctrlT_ctrlZ(void)
|
||||||
{
|
{
|
||||||
#ifdef ENABLE_NANORC
|
#ifdef ENABLE_NANORC
|
||||||
if (first_sc_for(MMAIN, do_execute) && first_sc_for(MMAIN, do_execute)->keycode == 0x14 &&
|
if (first_sc_for(MMAIN, do_execute) && first_sc_for(MMAIN, do_execute)->keycode == 0x14 &&
|
||||||
first_sc_for(MEXECUTE, do_suspend_void) && first_sc_for(MEXECUTE, do_suspend_void)->keycode == 0x1A)
|
first_sc_for(MEXECUTE, suspend_nano) && first_sc_for(MEXECUTE, suspend_nano)->keycode == 0x1A)
|
||||||
#endif
|
#endif
|
||||||
statusline(AHEM, _("To suspend, type ^T^Z"));
|
statusline(AHEM, _("To suspend, type ^T^Z"));
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
/* Make sure the cursor is visible, then exit from curses mode, disable
|
/* Make sure the cursor is visible, then exit from curses mode, disable
|
||||||
* bracketed-paste mode, and restore the original terminal settings. */
|
* bracketed-paste mode, and restore the original terminal settings. */
|
||||||
|
@ -958,8 +960,8 @@ void do_suspend(int signal)
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Put nano to sleep. */
|
/* When permitted, put nano to sleep. */
|
||||||
void do_suspend_void(void)
|
void suspend_nano(void)
|
||||||
{
|
{
|
||||||
if (in_restricted_mode())
|
if (in_restricted_mode())
|
||||||
return;
|
return;
|
||||||
|
|
|
@ -386,7 +386,9 @@ void free_lines(linestruct *src);
|
||||||
void renumber_from(linestruct *line);
|
void renumber_from(linestruct *line);
|
||||||
void print_view_warning(void);
|
void print_view_warning(void);
|
||||||
bool in_restricted_mode(void);
|
bool in_restricted_mode(void);
|
||||||
|
#ifndef NANO_TINY
|
||||||
void suggest_ctrlT_ctrlZ(void);
|
void suggest_ctrlT_ctrlZ(void);
|
||||||
|
#endif
|
||||||
void finish(void);
|
void finish(void);
|
||||||
void close_and_go(void);
|
void close_and_go(void);
|
||||||
void do_exit(void);
|
void do_exit(void);
|
||||||
|
@ -402,6 +404,7 @@ void handle_hupterm(int signal);
|
||||||
void handle_crash(int signal);
|
void handle_crash(int signal);
|
||||||
#endif
|
#endif
|
||||||
void do_suspend(int signal);
|
void do_suspend(int signal);
|
||||||
|
void suspend_nano(void);
|
||||||
void do_continue(int signal);
|
void do_continue(int signal);
|
||||||
#if !defined(NANO_TINY) || defined(ENABLE_SPELLER) || defined(ENABLE_COLOR)
|
#if !defined(NANO_TINY) || defined(ENABLE_SPELLER) || defined(ENABLE_COLOR)
|
||||||
void block_sigwinch(bool blockit);
|
void block_sigwinch(bool blockit);
|
||||||
|
@ -622,7 +625,6 @@ void spotlight(size_t from_col, size_t to_col);
|
||||||
#ifndef NANO_TINY
|
#ifndef NANO_TINY
|
||||||
void spotlight_softwrapped(size_t from_col, size_t to_col);
|
void spotlight_softwrapped(size_t from_col, size_t to_col);
|
||||||
#endif
|
#endif
|
||||||
void do_suspend_void(void);
|
|
||||||
#ifdef ENABLE_EXTRA
|
#ifdef ENABLE_EXTRA
|
||||||
void do_credits(void);
|
void do_credits(void);
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -396,7 +396,7 @@ keystruct *strtosc(const char *input)
|
||||||
else if (!strcmp(input, "refresh"))
|
else if (!strcmp(input, "refresh"))
|
||||||
s->func = full_refresh;
|
s->func = full_refresh;
|
||||||
else if (!strcmp(input, "suspend"))
|
else if (!strcmp(input, "suspend"))
|
||||||
s->func = do_suspend_void;
|
s->func = suspend_nano;
|
||||||
else if (!strcmp(input, "casesens"))
|
else if (!strcmp(input, "casesens"))
|
||||||
s->func = case_sens_void;
|
s->func = case_sens_void;
|
||||||
else if (!strcmp(input, "regexp"))
|
else if (!strcmp(input, "regexp"))
|
||||||
|
|
Loading…
Reference in New Issue