Normalizing the whitespace after the recent changes in logic.
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@5229 35c25a1d-7b9e-4130-9fde-d3aeb78583b8master
parent
75d64e677e
commit
59187b8051
|
@ -1,3 +1,7 @@
|
||||||
|
2015-05-28 Benno Schulenberg <bensberg@justemail.net>
|
||||||
|
* src/help.c (do_help), src/prompt.c (do_yesno_prompt): Normalize
|
||||||
|
the whitespace after the recent changes in logic.
|
||||||
|
|
||||||
2015-05-28 Mahyar Abbaspour <mahyar.abaspour@gmail.com>
|
2015-05-28 Mahyar Abbaspour <mahyar.abaspour@gmail.com>
|
||||||
* src/nano.c (handle_sigwinch, regenerate_screen), src/global.c,
|
* src/nano.c (handle_sigwinch, regenerate_screen), src/global.c,
|
||||||
src/prompt.c (do_statusbar_input, get_prompt_string, do_yesno_prompt),
|
src/prompt.c (do_statusbar_input, get_prompt_string, do_yesno_prompt),
|
||||||
|
|
19
src/help.c
19
src/help.c
|
@ -75,16 +75,17 @@ void do_help(void (*refresh_func)(void))
|
||||||
while (TRUE) {
|
while (TRUE) {
|
||||||
size_t i;
|
size_t i;
|
||||||
|
|
||||||
/* Get the last line of the help text. */
|
/* Get the last line of the help text. */
|
||||||
ptr = help_text;
|
ptr = help_text;
|
||||||
|
|
||||||
for (last_line = 0; *ptr != '\0'; last_line++) {
|
for (last_line = 0; *ptr != '\0'; last_line++) {
|
||||||
ptr += help_line_len(ptr);
|
ptr += help_line_len(ptr);
|
||||||
if (*ptr == '\n')
|
if (*ptr == '\n')
|
||||||
ptr++;
|
ptr++;
|
||||||
}
|
}
|
||||||
if (last_line > 0)
|
|
||||||
last_line--;
|
if (last_line > 0)
|
||||||
|
last_line--;
|
||||||
|
|
||||||
/* Display the help text if we don't have a key, or if the help
|
/* Display the help text if we don't have a key, or if the help
|
||||||
* text has moved. */
|
* text has moved. */
|
||||||
|
|
64
src/prompt.c
64
src/prompt.c
|
@ -1075,48 +1075,48 @@ int do_yesno_prompt(bool all, const char *msg)
|
||||||
int mouse_x, mouse_y;
|
int mouse_x, mouse_y;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
if (!ISSET(NO_HELP)) {
|
if (!ISSET(NO_HELP)) {
|
||||||
char shortstr[3];
|
char shortstr[3];
|
||||||
/* Temp string for Yes, No, All. */
|
/* Temp string for Yes, No, All. */
|
||||||
|
|
||||||
if (COLS < 32)
|
if (COLS < 32)
|
||||||
width = COLS / 2;
|
width = COLS / 2;
|
||||||
|
|
||||||
/* Clear the shortcut list from the bottom of the screen. */
|
/* Clear the shortcut list from the bottom of the screen. */
|
||||||
blank_bottombars();
|
blank_bottombars();
|
||||||
|
|
||||||
sprintf(shortstr, " %c", yesstr[0]);
|
/* Now show the ones for "Yes", "No", "Cancel" and maybe "All". */
|
||||||
wmove(bottomwin, 1, 0);
|
sprintf(shortstr, " %c", yesstr[0]);
|
||||||
onekey(shortstr, _("Yes"), width);
|
wmove(bottomwin, 1, 0);
|
||||||
|
onekey(shortstr, _("Yes"), width);
|
||||||
|
|
||||||
if (all) {
|
if (all) {
|
||||||
wmove(bottomwin, 1, width);
|
wmove(bottomwin, 1, width);
|
||||||
shortstr[1] = allstr[0];
|
shortstr[1] = allstr[0];
|
||||||
onekey(shortstr, _("All"), width);
|
onekey(shortstr, _("All"), width);
|
||||||
|
}
|
||||||
|
|
||||||
|
wmove(bottomwin, 2, 0);
|
||||||
|
shortstr[1] = nostr[0];
|
||||||
|
onekey(shortstr, _("No"), width);
|
||||||
|
|
||||||
|
wmove(bottomwin, 2, 16);
|
||||||
|
onekey("^C", _("Cancel"), width);
|
||||||
}
|
}
|
||||||
|
|
||||||
wmove(bottomwin, 2, 0);
|
if (interface_color_pair[TITLE_BAR].bright)
|
||||||
shortstr[1] = nostr[0];
|
wattron(bottomwin, A_BOLD);
|
||||||
onekey(shortstr, _("No"), width);
|
wattron(bottomwin, interface_color_pair[TITLE_BAR].pairnum);
|
||||||
|
|
||||||
wmove(bottomwin, 2, 16);
|
blank_statusbar();
|
||||||
onekey("^C", _("Cancel"), width);
|
mvwaddnstr(bottomwin, 0, 0, msg, actual_x(msg, COLS - 1));
|
||||||
}
|
|
||||||
|
|
||||||
if (interface_color_pair[TITLE_BAR].bright)
|
wattroff(bottomwin, A_BOLD);
|
||||||
wattron(bottomwin, A_BOLD);
|
wattroff(bottomwin, interface_color_pair[TITLE_BAR].pairnum);
|
||||||
wattron(bottomwin, interface_color_pair[TITLE_BAR].pairnum);
|
|
||||||
|
|
||||||
blank_statusbar();
|
/* Refresh edit window and statusbar before getting input. */
|
||||||
mvwaddnstr(bottomwin, 0, 0, msg, actual_x(msg, COLS - 1));
|
wnoutrefresh(edit);
|
||||||
|
wnoutrefresh(bottomwin);
|
||||||
wattroff(bottomwin, A_BOLD);
|
|
||||||
wattroff(bottomwin, interface_color_pair[TITLE_BAR].pairnum);
|
|
||||||
|
|
||||||
/* Refresh the edit window and the statusbar before getting
|
|
||||||
* input. */
|
|
||||||
wnoutrefresh(edit);
|
|
||||||
wnoutrefresh(bottomwin);
|
|
||||||
|
|
||||||
currmenu = MYESNO;
|
currmenu = MYESNO;
|
||||||
kbinput = get_kbinput(bottomwin);
|
kbinput = get_kbinput(bottomwin);
|
||||||
|
|
Loading…
Reference in New Issue