Fix #111278: UI Text Extension of Selection #111288
|
@ -3237,10 +3237,18 @@ static void ui_textedit_move(uiBut *but,
|
|||
|
||||
if (select) {
|
||||
if (has_sel == false) {
|
||||
data->sel_pos_init = pos_prev;
|
||||
/* Holding shift but with no previous selection. */
|
||||
but->selsta = but->pos;
|
||||
but->selend = pos_prev;
|
||||
}
|
||||
else if (but->selsta == pos_prev) {
|
||||
/* Previous selection, extending start position. */
|
||||
but->selsta = but->pos;
|
||||
}
|
||||
else {
|
||||
/* Previous selection, extending end position. */
|
||||
but->selend = but->pos;
|
||||
}
|
||||
but->selsta = but->pos;
|
||||
but->selend = data->sel_pos_init;
|
||||
}
|
||||
if (but->selend < but->selsta) {
|
||||
std::swap(but->selsta, but->selend);
|
||||
|
|
Loading…
Reference in New Issue