Skip to content

Commit

Permalink
Merge branch 'obsd-master'
Browse files Browse the repository at this point in the history
  • Loading branch information
ThomasAdam committed Oct 21, 2024
2 parents a269c33 + 354926a commit 914815e
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 2 deletions.
4 changes: 2 additions & 2 deletions options-table.c
Original file line number Diff line number Diff line change
Expand Up @@ -576,7 +576,7 @@ const struct options_table_entry options_table[] = {
.type = OPTIONS_TABLE_NUMBER,
.scope = OPTIONS_TABLE_SESSION,
.minimum = 0,
.maximum = 10000,
.maximum = 2000000,
.default_num = 0,
.unit = "milliseconds",
.text = "Time to wait for a key binding to repeat the first time the "
Expand Down Expand Up @@ -671,7 +671,7 @@ const struct options_table_entry options_table[] = {
.type = OPTIONS_TABLE_NUMBER,
.scope = OPTIONS_TABLE_SESSION,
.minimum = 0,
.maximum = 10000,
.maximum = 2000000,
.default_num = 500,
.unit = "milliseconds",
.text = "Time to wait for a key binding to repeat, if it is bound "
Expand Down
2 changes: 2 additions & 0 deletions tmux.h
Original file line number Diff line number Diff line change
Expand Up @@ -3293,6 +3293,8 @@ void window_copy_pagedown(struct window_pane *, int, int);
void window_copy_start_drag(struct client *, struct mouse_event *);
char *window_copy_get_word(struct window_pane *, u_int, u_int);
char *window_copy_get_line(struct window_pane *, u_int);
int window_copy_get_current_offset(struct window_pane *, u_int *,
u_int *);

/* window-option.c */
extern const struct window_mode window_customize_mode;
Expand Down
17 changes: 17 additions & 0 deletions window-copy.c
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit 914815e

Please sign in to comment.