version 1.156, 2016/10/11 09:30:36 |
version 1.157, 2016/10/11 13:21:59 |
|
|
|
|
#include "tmux.h" |
#include "tmux.h" |
|
|
const char *window_copy_key_table(struct window_pane *); |
static const char *window_copy_key_table(struct window_pane *); |
void window_copy_command(struct window_pane *, struct client *, |
static void window_copy_command(struct window_pane *, struct client *, |
struct session *, struct args *, struct mouse_event *); |
struct session *, struct args *, struct mouse_event *); |
struct screen *window_copy_init(struct window_pane *); |
static struct screen *window_copy_init(struct window_pane *); |
void window_copy_free(struct window_pane *); |
static void window_copy_free(struct window_pane *); |
void window_copy_pagedown(struct window_pane *, int); |
static void window_copy_pagedown(struct window_pane *, int); |
void window_copy_next_paragraph(struct window_pane *); |
static void window_copy_next_paragraph(struct window_pane *); |
void window_copy_previous_paragraph(struct window_pane *); |
static void window_copy_previous_paragraph(struct window_pane *); |
void window_copy_resize(struct window_pane *, u_int, u_int); |
static void window_copy_resize(struct window_pane *, u_int, u_int); |
|
|
void window_copy_redraw_selection(struct window_pane *, u_int); |
static void window_copy_redraw_selection(struct window_pane *, u_int); |
void window_copy_redraw_lines(struct window_pane *, u_int, u_int); |
static void window_copy_redraw_lines(struct window_pane *, u_int, u_int); |
void window_copy_redraw_screen(struct window_pane *); |
static void window_copy_redraw_screen(struct window_pane *); |
void window_copy_write_line(struct window_pane *, struct screen_write_ctx *, |
static void window_copy_write_line(struct window_pane *, |
u_int); |
struct screen_write_ctx *, u_int); |
void window_copy_write_lines(struct window_pane *, |
static void window_copy_write_lines(struct window_pane *, |
struct screen_write_ctx *, u_int, u_int); |
struct screen_write_ctx *, u_int, u_int); |
|
|
void window_copy_scroll_to(struct window_pane *, u_int, u_int); |
static void window_copy_scroll_to(struct window_pane *, u_int, u_int); |
int window_copy_search_compare(struct grid *, u_int, u_int, struct grid *, |
static int window_copy_search_compare(struct grid *, u_int, u_int, |
u_int, int); |
struct grid *, u_int, int); |
int window_copy_search_lr(struct grid *, struct grid *, u_int *, u_int, |
static int window_copy_search_lr(struct grid *, struct grid *, u_int *, |
u_int, u_int, int); |
u_int, u_int, u_int, int); |
int window_copy_search_rl(struct grid *, struct grid *, u_int *, u_int, |
static int window_copy_search_rl(struct grid *, struct grid *, u_int *, |
u_int, u_int, int); |
u_int, u_int, u_int, int); |
void window_copy_move_left(struct screen *, u_int *, u_int *); |
static void window_copy_move_left(struct screen *, u_int *, u_int *); |
void window_copy_move_right(struct screen *, u_int *, u_int *); |
static void window_copy_move_right(struct screen *, u_int *, u_int *); |
int window_copy_is_lowercase(const char *); |
static int window_copy_is_lowercase(const char *); |
void window_copy_search_jump(struct window_pane *, struct grid *, |
static void window_copy_search_jump(struct window_pane *, struct grid *, |
struct grid *, u_int, u_int, u_int, int, int, int); |
struct grid *, u_int, u_int, u_int, int, int, int); |
void window_copy_search(struct window_pane *, const char *, int, int); |
static void window_copy_search(struct window_pane *, const char *, int, |
void window_copy_search_up(struct window_pane *, const char *, int); |
int); |
void window_copy_search_down(struct window_pane *, const char *, int); |
static void window_copy_search_up(struct window_pane *, const char *, int); |
void window_copy_goto_line(struct window_pane *, const char *); |
static void window_copy_search_down(struct window_pane *, const char *, |
void window_copy_update_cursor(struct window_pane *, u_int, u_int); |
int); |
void window_copy_start_selection(struct window_pane *); |
static void window_copy_goto_line(struct window_pane *, const char *); |
int window_copy_update_selection(struct window_pane *, int); |
static void window_copy_update_cursor(struct window_pane *, u_int, u_int); |
void *window_copy_get_selection(struct window_pane *, size_t *); |
static void window_copy_start_selection(struct window_pane *); |
void window_copy_copy_buffer(struct window_pane *, const char *, void *, |
static int window_copy_update_selection(struct window_pane *, int); |
size_t); |
static void *window_copy_get_selection(struct window_pane *, size_t *); |
void window_copy_copy_pipe(struct window_pane *, struct session *, |
static void window_copy_copy_buffer(struct window_pane *, const char *, |
const char *, const char *); |
void *, size_t); |
void window_copy_copy_selection(struct window_pane *, const char *); |
static void window_copy_copy_pipe(struct window_pane *, struct session *, |
void window_copy_append_selection(struct window_pane *, const char *); |
const char *, const char *); |
void window_copy_clear_selection(struct window_pane *); |
static void window_copy_copy_selection(struct window_pane *, const char *); |
void window_copy_copy_line(struct window_pane *, char **, size_t *, u_int, |
static void window_copy_append_selection(struct window_pane *, |
u_int, u_int); |
const char *); |
int window_copy_in_set(struct window_pane *, u_int, u_int, const char *); |
static void window_copy_clear_selection(struct window_pane *); |
u_int window_copy_find_length(struct window_pane *, u_int); |
static void window_copy_copy_line(struct window_pane *, char **, size_t *, |
void window_copy_cursor_start_of_line(struct window_pane *); |
u_int, u_int, u_int); |
void window_copy_cursor_back_to_indentation(struct window_pane *); |
static int window_copy_in_set(struct window_pane *, u_int, u_int, |
void window_copy_cursor_end_of_line(struct window_pane *); |
const char *); |
void window_copy_other_end(struct window_pane *); |
static u_int window_copy_find_length(struct window_pane *, u_int); |
void window_copy_cursor_left(struct window_pane *); |
static void window_copy_cursor_start_of_line(struct window_pane *); |
void window_copy_cursor_right(struct window_pane *); |
static void window_copy_cursor_back_to_indentation(struct window_pane *); |
void window_copy_cursor_up(struct window_pane *, int); |
static void window_copy_cursor_end_of_line(struct window_pane *); |
void window_copy_cursor_down(struct window_pane *, int); |
static void window_copy_other_end(struct window_pane *); |
void window_copy_cursor_jump(struct window_pane *); |
static void window_copy_cursor_left(struct window_pane *); |
void window_copy_cursor_jump_back(struct window_pane *); |
static void window_copy_cursor_right(struct window_pane *); |
void window_copy_cursor_jump_to(struct window_pane *, int); |
static void window_copy_cursor_up(struct window_pane *, int); |
void window_copy_cursor_jump_to_back(struct window_pane *, int); |
static void window_copy_cursor_down(struct window_pane *, int); |
void window_copy_cursor_next_word(struct window_pane *, const char *); |
static void window_copy_cursor_jump(struct window_pane *); |
void window_copy_cursor_next_word_end(struct window_pane *, const char *); |
static void window_copy_cursor_jump_back(struct window_pane *); |
void window_copy_cursor_previous_word(struct window_pane *, const char *); |
static void window_copy_cursor_jump_to(struct window_pane *, int); |
void window_copy_scroll_up(struct window_pane *, u_int); |
static void window_copy_cursor_jump_to_back(struct window_pane *, int); |
void window_copy_scroll_down(struct window_pane *, u_int); |
static void window_copy_cursor_next_word(struct window_pane *, |
void window_copy_rectangle_toggle(struct window_pane *); |
const char *); |
void window_copy_move_mouse(struct mouse_event *); |
static void window_copy_cursor_next_word_end(struct window_pane *, |
void window_copy_drag_update(struct client *, struct mouse_event *); |
const char *); |
void window_copy_drag_release(struct client *, struct mouse_event *); |
static void window_copy_cursor_previous_word(struct window_pane *, |
|
const char *); |
|
static void window_copy_scroll_up(struct window_pane *, u_int); |
|
static void window_copy_scroll_down(struct window_pane *, u_int); |
|
static void window_copy_rectangle_toggle(struct window_pane *); |
|
static void window_copy_move_mouse(struct mouse_event *); |
|
static void window_copy_drag_update(struct client *, struct mouse_event *); |
|
|
const struct window_mode window_copy_mode = { |
const struct window_mode window_copy_mode = { |
.init = window_copy_init, |
.init = window_copy_init, |
|
|
char jumpchar; |
char jumpchar; |
}; |
}; |
|
|
struct screen * |
static struct screen * |
window_copy_init(struct window_pane *wp) |
window_copy_init(struct window_pane *wp) |
{ |
{ |
struct window_copy_mode_data *data; |
struct window_copy_mode_data *data; |
|
|
screen_size_y(&wp->base), UINT_MAX); |
screen_size_y(&wp->base), UINT_MAX); |
} |
} |
|
|
void |
static void |
window_copy_free(struct window_pane *wp) |
window_copy_free(struct window_pane *wp) |
{ |
{ |
struct window_copy_mode_data *data = wp->modedata; |
struct window_copy_mode_data *data = wp->modedata; |
|
|
window_copy_redraw_screen(wp); |
window_copy_redraw_screen(wp); |
} |
} |
|
|
void |
static void |
window_copy_pagedown(struct window_pane *wp, int half_page) |
window_copy_pagedown(struct window_pane *wp, int half_page) |
{ |
{ |
struct window_copy_mode_data *data = wp->modedata; |
struct window_copy_mode_data *data = wp->modedata; |
|
|
window_copy_redraw_screen(wp); |
window_copy_redraw_screen(wp); |
} |
} |
|
|
void |
static void |
window_copy_previous_paragraph(struct window_pane *wp) |
window_copy_previous_paragraph(struct window_pane *wp) |
{ |
{ |
struct window_copy_mode_data *data = wp->modedata; |
struct window_copy_mode_data *data = wp->modedata; |
|
|
window_copy_scroll_to(wp, 0, oy); |
window_copy_scroll_to(wp, 0, oy); |
} |
} |
|
|
void |
static void |
window_copy_next_paragraph(struct window_pane *wp) |
window_copy_next_paragraph(struct window_pane *wp) |
{ |
{ |
struct window_copy_mode_data *data = wp->modedata; |
struct window_copy_mode_data *data = wp->modedata; |
|
|
window_copy_scroll_to(wp, ox, oy); |
window_copy_scroll_to(wp, ox, oy); |
} |
} |
|
|
void |
static void |
window_copy_resize(struct window_pane *wp, u_int sx, u_int sy) |
window_copy_resize(struct window_pane *wp, u_int sx, u_int sy) |
{ |
{ |
struct window_copy_mode_data *data = wp->modedata; |
struct window_copy_mode_data *data = wp->modedata; |
|
|
window_copy_redraw_screen(wp); |
window_copy_redraw_screen(wp); |
} |
} |
|
|
const char * |
static const char * |
window_copy_key_table(struct window_pane *wp) |
window_copy_key_table(struct window_pane *wp) |
{ |
{ |
if (options_get_number(wp->window->options, "mode-keys") == MODEKEY_VI) |
if (options_get_number(wp->window->options, "mode-keys") == MODEKEY_VI) |
|
|
return ("copy-mode"); |
return ("copy-mode"); |
} |
} |
|
|
void |
static void |
window_copy_command(struct window_pane *wp, struct client *c, struct session *s, |
window_copy_command(struct window_pane *wp, struct client *c, struct session *s, |
struct args *args, struct mouse_event *m) |
struct args *args, struct mouse_event *m) |
{ |
{ |
|
|
wp->modeprefix = 1; |
wp->modeprefix = 1; |
} |
} |
|
|
void |
static void |
window_copy_scroll_to(struct window_pane *wp, u_int px, u_int py) |
window_copy_scroll_to(struct window_pane *wp, u_int px, u_int py) |
{ |
{ |
struct window_copy_mode_data *data = wp->modedata; |
struct window_copy_mode_data *data = wp->modedata; |
|
|
window_copy_redraw_screen(wp); |
window_copy_redraw_screen(wp); |
} |
} |
|
|
int |
static int |
window_copy_search_compare(struct grid *gd, u_int px, u_int py, |
window_copy_search_compare(struct grid *gd, u_int px, u_int py, |
struct grid *sgd, u_int spx, int cis) |
struct grid *sgd, u_int spx, int cis) |
{ |
{ |
|
|
return (memcmp(ud->data, sud->data, ud->size) == 0); |
return (memcmp(ud->data, sud->data, ud->size) == 0); |
} |
} |
|
|
int |
static int |
window_copy_search_lr(struct grid *gd, |
window_copy_search_lr(struct grid *gd, |
struct grid *sgd, u_int *ppx, u_int py, u_int first, u_int last, int cis) |
struct grid *sgd, u_int *ppx, u_int py, u_int first, u_int last, int cis) |
{ |
{ |
|
|
return (0); |
return (0); |
} |
} |
|
|
int |
static int |
window_copy_search_rl(struct grid *gd, |
window_copy_search_rl(struct grid *gd, |
struct grid *sgd, u_int *ppx, u_int py, u_int first, u_int last, int cis) |
struct grid *sgd, u_int *ppx, u_int py, u_int first, u_int last, int cis) |
{ |
{ |
|
|
return (0); |
return (0); |
} |
} |
|
|
void |
static void |
window_copy_move_left(struct screen *s, u_int *fx, u_int *fy) |
window_copy_move_left(struct screen *s, u_int *fx, u_int *fy) |
{ |
{ |
if (*fx == 0) { /* left */ |
if (*fx == 0) { /* left */ |
|
|
*fx = *fx - 1; |
*fx = *fx - 1; |
} |
} |
|
|
void |
static void |
window_copy_move_right(struct screen *s, u_int *fx, u_int *fy) |
window_copy_move_right(struct screen *s, u_int *fx, u_int *fy) |
{ |
{ |
if (*fx == screen_size_x(s) - 1) { /* right */ |
if (*fx == screen_size_x(s) - 1) { /* right */ |
|
|
*fx = *fx + 1; |
*fx = *fx + 1; |
} |
} |
|
|
int |
static int |
window_copy_is_lowercase(const char *ptr) |
window_copy_is_lowercase(const char *ptr) |
{ |
{ |
while (*ptr != '\0') { |
while (*ptr != '\0') { |
|
|
* up, down otherwise. If wrap then go to begin/end of grid and try again if |
* up, down otherwise. If wrap then go to begin/end of grid and try again if |
* not found. |
* not found. |
*/ |
*/ |
void |
static void |
window_copy_search_jump(struct window_pane *wp, struct grid *gd, |
window_copy_search_jump(struct window_pane *wp, struct grid *gd, |
struct grid *sgd, u_int fx, u_int fy, u_int endline, int cis, int wrap, |
struct grid *sgd, u_int fx, u_int fy, u_int endline, int cis, int wrap, |
int direction) |
int direction) |
|
|
* down. If moveflag is 0 then look for string at the current cursor position |
* down. If moveflag is 0 then look for string at the current cursor position |
* as well. |
* as well. |
*/ |
*/ |
void |
static void |
window_copy_search(struct window_pane *wp, const char *searchstr, int direction, |
window_copy_search(struct window_pane *wp, const char *searchstr, int direction, |
int moveflag) |
int moveflag) |
{ |
{ |
|
|
screen_free(&ss); |
screen_free(&ss); |
} |
} |
|
|
void |
static void |
window_copy_search_up(struct window_pane *wp, const char *searchstr, |
window_copy_search_up(struct window_pane *wp, const char *searchstr, |
int moveflag) |
int moveflag) |
{ |
{ |
window_copy_search(wp, searchstr, 0, moveflag); |
window_copy_search(wp, searchstr, 0, moveflag); |
} |
} |
|
|
void |
static void |
window_copy_search_down(struct window_pane *wp, const char *searchstr, |
window_copy_search_down(struct window_pane *wp, const char *searchstr, |
int moveflag) |
int moveflag) |
{ |
{ |
window_copy_search(wp, searchstr, 1, moveflag); |
window_copy_search(wp, searchstr, 1, moveflag); |
} |
} |
|
|
void |
static void |
window_copy_goto_line(struct window_pane *wp, const char *linestr) |
window_copy_goto_line(struct window_pane *wp, const char *linestr) |
{ |
{ |
struct window_copy_mode_data *data = wp->modedata; |
struct window_copy_mode_data *data = wp->modedata; |
|
|
window_copy_redraw_screen(wp); |
window_copy_redraw_screen(wp); |
} |
} |
|
|
void |
static void |
window_copy_write_line(struct window_pane *wp, struct screen_write_ctx *ctx, |
window_copy_write_line(struct window_pane *wp, struct screen_write_ctx *ctx, |
u_int py) |
u_int py) |
{ |
{ |
|
|
} |
} |
} |
} |
|
|
void |
static void |
window_copy_write_lines(struct window_pane *wp, struct screen_write_ctx *ctx, |
window_copy_write_lines(struct window_pane *wp, struct screen_write_ctx *ctx, |
u_int py, u_int ny) |
u_int py, u_int ny) |
{ |
{ |
|
|
window_copy_write_line(wp, ctx, py); |
window_copy_write_line(wp, ctx, py); |
} |
} |
|
|
void |
static void |
window_copy_redraw_selection(struct window_pane *wp, u_int old_y) |
window_copy_redraw_selection(struct window_pane *wp, u_int old_y) |
{ |
{ |
struct window_copy_mode_data *data = wp->modedata; |
struct window_copy_mode_data *data = wp->modedata; |
|
|
window_copy_redraw_lines(wp, start, end - start + 1); |
window_copy_redraw_lines(wp, start, end - start + 1); |
} |
} |
|
|
void |
static void |
window_copy_redraw_lines(struct window_pane *wp, u_int py, u_int ny) |
window_copy_redraw_lines(struct window_pane *wp, u_int py, u_int ny) |
{ |
{ |
struct window_copy_mode_data *data = wp->modedata; |
struct window_copy_mode_data *data = wp->modedata; |
|
|
screen_write_stop(&ctx); |
screen_write_stop(&ctx); |
} |
} |
|
|
void |
static void |
window_copy_redraw_screen(struct window_pane *wp) |
window_copy_redraw_screen(struct window_pane *wp) |
{ |
{ |
struct window_copy_mode_data *data = wp->modedata; |
struct window_copy_mode_data *data = wp->modedata; |
|
|
window_copy_redraw_lines(wp, 0, screen_size_y(&data->screen)); |
window_copy_redraw_lines(wp, 0, screen_size_y(&data->screen)); |
} |
} |
|
|
void |
static void |
window_copy_update_cursor(struct window_pane *wp, u_int cx, u_int cy) |
window_copy_update_cursor(struct window_pane *wp, u_int cx, u_int cy) |
{ |
{ |
struct window_copy_mode_data *data = wp->modedata; |
struct window_copy_mode_data *data = wp->modedata; |
|
|
} |
} |
} |
} |
|
|
void |
static void |
window_copy_start_selection(struct window_pane *wp) |
window_copy_start_selection(struct window_pane *wp) |
{ |
{ |
struct window_copy_mode_data *data = wp->modedata; |
struct window_copy_mode_data *data = wp->modedata; |
|
|
window_copy_update_selection(wp, 1); |
window_copy_update_selection(wp, 1); |
} |
} |
|
|
int |
static int |
window_copy_update_selection(struct window_pane *wp, int may_redraw) |
window_copy_update_selection(struct window_pane *wp, int may_redraw) |
{ |
{ |
struct window_copy_mode_data *data = wp->modedata; |
struct window_copy_mode_data *data = wp->modedata; |
|
|
return (1); |
return (1); |
} |
} |
|
|
void * |
static void * |
window_copy_get_selection(struct window_pane *wp, size_t *len) |
window_copy_get_selection(struct window_pane *wp, size_t *len) |
{ |
{ |
struct window_copy_mode_data *data = wp->modedata; |
struct window_copy_mode_data *data = wp->modedata; |
|
|
return (buf); |
return (buf); |
} |
} |
|
|
void |
static void |
window_copy_copy_buffer(struct window_pane *wp, const char *bufname, void *buf, |
window_copy_copy_buffer(struct window_pane *wp, const char *bufname, void *buf, |
size_t len) |
size_t len) |
{ |
{ |
|
|
free(buf); |
free(buf); |
} |
} |
|
|
void |
static void |
window_copy_copy_pipe(struct window_pane *wp, struct session *sess, |
window_copy_copy_pipe(struct window_pane *wp, struct session *sess, |
const char *bufname, const char *arg) |
const char *bufname, const char *arg) |
{ |
{ |
|
|
window_copy_copy_buffer(wp, bufname, buf, len); |
window_copy_copy_buffer(wp, bufname, buf, len); |
} |
} |
|
|
void |
static void |
window_copy_copy_selection(struct window_pane *wp, const char *bufname) |
window_copy_copy_selection(struct window_pane *wp, const char *bufname) |
{ |
{ |
void *buf; |
void *buf; |
|
|
window_copy_copy_buffer(wp, bufname, buf, len); |
window_copy_copy_buffer(wp, bufname, buf, len); |
} |
} |
|
|
void |
static void |
window_copy_append_selection(struct window_pane *wp, const char *bufname) |
window_copy_append_selection(struct window_pane *wp, const char *bufname) |
{ |
{ |
char *buf; |
char *buf; |
|
|
free(buf); |
free(buf); |
} |
} |
|
|
void |
static void |
window_copy_copy_line(struct window_pane *wp, char **buf, size_t *off, u_int sy, |
window_copy_copy_line(struct window_pane *wp, char **buf, size_t *off, u_int sy, |
u_int sx, u_int ex) |
u_int sx, u_int ex) |
{ |
{ |
|
|
} |
} |
} |
} |
|
|
void |
static void |
window_copy_clear_selection(struct window_pane *wp) |
window_copy_clear_selection(struct window_pane *wp) |
{ |
{ |
struct window_copy_mode_data *data = wp->modedata; |
struct window_copy_mode_data *data = wp->modedata; |
|
|
window_copy_update_cursor(wp, px, data->cy); |
window_copy_update_cursor(wp, px, data->cy); |
} |
} |
|
|
int |
static int |
window_copy_in_set(struct window_pane *wp, u_int px, u_int py, const char *set) |
window_copy_in_set(struct window_pane *wp, u_int px, u_int py, const char *set) |
{ |
{ |
struct window_copy_mode_data *data = wp->modedata; |
struct window_copy_mode_data *data = wp->modedata; |
|
|
return (strchr(set, *ud->data) != NULL); |
return (strchr(set, *ud->data) != NULL); |
} |
} |
|
|
u_int |
static u_int |
window_copy_find_length(struct window_pane *wp, u_int py) |
window_copy_find_length(struct window_pane *wp, u_int py) |
{ |
{ |
struct window_copy_mode_data *data = wp->modedata; |
struct window_copy_mode_data *data = wp->modedata; |
|
|
return (px); |
return (px); |
} |
} |
|
|
void |
static void |
window_copy_cursor_start_of_line(struct window_pane *wp) |
window_copy_cursor_start_of_line(struct window_pane *wp) |
{ |
{ |
struct window_copy_mode_data *data = wp->modedata; |
struct window_copy_mode_data *data = wp->modedata; |
|
|
window_copy_redraw_lines(wp, data->cy, 1); |
window_copy_redraw_lines(wp, data->cy, 1); |
} |
} |
|
|
void |
static void |
window_copy_cursor_back_to_indentation(struct window_pane *wp) |
window_copy_cursor_back_to_indentation(struct window_pane *wp) |
{ |
{ |
struct window_copy_mode_data *data = wp->modedata; |
struct window_copy_mode_data *data = wp->modedata; |
|
|
window_copy_redraw_lines(wp, data->cy, 1); |
window_copy_redraw_lines(wp, data->cy, 1); |
} |
} |
|
|
void |
static void |
window_copy_cursor_end_of_line(struct window_pane *wp) |
window_copy_cursor_end_of_line(struct window_pane *wp) |
{ |
{ |
struct window_copy_mode_data *data = wp->modedata; |
struct window_copy_mode_data *data = wp->modedata; |
|
|
window_copy_redraw_lines(wp, data->cy, 1); |
window_copy_redraw_lines(wp, data->cy, 1); |
} |
} |
|
|
void |
static void |
window_copy_other_end(struct window_pane *wp) |
window_copy_other_end(struct window_pane *wp) |
{ |
{ |
struct window_copy_mode_data *data = wp->modedata; |
struct window_copy_mode_data *data = wp->modedata; |
|
|
window_copy_redraw_screen(wp); |
window_copy_redraw_screen(wp); |
} |
} |
|
|
void |
static void |
window_copy_cursor_left(struct window_pane *wp) |
window_copy_cursor_left(struct window_pane *wp) |
{ |
{ |
struct window_copy_mode_data *data = wp->modedata; |
struct window_copy_mode_data *data = wp->modedata; |
|
|
} |
} |
} |
} |
|
|
void |
static void |
window_copy_cursor_right(struct window_pane *wp) |
window_copy_cursor_right(struct window_pane *wp) |
{ |
{ |
struct window_copy_mode_data *data = wp->modedata; |
struct window_copy_mode_data *data = wp->modedata; |
|
|
} |
} |
} |
} |
|
|
void |
static void |
window_copy_cursor_up(struct window_pane *wp, int scroll_only) |
window_copy_cursor_up(struct window_pane *wp, int scroll_only) |
{ |
{ |
struct window_copy_mode_data *data = wp->modedata; |
struct window_copy_mode_data *data = wp->modedata; |
|
|
window_copy_cursor_start_of_line(wp); |
window_copy_cursor_start_of_line(wp); |
} |
} |
|
|
void |
static void |
window_copy_cursor_down(struct window_pane *wp, int scroll_only) |
window_copy_cursor_down(struct window_pane *wp, int scroll_only) |
{ |
{ |
struct window_copy_mode_data *data = wp->modedata; |
struct window_copy_mode_data *data = wp->modedata; |
|
|
window_copy_cursor_start_of_line(wp); |
window_copy_cursor_start_of_line(wp); |
} |
} |
|
|
void |
static void |
window_copy_cursor_jump(struct window_pane *wp) |
window_copy_cursor_jump(struct window_pane *wp) |
{ |
{ |
struct window_copy_mode_data *data = wp->modedata; |
struct window_copy_mode_data *data = wp->modedata; |
|
|
} |
} |
} |
} |
|
|
void |
static void |
window_copy_cursor_jump_back(struct window_pane *wp) |
window_copy_cursor_jump_back(struct window_pane *wp) |
{ |
{ |
struct window_copy_mode_data *data = wp->modedata; |
struct window_copy_mode_data *data = wp->modedata; |
|
|
} |
} |
} |
} |
|
|
void |
static void |
window_copy_cursor_jump_to(struct window_pane *wp, int jump_again) |
window_copy_cursor_jump_to(struct window_pane *wp, int jump_again) |
{ |
{ |
struct window_copy_mode_data *data = wp->modedata; |
struct window_copy_mode_data *data = wp->modedata; |
|
|
} |
} |
} |
} |
|
|
void |
static void |
window_copy_cursor_jump_to_back(struct window_pane *wp, int jump_again) |
window_copy_cursor_jump_to_back(struct window_pane *wp, int jump_again) |
{ |
{ |
struct window_copy_mode_data *data = wp->modedata; |
struct window_copy_mode_data *data = wp->modedata; |
|
|
} |
} |
} |
} |
|
|
void |
static void |
window_copy_cursor_next_word(struct window_pane *wp, const char *separators) |
window_copy_cursor_next_word(struct window_pane *wp, const char *separators) |
{ |
{ |
struct window_copy_mode_data *data = wp->modedata; |
struct window_copy_mode_data *data = wp->modedata; |
|
|
window_copy_redraw_lines(wp, data->cy, 1); |
window_copy_redraw_lines(wp, data->cy, 1); |
} |
} |
|
|
void |
static void |
window_copy_cursor_next_word_end(struct window_pane *wp, |
window_copy_cursor_next_word_end(struct window_pane *wp, |
const char *separators) |
const char *separators) |
{ |
{ |
|
|
} |
} |
|
|
/* Move to the previous place where a word begins. */ |
/* Move to the previous place where a word begins. */ |
void |
static void |
window_copy_cursor_previous_word(struct window_pane *wp, |
window_copy_cursor_previous_word(struct window_pane *wp, |
const char *separators) |
const char *separators) |
{ |
{ |
|
|
window_copy_redraw_lines(wp, data->cy, 1); |
window_copy_redraw_lines(wp, data->cy, 1); |
} |
} |
|
|
void |
static void |
window_copy_scroll_up(struct window_pane *wp, u_int ny) |
window_copy_scroll_up(struct window_pane *wp, u_int ny) |
{ |
{ |
struct window_copy_mode_data *data = wp->modedata; |
struct window_copy_mode_data *data = wp->modedata; |
|
|
screen_write_stop(&ctx); |
screen_write_stop(&ctx); |
} |
} |
|
|
void |
static void |
window_copy_scroll_down(struct window_pane *wp, u_int ny) |
window_copy_scroll_down(struct window_pane *wp, u_int ny) |
{ |
{ |
struct window_copy_mode_data *data = wp->modedata; |
struct window_copy_mode_data *data = wp->modedata; |
|
|
return (data->oy); |
return (data->oy); |
} |
} |
|
|
void |
static void |
window_copy_rectangle_toggle(struct window_pane *wp) |
window_copy_rectangle_toggle(struct window_pane *wp) |
{ |
{ |
struct window_copy_mode_data *data = wp->modedata; |
struct window_copy_mode_data *data = wp->modedata; |
|
|
window_copy_redraw_screen(wp); |
window_copy_redraw_screen(wp); |
} |
} |
|
|
void |
static void |
window_copy_move_mouse(struct mouse_event *m) |
window_copy_move_mouse(struct mouse_event *m) |
{ |
{ |
struct window_pane *wp; |
struct window_pane *wp; |
|
|
window_copy_redraw_screen(wp); |
window_copy_redraw_screen(wp); |
} |
} |
|
|
void |
static void |
window_copy_drag_update(__unused struct client *c, struct mouse_event *m) |
window_copy_drag_update(__unused struct client *c, struct mouse_event *m) |
{ |
{ |
struct window_pane *wp; |
struct window_pane *wp; |