add some polish to visual mode switching

* switching between visual modes should not reset the begin row/col
* selection should be updated as soon as the mode is switched
This commit is contained in:
Daniel Micay 2012-07-09 03:19:02 -04:00
parent 131cb20584
commit 458087627d
1 changed files with 5 additions and 2 deletions

View File

@ -139,9 +139,12 @@ static void toggle_visual(VteTerminal *vte, select_info *select, select_mode mod
select->mode = SELECT_ON;
vte_terminal_select_none(vte);
} else {
if (select->mode == SELECT_ON) {
select->begin_col = select->cursor_col;
select->begin_row = select->cursor_row;
}
select->mode = mode;
select->begin_col = select->cursor_col;
select->begin_row = select->cursor_row;
update_selection(vte, select);
}
}