version 1.274, 2020/04/15 17:50:02 |
version 1.275, 2020/04/15 19:06:49 |
|
|
} |
} |
|
|
static void |
static void |
window_copy_resize(struct window_mode_entry *wme, u_int sx, u_int sy) |
window_copy_size_changed(struct window_mode_entry *wme) |
{ |
{ |
struct window_copy_mode_data *data = wme->data; |
struct window_copy_mode_data *data = wme->data; |
struct screen *s = &data->screen; |
struct screen *s = &data->screen; |
struct screen_write_ctx ctx; |
struct screen_write_ctx ctx; |
int search; |
int search = (data->searchmark != NULL); |
|
|
screen_resize(s, sx, sy, 0); |
|
screen_resize_cursor(data->backing, sx, sy, 1, 0, NULL, NULL); |
|
|
|
if (data->cy > sy - 1) |
|
data->cy = sy - 1; |
|
if (data->cx > sx) |
|
data->cx = sx; |
|
if (data->oy > screen_hsize(data->backing)) |
|
data->oy = screen_hsize(data->backing); |
|
|
|
search = (data->searchmark != NULL); |
|
window_copy_clear_selection(wme); |
window_copy_clear_selection(wme); |
window_copy_clear_marks(wme); |
window_copy_clear_marks(wme); |
|
|
|
|
data->searchx = data->cx; |
data->searchx = data->cx; |
data->searchy = data->cy; |
data->searchy = data->cy; |
data->searcho = data->oy; |
data->searcho = data->oy; |
|
} |
|
|
|
static void |
|
window_copy_resize(struct window_mode_entry *wme, u_int sx, u_int sy) |
|
{ |
|
struct window_copy_mode_data *data = wme->data; |
|
struct screen *s = &data->screen; |
|
|
|
screen_resize(s, sx, sy, 0); |
|
screen_resize_cursor(data->backing, sx, sy, 1, 0, NULL, NULL); |
|
|
|
if (data->cy > sy - 1) |
|
data->cy = sy - 1; |
|
if (data->cx > sx) |
|
data->cx = sx; |
|
if (data->oy > screen_hsize(data->backing)) |
|
data->oy = screen_hsize(data->backing); |
|
|
|
window_copy_size_changed(wme); |
window_copy_redraw_screen(wme); |
window_copy_redraw_screen(wme); |
} |
} |
|
|
|
|
data->backing = window_copy_clone_screen(&wp->base, &data->screen, NULL, |
data->backing = window_copy_clone_screen(&wp->base, &data->screen, NULL, |
NULL); |
NULL); |
|
|
|
window_copy_size_changed(wme); |
return (WINDOW_COPY_CMD_REDRAW); |
return (WINDOW_COPY_CMD_REDRAW); |
} |
} |
|
|