mirror of
https://github.com/tmux/tmux.git
synced 2026-03-31 16:56:28 +00:00
Refresh copy mode when style changes, from Josh Cooper in GitHub issue 4830.
This commit is contained in:
@@ -51,6 +51,7 @@ static void window_copy_redraw_selection(struct window_mode_entry *, u_int);
|
||||
static void window_copy_redraw_lines(struct window_mode_entry *, u_int,
|
||||
u_int);
|
||||
static void window_copy_redraw_screen(struct window_mode_entry *);
|
||||
static void window_copy_style_changed(struct window_mode_entry *);
|
||||
static void window_copy_write_line(struct window_mode_entry *,
|
||||
struct screen_write_ctx *, u_int);
|
||||
static void window_copy_write_lines(struct window_mode_entry *,
|
||||
@@ -158,6 +159,7 @@ const struct window_mode window_copy_mode = {
|
||||
.init = window_copy_init,
|
||||
.free = window_copy_free,
|
||||
.resize = window_copy_resize,
|
||||
.style_changed = window_copy_style_changed,
|
||||
.key_table = window_copy_key_table,
|
||||
.command = window_copy_command,
|
||||
.formats = window_copy_formats,
|
||||
@@ -170,6 +172,7 @@ const struct window_mode window_view_mode = {
|
||||
.init = window_copy_view_init,
|
||||
.free = window_copy_free,
|
||||
.resize = window_copy_resize,
|
||||
.style_changed = window_copy_style_changed,
|
||||
.key_table = window_copy_key_table,
|
||||
.command = window_copy_command,
|
||||
.formats = window_copy_formats,
|
||||
@@ -4595,6 +4598,16 @@ window_copy_redraw_screen(struct window_mode_entry *wme)
|
||||
window_copy_redraw_lines(wme, 0, screen_size_y(&data->screen));
|
||||
}
|
||||
|
||||
static void
|
||||
window_copy_style_changed(struct window_mode_entry *wme)
|
||||
{
|
||||
struct window_copy_mode_data *data = wme->data;
|
||||
|
||||
if (data->screen.sel != NULL)
|
||||
window_copy_set_selection(wme, 0, 1);
|
||||
window_copy_redraw_screen(wme);
|
||||
}
|
||||
|
||||
static void
|
||||
window_copy_synchronize_cursor_end(struct window_mode_entry *wme, int begin,
|
||||
int no_reset)
|
||||
|
||||
Reference in New Issue
Block a user