mirror of
https://github.com/tmux/tmux.git
synced 2025-09-01 20:57:00 +00:00
Add function to get current offset from copy mode, from Michael Grant.
This commit is contained in:
@ -4188,6 +4188,23 @@ window_copy_write_one(struct window_mode_entry *wme,
|
||||
}
|
||||
}
|
||||
|
||||
int
|
||||
window_copy_get_current_offset(struct window_pane *wp, u_int *offset,
|
||||
u_int *size)
|
||||
{
|
||||
struct window_mode_entry *wme = TAILQ_FIRST(&wp->modes);
|
||||
struct window_copy_mode_data *data = wme->data;
|
||||
u_int hsize;
|
||||
|
||||
if (data == NULL)
|
||||
return (0);
|
||||
hsize = screen_hsize(data->backing);
|
||||
|
||||
*offset = hsize - data->oy;
|
||||
*size = hsize;
|
||||
return (1);
|
||||
}
|
||||
|
||||
static void
|
||||
window_copy_write_line(struct window_mode_entry *wme,
|
||||
struct screen_write_ctx *ctx, u_int py)
|
||||
|
Reference in New Issue
Block a user