UI: Console Text Operations #108626
|
@ -218,7 +218,11 @@ static int console_textview_main__internal(SpaceConsole *sc,
|
||||||
console_textview_draw_rect_calc(region, &tvc.draw_rect, &tvc.draw_rect_outer);
|
console_textview_draw_rect_calc(region, &tvc.draw_rect, &tvc.draw_rect_outer);
|
||||||
|
|
||||||
/* Nudge right by half a column or so to break selection mid-character. */
|
/* Nudge right by half a column or so to break selection mid-character. */
|
||||||
const int m_pos[2] = {mval[0] + (tvc.lheight / 4), mval[1]};
|
int m_pos[2] = {mval[0], mval[1]};
|
||||||
|
/* Mouse position is initialized with max int. */
|
||||||
|
if (m_pos[0] != INT_MAX) {
|
||||||
|
m_pos[0] += tvc.lheight / 4;
|
||||||
|
}
|
||||||
|
|
||||||
console_scrollback_prompt_begin(sc, &cl_dummy);
|
console_scrollback_prompt_begin(sc, &cl_dummy);
|
||||||
ret = textview_draw(&tvc, do_draw, m_pos, r_mval_pick_item, r_mval_pick_offset);
|
ret = textview_draw(&tvc, do_draw, m_pos, r_mval_pick_item, r_mval_pick_offset);
|
||||||
|
|
|
@ -107,6 +107,10 @@ static int console_delete_editable_selection(SpaceConsole *sc)
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (sc->sel_start < 0) {
|
||||||
|
sc->sel_start = 0;
|
||||||
|
}
|
||||||
|
|
||||||
ConsoleLine *cl = static_cast<ConsoleLine *>(sc->history.last);
|
ConsoleLine *cl = static_cast<ConsoleLine *>(sc->history.last);
|
||||||
if (!cl || sc->sel_start > cl->len) {
|
if (!cl || sc->sel_start > cl->len) {
|
||||||
sc->sel_start = sc->sel_end;
|
sc->sel_start = sc->sel_end;
|
||||||
|
|
Loading…
Reference in New Issue