version 1.254, 2020/03/20 06:09:19 |
version 1.255, 2020/03/20 13:12:04 |
|
|
static void window_copy_cursor_next_word_end_pos(struct window_mode_entry *, |
static void window_copy_cursor_next_word_end_pos(struct window_mode_entry *, |
const char *, u_int *, u_int *); |
const char *, u_int *, u_int *); |
static void window_copy_cursor_next_word_end(struct window_mode_entry *, |
static void window_copy_cursor_next_word_end(struct window_mode_entry *, |
const char *); |
const char *, int); |
static void window_copy_cursor_previous_word_pos(struct window_mode_entry *, |
static void window_copy_cursor_previous_word_pos(struct window_mode_entry *, |
const char *, int, u_int *, u_int *); |
const char *, int, u_int *, u_int *); |
static void window_copy_cursor_previous_word(struct window_mode_entry *, |
static void window_copy_cursor_previous_word(struct window_mode_entry *, |
|
|
tried = 1; |
tried = 1; |
goto retry; |
goto retry; |
} |
} |
window_copy_cursor_next_word_end(wme, "{[( "); |
window_copy_cursor_next_word_end(wme, "{[( ", |
|
0); |
continue; |
continue; |
} |
} |
/* For vi, continue searching for bracket until EOL. */ |
/* For vi, continue searching for bracket until EOL. */ |
|
|
u_int np = wme->prefix; |
u_int np = wme->prefix; |
|
|
for (; np != 0; np--) |
for (; np != 0; np--) |
window_copy_cursor_next_word_end(wme, " "); |
window_copy_cursor_next_word_end(wme, " ", 0); |
return (WINDOW_COPY_CMD_NOTHING); |
return (WINDOW_COPY_CMD_NOTHING); |
} |
} |
|
|
|
|
|
|
ws = options_get_string(s->options, "word-separators"); |
ws = options_get_string(s->options, "word-separators"); |
for (; np != 0; np--) |
for (; np != 0; np--) |
window_copy_cursor_next_word_end(wme, ws); |
window_copy_cursor_next_word_end(wme, ws, 0); |
return (WINDOW_COPY_CMD_NOTHING); |
return (WINDOW_COPY_CMD_NOTHING); |
} |
} |
|
|
|
|
|
|
if (px >= window_copy_find_length(wme, py) || |
if (px >= window_copy_find_length(wme, py) || |
!window_copy_in_set(wme, px + 1, py, data->ws)) |
!window_copy_in_set(wme, px + 1, py, data->ws)) |
window_copy_cursor_next_word_end(wme, data->ws); |
window_copy_cursor_next_word_end(wme, data->ws, 1); |
else { |
else { |
window_copy_update_cursor(wme, px, data->cy); |
window_copy_update_cursor(wme, px, data->cy); |
if (window_copy_update_selection(wme, 1, 0)) |
if (window_copy_update_selection(wme, 1, 1)) |
window_copy_redraw_lines(wme, data->cy, 1); |
window_copy_redraw_lines(wme, data->cy, 1); |
} |
} |
data->endselrx = data->cx; |
data->endselrx = data->cx; |
|
|
|
|
static void |
static void |
window_copy_cursor_next_word_end(struct window_mode_entry *wme, |
window_copy_cursor_next_word_end(struct window_mode_entry *wme, |
const char *separators) |
const char *separators, int no_reset) |
{ |
{ |
struct window_pane *wp = wme->wp; |
struct window_pane *wp = wme->wp; |
struct window_copy_mode_data *data = wme->data; |
struct window_copy_mode_data *data = wme->data; |
|
|
px--; |
px--; |
|
|
window_copy_update_cursor(wme, px, data->cy); |
window_copy_update_cursor(wme, px, data->cy); |
if (window_copy_update_selection(wme, 1, 0)) |
if (window_copy_update_selection(wme, 1, no_reset)) |
window_copy_redraw_lines(wme, data->cy, 1); |
window_copy_redraw_lines(wme, data->cy, 1); |
} |
} |
|
|