Adjust the same bit to adjust the selection for history-top and

history-bottom as for cursor-up and cursor-down. GitHub issue 1723.
This commit is contained in:
nicm 2019-05-07 19:46:17 +00:00
parent fcd0e3082b
commit d53d3bce59

View File

@ -902,9 +902,14 @@ window_copy_cmd_history_bottom(struct window_copy_cmd_state *cs)
{
struct window_mode_entry *wme = cs->wme;
struct window_copy_mode_data *data = wme->data;
u_int oy;
oy = screen_hsize(data->backing) + data->cy - data->oy;
if (data->lineflag == LINE_SEL_RIGHT_LEFT && oy == data->endsely)
window_copy_other_end(wme);
data->cx = 0;
data->cy = screen_size_y(&data->screen) - 1;
data->cx = window_copy_find_length(wme, data->cy);
data->oy = 0;
window_copy_update_selection(wme, 1);
@ -916,9 +921,14 @@ window_copy_cmd_history_top(struct window_copy_cmd_state *cs)
{
struct window_mode_entry *wme = cs->wme;
struct window_copy_mode_data *data = wme->data;
u_int oy;
oy = screen_hsize(data->backing) + data->cy - data->oy;
if (data->lineflag == LINE_SEL_LEFT_RIGHT && oy == data->sely)
window_copy_other_end(wme);
data->cx = 0;
data->cy = 0;
data->cx = 0;
data->oy = screen_hsize(data->backing);
window_copy_update_selection(wme, 1);