will behave differently depending on the setting of autoindent.
This addresses Debian bug #793053 reported by Clancy.
* src/text.c (do_enter): Chop the now unused parameter 'undoing'.
+ * src/text.c (do_enter_void): Discard this now useless function.
2015-11-10 Benno Schulenberg <bensberg@justemail.net>
* src/winio.c (edit_draw): Skip a zero-length match only when there
/* If we selected the same filename as last time,
* put back the Enter key so that it's read in. */
if (old_selected == selected)
- unget_kbinput(sc_seq_or(do_enter_void, 0), FALSE, FALSE);
+ unget_kbinput(sc_seq_or(do_enter, 0), FALSE, FALSE);
}
}
#endif /* !DISABLE_MOUSE */
} else if (func == do_right) {
if (selected < filelist_len - 1)
selected++;
- } else if (func == do_enter_void) {
+ } else if (func == do_enter) {
/* We can't move up from "/". */
if (strcmp(filelist[selected], "/..") == 0) {
statusbar(_("Can't move up a directory"));
return goto_dir_void;
case 'S':
case 's':
- return do_enter_void;
+ return do_enter;
case 'W':
case 'w':
return do_search;
add_to_funcs(do_tab, MMAIN,
N_("Tab"), IFSCHELP(nano_tab_msg), TOGETHER, NOVIEW);
- add_to_funcs(do_enter_void, MMAIN,
+ add_to_funcs(do_enter, MMAIN,
N_("Enter"), IFSCHELP(nano_enter_msg), BLANKAFTER, NOVIEW);
add_to_funcs(do_delete, MMAIN,
add_to_sclist(MHELP, "End", do_last_line, 0);
#endif
add_to_sclist(MMOST, "^I", do_tab, 0);
- add_to_sclist(MMOST, "^M", do_enter_void, 0);
- add_to_sclist(MMOST, "Enter", do_enter_void, 0);
+ add_to_sclist(MMOST, "^M", do_enter, 0);
+ add_to_sclist(MMOST, "Enter", do_enter, 0);
add_to_sclist(MMOST, "^D", do_delete, 0);
add_to_sclist(MMOST, "Del", do_delete, 0);
add_to_sclist(MMOST, "^H", do_backspace, 0);
else if (!strcasecmp(input, "tab"))
s->scfunc = do_tab;
else if (!strcasecmp(input, "enter"))
- s->scfunc = do_enter_void;
+ s->scfunc = do_enter;
else if (!strcasecmp(input, "delete"))
s->scfunc = do_delete;
else if (!strcasecmp(input, "backspace"))
}
if (have_shortcut) {
- if (s->scfunc == do_tab || s->scfunc == do_enter_void)
+ if (s->scfunc == do_tab || s->scfunc == do_enter)
;
else if (s->scfunc == total_refresh)
total_statusbar_refresh(refresh_func);
* set finished to TRUE to indicate that we're done. */
if (got_enter) {
get_input(NULL, 1);
- input = sc_seq_or(do_enter_void, 0);
+ input = sc_seq_or(do_enter, 0);
*finished = TRUE;
}
}
func = func_from_key(&kbinput);
- if (func == do_cancel || func == do_enter_void)
+ if (func == do_cancel || func == do_enter)
break;
#ifndef DISABLE_TABCOMP
* we've finished putting in an answer, reset the statusbar cursor
* position too. */
if (func) {
- if (func == do_cancel || func == do_enter_void || ran_func) {
+ if (func == do_cancel || func == do_enter || ran_func) {
statusbar_x = old_statusbar_x;
statusbar_pww = old_pww;
* properly. */
if (func == do_cancel)
retval = -1;
- else if (func == do_enter_void)
+ else if (func == do_enter)
retval = (*answer == '\0') ? -2 : 0;
blank_statusbar();
void do_redo(void);
#endif
void do_enter(void);
-void do_enter_void(void);
#ifndef NANO_TINY
RETSIGTYPE cancel_command(int signal);
bool execute_command(const char *command);
edit_refresh_needed = TRUE;
}
-/* Need this again... */
-void do_enter_void(void)
-{
- do_enter();
-}
-
#ifndef NANO_TINY
/* Send a SIGKILL (unconditional kill) to the forked process in
* execute_command(). */
retval = sc_seq_or(do_page_up, *kbinput);
break;
case KEY_ENTER:
- retval = sc_seq_or(do_enter_void, *kbinput);
+ retval = sc_seq_or(do_enter, *kbinput);
break;
case KEY_B2: /* Center (5) on numeric keypad with
* NumLock off. */