reduce scope of begin/end to normal visual mode
This commit is contained in:
parent
1a21165a48
commit
5045c6beb0
|
@ -89,12 +89,11 @@ static void cursor_moved_cb(VteTerminal *vte, select_info *select) {
|
||||||
|
|
||||||
long n_columns = vte_terminal_get_column_count(vte);
|
long n_columns = vte_terminal_get_column_count(vte);
|
||||||
|
|
||||||
long begin = select->begin_row * n_columns + select->begin_col;
|
|
||||||
long end = end_row * n_columns + end_col;
|
|
||||||
|
|
||||||
vte_terminal_set_selection_block_mode(vte, select->mode == SELECT_VISUAL_BLOCK);
|
vte_terminal_set_selection_block_mode(vte, select->mode == SELECT_VISUAL_BLOCK);
|
||||||
|
|
||||||
if (select->mode == SELECT_VISUAL) {
|
if (select->mode == SELECT_VISUAL) {
|
||||||
|
long begin = select->begin_row * n_columns + select->begin_col;
|
||||||
|
long end = end_row * n_columns + end_col;
|
||||||
if (begin < end) {
|
if (begin < end) {
|
||||||
vte_terminal_select_text(vte, select->begin_col, select->begin_row,
|
vte_terminal_select_text(vte, select->begin_col, select->begin_row,
|
||||||
end_col, end_row, 0, 0);
|
end_col, end_row, 0, 0);
|
||||||
|
|
Loading…
Reference in New Issue