in nanoget_repaint(), rename parameter inputbuf to buf, for consistency
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@3062 35c25a1d-7b9e-4130-9fde-d3aeb78583b8master
parent
26f61a4503
commit
3e477263da
|
@ -18,6 +18,8 @@ CVS code -
|
||||||
- nano.h:
|
- nano.h:
|
||||||
- Readd MIN_EDITOR_COLS #define. (DLR)
|
- Readd MIN_EDITOR_COLS #define. (DLR)
|
||||||
- winio.c:
|
- winio.c:
|
||||||
|
nanoget_repaint()
|
||||||
|
- Rename parameter inputbuf to buf, for consistency. (DLR)
|
||||||
edit_add()
|
edit_add()
|
||||||
- Rename to edit_draw(), and rename parameter yval to line.
|
- Rename to edit_draw(), and rename parameter yval to line.
|
||||||
(DLR)
|
(DLR)
|
||||||
|
|
|
@ -646,7 +646,7 @@ void blank_bottombars(void);
|
||||||
void check_statusblank(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 *inputbuf, size_t x);
|
void nanoget_repaint(const char *buf, size_t x);
|
||||||
int nanogetstr(bool allow_tabs, const char *curranswer,
|
int nanogetstr(bool allow_tabs, const char *curranswer,
|
||||||
#ifndef NANO_SMALL
|
#ifndef NANO_SMALL
|
||||||
filestruct **history_list,
|
filestruct **history_list,
|
||||||
|
|
10
src/winio.c
10
src/winio.c
|
@ -2494,15 +2494,15 @@ char *display_string(const char *buf, size_t start_col, size_t len, bool
|
||||||
|
|
||||||
/* Repaint the statusbar when getting a character in nanogetstr(). Note
|
/* Repaint the statusbar when getting a character in nanogetstr(). Note
|
||||||
* that we must turn on A_REVERSE here, since do_help() turns it off! */
|
* that we must turn on A_REVERSE here, since do_help() turns it off! */
|
||||||
void nanoget_repaint(const char *inputbuf, size_t x)
|
void nanoget_repaint(const char *buf, size_t x)
|
||||||
{
|
{
|
||||||
size_t start_col, xpt, page_start;
|
size_t start_col, xpt, page_start;
|
||||||
char *expanded;
|
char *expanded;
|
||||||
|
|
||||||
assert(x <= strlen(inputbuf));
|
assert(x <= strlen(buf));
|
||||||
|
|
||||||
start_col = strlenpt(prompt) + 1;
|
start_col = strlenpt(prompt) + 1;
|
||||||
xpt = strnlenpt(inputbuf, x);
|
xpt = strnlenpt(buf, x);
|
||||||
page_start = get_statusbar_page_start(start_col, start_col + xpt);
|
page_start = get_statusbar_page_start(start_col, start_col + xpt);
|
||||||
|
|
||||||
wattron(bottomwin, A_REVERSE);
|
wattron(bottomwin, A_REVERSE);
|
||||||
|
@ -2513,8 +2513,8 @@ void nanoget_repaint(const char *inputbuf, size_t x)
|
||||||
waddch(bottomwin, ':');
|
waddch(bottomwin, ':');
|
||||||
waddch(bottomwin, (page_start == 0) ? ' ' : '$');
|
waddch(bottomwin, (page_start == 0) ? ' ' : '$');
|
||||||
|
|
||||||
expanded = display_string(inputbuf, page_start, COLS - start_col -
|
expanded = display_string(buf, page_start, COLS - start_col - 1,
|
||||||
1, FALSE);
|
FALSE);
|
||||||
waddstr(bottomwin, expanded);
|
waddstr(bottomwin, expanded);
|
||||||
free(expanded);
|
free(expanded);
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue