in update_line(), remove now-unneeded logic that set the index parameter

to zero if the fileptr parameter didn't point to current


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@3097 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
master
David Lawrence Ramsey 2005-11-07 06:20:02 +00:00
parent 37ddfa9dbd
commit b3c6b40550
2 changed files with 6 additions and 7 deletions

View File

@ -76,6 +76,9 @@ CVS code -
- winio.c: - winio.c:
nanoget_repaint() nanoget_repaint()
- Rename parameter inputbuf to buf, for consistency. (DLR) - Rename parameter inputbuf to buf, for consistency. (DLR)
update_line()
- Remove now-unneeded logic that set the index parameter to zero
if the fileptr parameter didn't point to current. (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)

View File

@ -2541,11 +2541,8 @@ void edit_draw(const filestruct *fileptr, const char *converted, int
} }
/* Just update one line in the edit buffer. This is basically a wrapper /* Just update one line in the edit buffer. This is basically a wrapper
* for edit_draw(). * for edit_draw(). The line will be displayed starting with
* * fileptr->data[index]. Likely arguments are current_x or zero. */
* If fileptr != current, then index is considered 0. The line will be
* displayed starting with fileptr->data[index]. Likely args are
* current_x or 0. */
void update_line(const filestruct *fileptr, size_t index) void update_line(const filestruct *fileptr, size_t index)
{ {
int line; int line;
@ -2570,8 +2567,7 @@ void update_line(const filestruct *fileptr, size_t index)
/* Next, convert variables that index the line to their equivalent /* Next, convert variables that index the line to their equivalent
* positions in the expanded line. */ * positions in the expanded line. */
index = (fileptr == openfile->current) ? strnlenpt(fileptr->data, index = strnlenpt(fileptr->data, index);
index) : 0;
page_start = get_page_start(index); page_start = get_page_start(index);
/* Expand the line, replacing tabs with spaces, and control /* Expand the line, replacing tabs with spaces, and control