simplify visual block mode selection
This commit is contained in:
parent
7d5229d6c8
commit
711fc059e4
13
termite.c
13
termite.c
|
@ -111,13 +111,12 @@ static void cursor_moved_cb(VteTerminal *vte, select_info *select) {
|
||||||
n_columns - 1, select->begin_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) {
|
||||||
if (begin < end) {
|
vte_terminal_select_text(vte,
|
||||||
vte_terminal_select_text(vte, MIN(select->begin_col, end_col), select->begin_row,
|
MIN(select->begin_col, end_col),
|
||||||
MAX(select->begin_col, end_col), end_row, 0, 0);
|
MIN(select->begin_row, end_row),
|
||||||
} else {
|
MAX(select->begin_col, end_col),
|
||||||
vte_terminal_select_text(vte, MIN(select->begin_col, end_col), end_row,
|
MAX(select->begin_row, end_row),
|
||||||
MAX(select->begin_col, end_col), select->begin_row, 0, 0);
|
0, 0);
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
vte_terminal_copy_primary(vte);
|
vte_terminal_copy_primary(vte);
|
||||||
|
|
Loading…
Reference in New Issue