;
else if (s->scfunc == total_refresh)
total_statusbar_refresh(refresh_func);
- else if (s->scfunc == do_cut_text_void) {
+ else if (s->scfunc == do_cut_text_void) {
/* If we're using restricted mode, the filename
* isn't blank, and we're at the "Write File"
* prompt, disable Cut. */
do_statusbar_right();
else if (s->scfunc == do_left)
do_statusbar_left();
-
#ifndef NANO_TINY
else if (s->scfunc == do_next_word_void)
do_statusbar_next_word(FALSE);
else if (s->scfunc == do_prev_word_void)
- do_statusbar_prev_word(FALSE);
+ do_statusbar_prev_word(FALSE);
#endif
else if (s->scfunc == do_home)
- do_statusbar_home();
+ do_statusbar_home();
else if (s->scfunc == do_end)
- do_statusbar_end();
+ do_statusbar_end();
else if (s->scfunc == do_verbatim_input) {
- /* If we're using restricted mode, the filename
- * isn't blank, and we're at the "Write File"
- * prompt, disable verbatim input. */
- if (!ISSET(RESTRICTED) ||
- openfile->filename[0] == '\0' ||
- currmenu != MWRITEFILE) {
- bool got_enter;
- /* Whether we got the Enter key. */
-
- do_statusbar_verbatim_input(&got_enter);
-
- /* If we got the Enter key, remove it from
- * the input buffer, set input to the key
- * value for Enter, and 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);
- *finished = TRUE;
- }
+ /* If we're using restricted mode, the filename
+ * isn't blank, and we're at the "Write File"
+ * prompt, disable verbatim input. */
+ if (!ISSET(RESTRICTED) || currmenu != MWRITEFILE ||
+ openfile->filename[0] == '\0') {
+ bool got_enter;
+ /* Whether we got the Enter key. */
+
+ do_statusbar_verbatim_input(&got_enter);
+
+ /* If we got the Enter key, remove it from the input
+ * buffer, set input to the key value for Enter, and
+ * 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);
+ *finished = TRUE;
}
+ }
} else if (s->scfunc == do_delete) {
/* If we're using restricted mode, the filename
* isn't blank, and we're at the "Write File"
if (s->scfunc != 0 && s->execute == TRUE) {
*ran_func = TRUE;
if (f && (!ISSET(VIEW_MODE) || (f->viewok)))
- f->scfunc();
+ f->scfunc();
}
*finished = TRUE;
}
errcount = 0;
if (nodelay_mode) {
if ((input = wgetch(win)) == ERR)
- return;
+ return;
} else
while ((input = wgetch(win)) == ERR) {
errcount++;
/* Go through the list of functions to determine which
* shortcut in the current menu we released/clicked on. */
for (f = allfuncs; f != NULL; f = f->next) {
- if ((f->menus & currmenu) == 0)
+ if ((f->menus & currmenu) == 0)
continue;
#ifndef DISABLE_HELP
if (!f->help || strlen(f->help) == 0)
continue;
#endif
if (first_sc_for(currmenu, f->scfunc) == NULL)
- continue;
+ continue;
/* Tick off an actually shown shortcut. */
j -= 1;
if (j == 0)
/* And put the corresponding key into the keyboard buffer. */
if (f != NULL) {
- const sc *s = first_sc_for(currmenu, f->scfunc);
+ const sc *s = first_sc_for(currmenu, f->scfunc);
unget_kbinput(s->seq, s->type == META, s->type == FKEY);
}
return 1;
#endif
for (s = sclist; s != NULL; s = s->next) {
- if ((menu & s->menu) && *kbinput == s->seq
+ if ((menu & s->menu) && *kbinput == s->seq
&& *meta_key == (s->type == META)) {
#ifdef DEBUG
fprintf (stderr, "matched seq \"%s\", and btw meta was %d (menu is %x from %x)\n",
if (openfile->filename[0] == '\0')
return;
else if (openfile->lock_filename == NULL) {
- /* TRANSLATORS: Try to keep this at most 76 characters. */
- statusbar(_("Warning: Modifying a file which is not locked, check directory permission?"));
+ /* TRANSLATORS: Try to keep this at most 76 characters. */
+ statusbar(_("Warning: Modifying a file which is not locked, check directory permission?"));
} else {
write_lockfile(openfile->lock_filename,
- get_full_path(openfile->filename), TRUE);
- }
+ get_full_path(openfile->filename), TRUE);
+ }
}
#endif
}
for (f = allfuncs, i = 0; i < slen && f != NULL; f = f->next) {
#ifdef DEBUG
- fprintf(stderr, "Checking menu items....");
+ fprintf(stderr, "Checking menu items....");
#endif
- if ((f->menus & menu) == 0)
+ if ((f->menus & menu) == 0)
continue;
- if (!f->desc || strlen(f->desc) == 0)
+ if (!f->desc || strlen(f->desc) == 0)
continue;
#ifdef DEBUG
- fprintf(stderr, "found one! f->menus = %x, desc = \"%s\"\n", f->menus, f->desc);
+ fprintf(stderr, "found one! f->menus = %x, desc = \"%s\"\n", f->menus, f->desc);
#endif
- s = first_sc_for(menu, f->scfunc);
- if (s == NULL) {
+ s = first_sc_for(menu, f->scfunc);
+ if (s == NULL) {
#ifdef DEBUG
fprintf(stderr, "Whoops, guess not, no shortcut key found for func!\n");
#endif
- continue;
- }
+ continue;
+ }
wmove(bottomwin, 1 + i % 2, (i / 2) * colwidth);
#ifdef DEBUG
- fprintf(stderr, "Calling onekey with keystr \"%s\" and desc \"%s\"\n", s->keystr, f->desc);
+ fprintf(stderr, "Calling onekey with keystr \"%s\" and desc \"%s\"\n", s->keystr, f->desc);
#endif
onekey(s->keystr, _(f->desc), colwidth + (COLS % colwidth));
- i++;
+ i++;
}
wnoutrefresh(bottomwin);