tweaks: rename a function, to suit better, and reshuffle its parameters

master
Benno Schulenberg 2019-06-26 19:07:26 +02:00
parent 62ca113ed3
commit 09ad0eb5f7
2 changed files with 4 additions and 6 deletions

View File

@ -627,8 +627,6 @@ void statusline(message_type importance, const char *msg, ...);
void bottombars(int menu);
void post_one_key(const char *keystroke, const char *tag, int width);
void place_the_cursor(void);
void edit_draw(linestruct *fileptr, const char *converted,
int line, size_t from_col);
int update_line(linestruct *fileptr, size_t index);
#ifndef NANO_TINY
int update_softwrapped_line(linestruct *fileptr);

View File

@ -2410,8 +2410,8 @@ void place_the_cursor(void)
* line to be drawn, and converted is the actual string to be written with
* tabs and control characters replaced by strings of regular characters.
* from_col is the column number of the first character of this "page". */
void edit_draw(linestruct *fileptr, const char *converted,
int row, size_t from_col)
void draw_row(int row, const char *converted, linestruct *fileptr,
size_t from_col)
{
#if !defined(NANO_TINY) || defined(ENABLE_COLOR)
size_t from_x = actual_x(fileptr->data, from_col);
@ -2800,7 +2800,7 @@ int update_line(linestruct *fileptr, size_t index)
/* Expand the piece to be drawn to its representable form, and draw it. */
converted = display_string(fileptr->data, from_col, editwincols, TRUE, FALSE);
edit_draw(fileptr, converted, row, from_col);
draw_row(row, converted, fileptr, from_col);
free(converted);
if (from_col > 0) {
@ -2867,7 +2867,7 @@ int update_softwrapped_line(linestruct *fileptr)
/* Convert the chunk to its displayable form and draw it. */
converted = display_string(fileptr->data, from_col, to_col - from_col,
TRUE, FALSE);
edit_draw(fileptr, converted, row++, from_col);
draw_row(row++, converted, fileptr, from_col);
free(converted);
if (end_of_line)