Don't require that mouse cursor must be visible before mouse paste.
Paste always happens to current _text_ cursor position independently of mouse cursor position in any case and old variant force user to press mouse paste button _two_ times if mouse cursor is invisible.
This commit is contained in:
parent
d6751ab525
commit
23e967f71e
@ -591,8 +591,7 @@ mouse_cut_extend(scr_stat *scp)
|
||||
void
|
||||
sc_mouse_paste(scr_stat *scp)
|
||||
{
|
||||
if (scp->status & MOUSE_VISIBLE)
|
||||
sc_paste(scp, cut_buffer, strlen(cut_buffer));
|
||||
sc_paste(scp, cut_buffer, strlen(cut_buffer));
|
||||
}
|
||||
|
||||
#endif /* SC_NO_CUTPASTE */
|
||||
|
@ -3068,12 +3068,7 @@ scgetc(sc_softc_t *sc, u_int flags)
|
||||
|
||||
case PASTE:
|
||||
#ifndef SC_NO_CUTPASTE
|
||||
/* XXX need to set MOUSE_VISIBLE flag 'cause sc_mouse_paste() */
|
||||
/* and sc_paste() will not operate without it. */
|
||||
i = scp->status;
|
||||
scp->status |= MOUSE_VISIBLE;
|
||||
sc_mouse_paste(scp);
|
||||
scp->status = i;
|
||||
#endif
|
||||
break;
|
||||
|
||||
@ -3367,14 +3362,12 @@ sc_paste(scr_stat *scp, u_char *p, int count)
|
||||
struct tty *tp;
|
||||
u_char *rmap;
|
||||
|
||||
if (scp->status & MOUSE_VISIBLE) {
|
||||
tp = VIRTUAL_TTY(scp->sc, scp->sc->cur_scp->index);
|
||||
if (!(tp->t_state & TS_ISOPEN))
|
||||
return;
|
||||
rmap = scp->sc->scr_rmap;
|
||||
for (; count > 0; --count)
|
||||
(*linesw[tp->t_line].l_rint)(rmap[*p++], tp);
|
||||
}
|
||||
tp = VIRTUAL_TTY(scp->sc, scp->sc->cur_scp->index);
|
||||
if (!(tp->t_state & TS_ISOPEN))
|
||||
return;
|
||||
rmap = scp->sc->scr_rmap;
|
||||
for (; count > 0; --count)
|
||||
(*linesw[tp->t_line].l_rint)(rmap[*p++], tp);
|
||||
}
|
||||
|
||||
void
|
||||
|
Loading…
Reference in New Issue
Block a user