version 1.310, 2021/01/08 08:22:10 |
version 1.311, 2021/01/18 11:14:24 |
|
|
struct window_copy_mode_data *data = wme->data; |
struct window_copy_mode_data *data = wme->data; |
u_int xx, yy; |
u_int xx, yy; |
|
|
|
xx = data->cx; |
yy = screen_hsize(data->backing) + data->cy - data->oy; |
yy = screen_hsize(data->backing) + data->cy - data->oy; |
switch (data->selflag) { |
switch (data->selflag) { |
case SEL_WORD: |
case SEL_WORD: |
xx = data->cx; |
|
if (no_reset) |
if (no_reset) |
break; |
break; |
begin = 0; |
begin = 0; |
|
|
} |
} |
break; |
break; |
case SEL_LINE: |
case SEL_LINE: |
if (no_reset) { |
if (no_reset) |
xx = data->cx; |
|
break; |
break; |
} |
|
begin = 0; |
begin = 0; |
if (data->dy > yy) { |
if (data->dy > yy) { |
/* Right to left selection. */ |
/* Right to left selection. */ |
|
|
} |
} |
break; |
break; |
case SEL_CHAR: |
case SEL_CHAR: |
xx = data->cx; |
|
break; |
break; |
} |
} |
if (begin) { |
if (begin) { |
|
|
if (x < data->selrx || x > data->endselrx || yg != data->selry) |
if (x < data->selrx || x > data->endselrx || yg != data->selry) |
data->selflag = SEL_CHAR; |
data->selflag = SEL_CHAR; |
switch (data->selflag) { |
switch (data->selflag) { |
case SEL_WORD: |
case SEL_WORD: |
if (data->ws != NULL) { |
if (data->ws != NULL) { |
window_copy_update_cursor(wme, x, y); |
|
window_copy_cursor_previous_word_pos(wme, |
|
data->ws, 0, &x, &y); |
|
y -= screen_hsize(data->backing) - data->oy; |
|
} |
|
window_copy_update_cursor(wme, x, y); |
window_copy_update_cursor(wme, x, y); |
break; |
window_copy_cursor_previous_word_pos(wme, data->ws, 0, |
case SEL_LINE: |
&x, &y); |
window_copy_update_cursor(wme, 0, y); |
y -= screen_hsize(data->backing) - data->oy; |
break; |
} |
case SEL_CHAR: |
window_copy_update_cursor(wme, x, y); |
window_copy_update_cursor(wme, x, y); |
break; |
window_copy_start_selection(wme); |
case SEL_LINE: |
break; |
window_copy_update_cursor(wme, 0, y); |
|
break; |
|
case SEL_CHAR: |
|
window_copy_update_cursor(wme, x, y); |
|
window_copy_start_selection(wme); |
|
break; |
} |
} |
|
|
window_copy_redraw_screen(wme); |
window_copy_redraw_screen(wme); |