simplify visual line mode selection
This commit is contained in:
parent
711fc059e4
commit
1a21165a48
12
termite.c
12
termite.c
|
@ -103,13 +103,11 @@ static void cursor_moved_cb(VteTerminal *vte, select_info *select) {
|
||||||
select->begin_col, select->begin_row, 0, 0);
|
select->begin_col, select->begin_row, 0, 0);
|
||||||
}
|
}
|
||||||
} else if (select->mode == SELECT_VISUAL_LINE) {
|
} else if (select->mode == SELECT_VISUAL_LINE) {
|
||||||
if (begin < end) {
|
vte_terminal_select_text(vte, 0,
|
||||||
vte_terminal_select_text(vte, 0, select->begin_row,
|
MIN(select->begin_row, end_row),
|
||||||
n_columns - 1, end_row, 0, 0);
|
n_columns - 1,
|
||||||
} else {
|
MAX(select->begin_row, end_row),
|
||||||
vte_terminal_select_text(vte, 0, end_row,
|
0, 0);
|
||||||
n_columns - 1, select->begin_row, 0, 0);
|
|
||||||
}
|
|
||||||
} else if (select->mode == SELECT_VISUAL_BLOCK) {
|
} else if (select->mode == SELECT_VISUAL_BLOCK) {
|
||||||
vte_terminal_select_text(vte,
|
vte_terminal_select_text(vte,
|
||||||
MIN(select->begin_col, end_col),
|
MIN(select->begin_col, end_col),
|
||||||
|
|
Loading…
Reference in New Issue