version 1.155, 2016/10/11 07:23:34 |
version 1.156, 2016/10/11 09:30:36 |
|
|
void window_copy_scroll_up(struct window_pane *, u_int); |
void window_copy_scroll_up(struct window_pane *, u_int); |
void window_copy_scroll_down(struct window_pane *, u_int); |
void window_copy_scroll_down(struct window_pane *, u_int); |
void window_copy_rectangle_toggle(struct window_pane *); |
void window_copy_rectangle_toggle(struct window_pane *); |
|
void window_copy_move_mouse(struct mouse_event *); |
void window_copy_drag_update(struct client *, struct mouse_event *); |
void window_copy_drag_update(struct client *, struct mouse_event *); |
void window_copy_drag_release(struct client *, struct mouse_event *); |
void window_copy_drag_release(struct client *, struct mouse_event *); |
|
|
|
|
return; |
return; |
command = args->argv[0]; |
command = args->argv[0]; |
|
|
|
if (m != NULL && m->valid) |
|
window_copy_move_mouse(m); |
|
|
if (args->argc == 1) { |
if (args->argc == 1) { |
if (strcmp(command, "append-selection") == 0) { |
if (strcmp(command, "append-selection") == 0) { |
if (s != NULL) |
if (s != NULL) |
|
|
window_copy_cursor_end_of_line(wp); |
window_copy_cursor_end_of_line(wp); |
window_copy_redraw_screen(wp); |
window_copy_redraw_screen(wp); |
} |
} |
if (strcmp(command, "start-of-line") == 0) { |
if (strcmp(command, "select-word") == 0) { |
window_copy_cursor_start_of_line(wp); |
sn->sel.lineflag = LINE_SEL_LEFT_RIGHT; |
|
data->rectflag = 0; |
|
ws = options_get_string(s->options, "word-separators"); |
|
window_copy_cursor_previous_word(wp, ws); |
|
window_copy_start_selection(wp); |
|
window_copy_cursor_next_word_end(wp, ws); |
|
window_copy_redraw_screen(wp); |
} |
} |
|
if (strcmp(command, "start-of-line") == 0) |
|
window_copy_cursor_start_of_line(wp); |
if (strcmp(command, "top-line") == 0) { |
if (strcmp(command, "top-line") == 0) { |
data->cx = 0; |
data->cx = 0; |
data->cy = 0; |
data->cy = 0; |
|
|
|
|
window_copy_update_selection(wp, 1); |
window_copy_update_selection(wp, 1); |
window_copy_redraw_screen(wp); |
window_copy_redraw_screen(wp); |
|
} |
|
|
|
void |
|
window_copy_move_mouse(struct mouse_event *m) |
|
{ |
|
struct window_pane *wp; |
|
u_int x, y; |
|
|
|
wp = cmd_mouse_pane(m, NULL, NULL); |
|
if (wp == NULL || wp->mode != &window_copy_mode) |
|
return; |
|
|
|
if (cmd_mouse_at(wp, m, &x, &y, 1) != 0) |
|
return; |
|
|
|
window_copy_update_cursor(wp, x, y); |
} |
} |
|
|
void |
void |