version 1.282, 2020/05/16 15:11:52 |
version 1.283, 2020/05/16 15:34:08 |
|
|
data->screen.cx = data->cx; |
data->screen.cx = data->cx; |
data->screen.cy = data->cy; |
data->screen.cy = data->cy; |
|
|
screen_write_start(&ctx, NULL, &data->screen); |
screen_write_start(&ctx, &data->screen); |
for (i = 0; i < screen_size_y(&data->screen); i++) |
for (i = 0; i < screen_size_y(&data->screen); i++) |
window_copy_write_line(wme, &ctx, i); |
window_copy_write_line(wme, &ctx, i); |
screen_write_cursormove(&ctx, data->cx, data->cy, 0); |
screen_write_cursormove(&ctx, data->cx, data->cy, 0); |
|
|
memcpy(&gc, &grid_default_cell, sizeof gc); |
memcpy(&gc, &grid_default_cell, sizeof gc); |
|
|
old_hsize = screen_hsize(data->backing); |
old_hsize = screen_hsize(data->backing); |
screen_write_start(&back_ctx, NULL, backing); |
screen_write_start(&back_ctx, backing); |
if (data->backing_written) { |
if (data->backing_written) { |
/* |
/* |
* On the second or later line, do a CRLF before writing |
* On the second or later line, do a CRLF before writing |
|
|
|
|
data->oy += screen_hsize(data->backing) - old_hsize; |
data->oy += screen_hsize(data->backing) - old_hsize; |
|
|
screen_write_start(&ctx, wp, &data->screen); |
screen_write_start_pane(&ctx, wp, &data->screen); |
|
|
/* |
/* |
* If the history has changed, draw the top line. |
* If the history has changed, draw the top line. |
|
|
window_copy_clear_selection(wme); |
window_copy_clear_selection(wme); |
window_copy_clear_marks(wme); |
window_copy_clear_marks(wme); |
|
|
screen_write_start(&ctx, NULL, s); |
screen_write_start(&ctx, s); |
window_copy_write_lines(wme, &ctx, 0, screen_size_y(s)); |
window_copy_write_lines(wme, &ctx, 0, screen_size_y(s)); |
screen_write_stop(&ctx); |
screen_write_stop(&ctx); |
|
|
|
|
fy = screen_hsize(data->backing) - data->oy + data->cy; |
fy = screen_hsize(data->backing) - data->oy + data->cy; |
|
|
screen_init(&ss, screen_write_strlen("%s", str), 1, 0); |
screen_init(&ss, screen_write_strlen("%s", str), 1, 0); |
screen_write_start(&ctx, NULL, &ss); |
screen_write_start(&ctx, &ss); |
screen_write_nputs(&ctx, -1, &grid_default_cell, "%s", str); |
screen_write_nputs(&ctx, -1, &grid_default_cell, "%s", str); |
screen_write_stop(&ctx); |
screen_write_stop(&ctx); |
|
|
|
|
if (ssp == NULL) { |
if (ssp == NULL) { |
width = screen_write_strlen("%s", data->searchstr); |
width = screen_write_strlen("%s", data->searchstr); |
screen_init(&ss, width, 1, 0); |
screen_init(&ss, width, 1, 0); |
screen_write_start(&ctx, NULL, &ss); |
screen_write_start(&ctx, &ss); |
screen_write_nputs(&ctx, -1, &grid_default_cell, "%s", |
screen_write_nputs(&ctx, -1, &grid_default_cell, "%s", |
data->searchstr); |
data->searchstr); |
screen_write_stop(&ctx); |
screen_write_stop(&ctx); |
|
|
struct screen_write_ctx ctx; |
struct screen_write_ctx ctx; |
u_int i; |
u_int i; |
|
|
screen_write_start(&ctx, wp, NULL); |
screen_write_start_pane(&ctx, wp, NULL); |
for (i = py; i < py + ny; i++) |
for (i = py; i < py + ny; i++) |
window_copy_write_line(wme, &ctx, i); |
window_copy_write_line(wme, &ctx, i); |
screen_write_cursormove(&ctx, data->cx, data->cy, 0); |
screen_write_cursormove(&ctx, data->cx, data->cy, 0); |
|
|
if (data->cx == screen_size_x(s)) |
if (data->cx == screen_size_x(s)) |
window_copy_redraw_lines(wme, data->cy, 1); |
window_copy_redraw_lines(wme, data->cy, 1); |
else { |
else { |
screen_write_start(&ctx, wp, NULL); |
screen_write_start_pane(&ctx, wp, NULL); |
screen_write_cursormove(&ctx, data->cx, data->cy, 0); |
screen_write_cursormove(&ctx, data->cx, data->cy, 0); |
screen_write_stop(&ctx); |
screen_write_stop(&ctx); |
} |
} |
|
|
struct screen_write_ctx ctx; |
struct screen_write_ctx ctx; |
|
|
if (options_get_number(global_options, "set-clipboard") != 0) { |
if (options_get_number(global_options, "set-clipboard") != 0) { |
screen_write_start(&ctx, wp, NULL); |
screen_write_start_pane(&ctx, wp, NULL); |
screen_write_setselection(&ctx, buf, len); |
screen_write_setselection(&ctx, buf, len); |
screen_write_stop(&ctx); |
screen_write_stop(&ctx); |
notify_pane("pane-set-clipboard", wp); |
notify_pane("pane-set-clipboard", wp); |
|
|
return; |
return; |
|
|
if (options_get_number(global_options, "set-clipboard") != 0) { |
if (options_get_number(global_options, "set-clipboard") != 0) { |
screen_write_start(&ctx, wp, NULL); |
screen_write_start_pane(&ctx, wp, NULL); |
screen_write_setselection(&ctx, buf, len); |
screen_write_setselection(&ctx, buf, len); |
screen_write_stop(&ctx); |
screen_write_stop(&ctx); |
notify_pane("pane-set-clipboard", wp); |
notify_pane("pane-set-clipboard", wp); |
|
|
window_copy_search_marks(wme, NULL, data->searchregex); |
window_copy_search_marks(wme, NULL, data->searchregex); |
window_copy_update_selection(wme, 0, 0); |
window_copy_update_selection(wme, 0, 0); |
|
|
screen_write_start(&ctx, wp, NULL); |
screen_write_start_pane(&ctx, wp, NULL); |
screen_write_cursormove(&ctx, 0, 0, 0); |
screen_write_cursormove(&ctx, 0, 0, 0); |
screen_write_deleteline(&ctx, ny, 8); |
screen_write_deleteline(&ctx, ny, 8); |
window_copy_write_lines(wme, &ctx, screen_size_y(s) - ny, ny); |
window_copy_write_lines(wme, &ctx, screen_size_y(s) - ny, ny); |
|
|
window_copy_search_marks(wme, NULL, data->searchregex); |
window_copy_search_marks(wme, NULL, data->searchregex); |
window_copy_update_selection(wme, 0, 0); |
window_copy_update_selection(wme, 0, 0); |
|
|
screen_write_start(&ctx, wp, NULL); |
screen_write_start_pane(&ctx, wp, NULL); |
screen_write_cursormove(&ctx, 0, 0, 0); |
screen_write_cursormove(&ctx, 0, 0, 0); |
screen_write_insertline(&ctx, ny, 8); |
screen_write_insertline(&ctx, ny, 8); |
window_copy_write_lines(wme, &ctx, 0, ny); |
window_copy_write_lines(wme, &ctx, 0, ny); |