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-d3aeb78583b8master
parent
27f2b258d3
commit
b9ddb80123
|
@ -315,6 +315,11 @@ CVS code -
|
||||||
total_refresh()
|
total_refresh()
|
||||||
- Refresh bottomwin using the value of currshortcut, and change
|
- Refresh bottomwin using the value of currshortcut, and change
|
||||||
the code around do_refresh() calls to accommodate this. (DLR)
|
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:
|
- configure.ac:
|
||||||
- Remove specific references to control key shortcuts. (DLR)
|
- Remove specific references to control key shortcuts. (DLR)
|
||||||
- Check for the wide version of ncurses, without which multibyte
|
- Check for the wide version of ncurses, without which multibyte
|
||||||
|
|
|
@ -811,6 +811,10 @@ void shortcut_init(bool unjustify)
|
||||||
IFHELP(nano_nextline_msg, NANO_NO_KEY), NANO_NO_KEY,
|
IFHELP(nano_nextline_msg, NANO_NO_KEY), NANO_NO_KEY,
|
||||||
NANO_NO_KEY, VIEW, NULL);
|
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,
|
sc_init_one(&help_list, NANO_EXIT_KEY, exit_msg,
|
||||||
IFHELP(nano_exit_msg, NANO_NO_KEY), NANO_EXIT_FKEY,
|
IFHELP(nano_exit_msg, NANO_NO_KEY), NANO_EXIT_FKEY,
|
||||||
NANO_NO_KEY, VIEW, NULL);
|
NANO_NO_KEY, VIEW, NULL);
|
||||||
|
|
|
@ -381,9 +381,9 @@ void help_init(void)
|
||||||
"(M) symbol and can be entered using either the Esc, Alt or "
|
"(M) symbol and can be entered using either the Esc, Alt or "
|
||||||
"Meta key depending on your keyboard setup. Also, pressing Esc "
|
"Meta key depending on your keyboard setup. Also, pressing Esc "
|
||||||
"twice and then typing a three-digit decimal number from 000 to "
|
"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 "
|
"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);
|
htx = _(htx);
|
||||||
|
|
||||||
|
|
|
@ -634,8 +634,8 @@ void blank_titlebar(void);
|
||||||
void blank_topbar(void);
|
void blank_topbar(void);
|
||||||
void blank_edit(void);
|
void blank_edit(void);
|
||||||
void blank_statusbar(void);
|
void blank_statusbar(void);
|
||||||
void check_statusblank(void);
|
|
||||||
void blank_bottombars(void);
|
void blank_bottombars(void);
|
||||||
|
void check_statusblank(void);
|
||||||
char *display_string(const char *buf, size_t start_col, size_t len, bool
|
char *display_string(const char *buf, size_t start_col, size_t len, bool
|
||||||
dollars);
|
dollars);
|
||||||
void nanoget_repaint(const char *buf, const char *inputbuf, size_t x);
|
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_refresh(void);
|
||||||
void edit_update(topmidnone location);
|
void edit_update(topmidnone location);
|
||||||
int do_yesno(bool all, const char *msg);
|
int do_yesno(bool all, const char *msg);
|
||||||
|
void total_blank(void);
|
||||||
void total_refresh(void);
|
void total_refresh(void);
|
||||||
void display_main_list(void);
|
void display_main_list(void);
|
||||||
void do_cursorpos(bool constant);
|
void do_cursorpos(bool constant);
|
||||||
|
|
27
src/winio.c
27
src/winio.c
|
@ -2190,6 +2190,14 @@ void blank_statusbar(void)
|
||||||
mvwaddstr(bottomwin, 0, 0, hblank);
|
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)
|
void check_statusblank(void)
|
||||||
{
|
{
|
||||||
if (statusblank > 1)
|
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
|
/* Convert buf into a string that can be displayed on screen. The
|
||||||
* caller wants to display buf starting with column start_col, and
|
* caller wants to display buf starting with column start_col, and
|
||||||
* extending for at most len columns. start_col is zero-based. len is
|
* 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;
|
return ok;
|
||||||
}
|
}
|
||||||
|
|
||||||
void total_refresh(void)
|
void total_blank(void)
|
||||||
{
|
{
|
||||||
clearok(topwin, TRUE);
|
clearok(topwin, TRUE);
|
||||||
clearok(edit, TRUE);
|
clearok(edit, TRUE);
|
||||||
|
@ -3744,6 +3744,11 @@ void total_refresh(void)
|
||||||
clearok(topwin, FALSE);
|
clearok(topwin, FALSE);
|
||||||
clearok(edit, FALSE);
|
clearok(edit, FALSE);
|
||||||
clearok(bottomwin, FALSE);
|
clearok(bottomwin, FALSE);
|
||||||
|
}
|
||||||
|
|
||||||
|
void total_refresh(void)
|
||||||
|
{
|
||||||
|
total_blank();
|
||||||
titlebar(NULL);
|
titlebar(NULL);
|
||||||
edit_refresh();
|
edit_refresh();
|
||||||
bottombars(currshortcut);
|
bottombars(currshortcut);
|
||||||
|
@ -3929,10 +3934,14 @@ void do_help(void)
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (kbinput == NANO_REFRESH_KEY)
|
||||||
|
total_blank();
|
||||||
|
else {
|
||||||
if (line == old_line && kbinput != ERR)
|
if (line == old_line && kbinput != ERR)
|
||||||
goto skip_redisplay;
|
goto skip_redisplay;
|
||||||
|
|
||||||
blank_edit();
|
blank_edit();
|
||||||
|
}
|
||||||
|
|
||||||
assert(COLS > 5);
|
assert(COLS > 5);
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue