allow refreshing of the help browser window, as Pico does, and remove a

few stray spaces from the main help text


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2386 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
This commit is contained in:
David Lawrence Ramsey 2005-03-17 17:56:48 +00:00
parent 27f2b258d3
commit b9ddb80123
5 changed files with 34 additions and 15 deletions

View File

@ -315,6 +315,11 @@ CVS code -
total_refresh()
- Refresh bottomwin using the value of currshortcut, and change
the code around do_refresh() calls to accommodate this. (DLR)
- Split out the code that blanks the screen before refreshing it
into the new function total_blank().
do_help()
- Refresh the screen when Ctrl-L is pressed in the help browser,
as Pico does. (DLR)
- configure.ac:
- Remove specific references to control key shortcuts. (DLR)
- Check for the wide version of ncurses, without which multibyte

View File

@ -811,6 +811,10 @@ void shortcut_init(bool unjustify)
IFHELP(nano_nextline_msg, NANO_NO_KEY), NANO_NO_KEY,
NANO_NO_KEY, VIEW, NULL);
sc_init_one(&help_list, NANO_REFRESH_KEY, N_("Refresh"),
IFHELP(nano_refresh_msg, NANO_NO_KEY), NANO_NO_KEY,
NANO_NO_KEY, VIEW, NULL);
sc_init_one(&help_list, NANO_EXIT_KEY, exit_msg,
IFHELP(nano_exit_msg, NANO_NO_KEY), NANO_EXIT_FKEY,
NANO_NO_KEY, VIEW, NULL);

View File

@ -381,9 +381,9 @@ void help_init(void)
"(M) symbol and can be entered using either the Esc, Alt or "
"Meta key depending on your keyboard setup. Also, pressing Esc "
"twice and then typing a three-digit decimal number from 000 to "
" 255 will enter the character with the corresponding value. "
"255 will enter the character with the corresponding value. "
"The following keystrokes are available in the main editor "
" window. Alternative keys are shown in parentheses:\n\n");
"window. Alternative keys are shown in parentheses:\n\n");
htx = _(htx);

View File

@ -634,8 +634,8 @@ void blank_titlebar(void);
void blank_topbar(void);
void blank_edit(void);
void blank_statusbar(void);
void check_statusblank(void);
void blank_bottombars(void);
void check_statusblank(void);
char *display_string(const char *buf, size_t start_col, size_t len, bool
dollars);
void nanoget_repaint(const char *buf, const char *inputbuf, size_t x);
@ -674,6 +674,7 @@ void edit_redraw(const filestruct *old_current, size_t old_pww);
void edit_refresh(void);
void edit_update(topmidnone location);
int do_yesno(bool all, const char *msg);
void total_blank(void);
void total_refresh(void);
void display_main_list(void);
void do_cursorpos(bool constant);

View File

@ -2190,6 +2190,14 @@ void blank_statusbar(void)
mvwaddstr(bottomwin, 0, 0, hblank);
}
void blank_bottombars(void)
{
if (!ISSET(NO_HELP)) {
mvwaddstr(bottomwin, 1, 0, hblank);
mvwaddstr(bottomwin, 2, 0, hblank);
}
}
void check_statusblank(void)
{
if (statusblank > 1)
@ -2203,14 +2211,6 @@ void check_statusblank(void)
}
}
void blank_bottombars(void)
{
if (!ISSET(NO_HELP)) {
mvwaddstr(bottomwin, 1, 0, hblank);
mvwaddstr(bottomwin, 2, 0, hblank);
}
}
/* Convert buf into a string that can be displayed on screen. The
* caller wants to display buf starting with column start_col, and
* extending for at most len columns. start_col is zero-based. len is
@ -3732,7 +3732,7 @@ int do_yesno(bool all, const char *msg)
return ok;
}
void total_refresh(void)
void total_blank(void)
{
clearok(topwin, TRUE);
clearok(edit, TRUE);
@ -3744,6 +3744,11 @@ void total_refresh(void)
clearok(topwin, FALSE);
clearok(edit, FALSE);
clearok(bottomwin, FALSE);
}
void total_refresh(void)
{
total_blank();
titlebar(NULL);
edit_refresh();
bottombars(currshortcut);
@ -3929,10 +3934,14 @@ void do_help(void)
break;
}
if (line == old_line && kbinput != ERR)
goto skip_redisplay;
if (kbinput == NANO_REFRESH_KEY)
total_blank();
else {
if (line == old_line && kbinput != ERR)
goto skip_redisplay;
blank_edit();
blank_edit();
}
assert(COLS > 5);