Commit 3dc6ccbe authored by Benno Schulenberg's avatar Benno Schulenberg
Browse files

tweaks: rename a function, to be more accurate

Because nothing gets reset to zero or to some initial value.
parent b98545f4
Showing with 13 additions and 13 deletions
+13 -13
......@@ -291,8 +291,8 @@ void do_uncut_text(void)
/* Mark the file as modified. */
set_modified();
/* Update the cursor position to account for the inserted lines. */
reset_cursor();
/* Update current_y to account for the inserted lines. */
place_the_cursor();
refresh_needed = TRUE;
......
......@@ -1200,8 +1200,8 @@ void do_insertfile(void)
openfile->current_x != was_current_x)
set_modified();
/* Update the cursor position to account for inserted lines. */
reset_cursor();
/* Update current_y to account for inserted lines. */
place_the_cursor();
refresh_needed = TRUE;
}
......
......@@ -2665,7 +2665,7 @@ int main(int argc, char **argv)
/* Refresh just the cursor position or the entire edit window. */
if (!refresh_needed) {
reset_cursor();
place_the_cursor();
wnoutrefresh(edit);
} else
edit_refresh();
......
......@@ -640,7 +640,7 @@ void warn_and_shortly_pause(const char *msg);
void statusline(message_type importance, const char *msg, ...);
void bottombars(int menu);
void onekey(const char *keystroke, const char *desc, int length);
void reset_cursor(void);
void place_the_cursor(void);
void edit_draw(filestruct *fileptr, const char *converted,
int line, size_t from_col);
int update_line(filestruct *fileptr, size_t index);
......
......@@ -2443,7 +2443,7 @@ void do_justify(bool full_justify)
do {
#endif
statusbar(_("Can now UnJustify!"));
reset_cursor();
place_the_cursor();
curs_set(1);
kbinput = do_input(FALSE);
#ifndef NANO_TINY
......@@ -3315,7 +3315,7 @@ void do_linter(void)
}
/* Place and show the cursor to indicate the affected line. */
reset_cursor();
place_the_cursor();
wnoutrefresh(edit);
curs_set(1);
......@@ -3559,7 +3559,7 @@ void do_verbatim_input(void)
/* TRANSLATORS: This is displayed when the next keystroke will be
* inserted verbatim. */
statusbar(_("Verbatim Input"));
reset_cursor();
place_the_cursor();
curs_set(1);
/* Read in all the verbatim characters. */
......
......@@ -1235,7 +1235,7 @@ int parse_escape_sequence(WINDOW *win, int kbinput)
suppress_cursorpos = FALSE;
lastmessage = HUSH;
if (currmenu == MMAIN) {
reset_cursor();
place_the_cursor();
curs_set(1);
}
}
......@@ -2278,7 +2278,7 @@ void onekey(const char *keystroke, const char *desc, int length)
/* Redetermine current_y from the position of current relative to edittop,
* and put the cursor in the edit window at (current_y, "current_x"). */
void reset_cursor(void)
void place_the_cursor(void)
{
ssize_t row = 0;
size_t col, xpt = xplustabs();
......@@ -3087,7 +3087,7 @@ void edit_refresh(void)
while (row < editwinrows)
blank_row(edit, row++, 0, COLS);
reset_cursor();
place_the_cursor();
wnoutrefresh(edit);
refresh_needed = FALSE;
......@@ -3255,7 +3255,7 @@ void spotlight(bool active, const char *word)
room--;
}
reset_cursor();
place_the_cursor();
if (active)
wattron(edit, hilite_attribute);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment