Correctly move to previous line when looking for previous word, from

Derry Jing.
pull/2288/head
nicm 2020-06-16 07:28:57 +00:00
parent 1c78155e70
commit afe4ea4250
1 changed files with 4 additions and 4 deletions

View File

@ -4535,14 +4535,14 @@ window_copy_cursor_previous_word_pos(struct window_mode_entry *wme,
separators))
break;
} else {
if (data->cy == 0 &&
if (py == 0 ||
(data->cy == 0 &&
(screen_hsize(data->backing) == 0 ||
data->oy >=
screen_hsize(data->backing) - 1))
screen_hsize(data->backing) - 1)))
goto out;
py = screen_hsize(data->backing) + data->cy -
data->oy;
py--;
px = window_copy_find_length(wme, py);
/* Stop if separator at EOL. */