terminology: Move mouse_rep out of state

Seems it shouldn't be swapped vim does:
mouse_rep = on
swap
mouse_rep = off
swap

which breaks mouse usage after using vim

SVN revision: 73137
This commit is contained in:
Sebastian Dransfeld 2012-07-02 08:58:49 +00:00
parent d2c099699a
commit 5ecbbb7f23
3 changed files with 16 additions and 16 deletions

View File

@ -826,8 +826,8 @@ _rep_mouse_down(Evas_Object *obj, Evas_Event_Mouse_Down *ev, int cx, int cy)
sd = evas_object_smart_data_get(obj);
if (!sd) return;
if (sd->pty->state.mouse_rep == MOUSE_OFF) return;
switch (sd->pty->state.mouse_rep)
if (sd->pty->mouse_rep == MOUSE_OFF) return;
switch (sd->pty->mouse_rep)
{
case MOUSE_X10:
if ((cx < (0xff - ' ')) && (cy < (0xff - ' ')))
@ -927,8 +927,8 @@ _rep_mouse_up(Evas_Object *obj, Evas_Event_Mouse_Up *ev, int cx, int cy)
sd = evas_object_smart_data_get(obj);
if (!sd) return;
if (sd->pty->state.mouse_rep == MOUSE_OFF) return;
switch (sd->pty->state.mouse_rep)
if (sd->pty->mouse_rep == MOUSE_OFF) return;
switch (sd->pty->mouse_rep)
{
case MOUSE_UTF8: // ESC.[.M.BTN/FLGS.UTF8.YUTF8
{
@ -1005,7 +1005,7 @@ _rep_mouse_move(Evas_Object *obj, Evas_Event_Mouse_Move *ev __UNUSED__, int cx _
sd = evas_object_smart_data_get(obj);
if (!sd) return;
if (sd->pty->state.mouse_rep == MOUSE_OFF) return;
if (sd->pty->mouse_rep == MOUSE_OFF) return;
// not sure what to d here right now so do nothing.
}

View File

@ -1190,8 +1190,8 @@ _handle_esc_csi(Termpty *ty, const Eina_Unicode *c, Eina_Unicode *ce)
break;
case 9:
handled = 1;
if (mode) ty->state.mouse_rep = MOUSE_X10;
else ty->state.mouse_rep = MOUSE_OFF;
if (mode) ty->mouse_rep = MOUSE_X10;
else ty->mouse_rep = MOUSE_OFF;
break;
case 12: // ignore
handled = 1;
@ -1244,8 +1244,8 @@ _handle_esc_csi(Termpty *ty, const Eina_Unicode *c, Eina_Unicode *ce)
break;
case 1000:
handled = 1;
if (mode) ty->state.mouse_rep = MOUSE_NORMAL;
else ty->state.mouse_rep = MOUSE_OFF;
if (mode) ty->mouse_rep = MOUSE_NORMAL;
else ty->mouse_rep = MOUSE_OFF;
INF("XXX: set mouse (press+release only) to %i", mode);
break;
case 1001:
@ -1266,14 +1266,14 @@ _handle_esc_csi(Termpty *ty, const Eina_Unicode *c, Eina_Unicode *ce)
break;
case 1005:
handled = 1;
if (mode) ty->state.mouse_rep = MOUSE_UTF8;
else ty->state.mouse_rep = MOUSE_OFF;
if (mode) ty->mouse_rep = MOUSE_UTF8;
else ty->mouse_rep = MOUSE_OFF;
INF("XXX: set mouse (xterm utf8 style) %i", mode);
break;
case 1006:
handled = 1;
if (mode) ty->state.mouse_rep = MOUSE_SGR;
else ty->state.mouse_rep = MOUSE_OFF;
if (mode) ty->mouse_rep = MOUSE_SGR;
else ty->mouse_rep = MOUSE_OFF;
INF("XXX: set mouse (xterm sgr style) %i", mode);
break;
case 1010: // ignore
@ -1286,8 +1286,8 @@ _handle_esc_csi(Termpty *ty, const Eina_Unicode *c, Eina_Unicode *ce)
break;
case 1015:
handled = 1;
if (mode) ty->state.mouse_rep = MOUSE_URXVT;
else ty->state.mouse_rep = MOUSE_OFF;
if (mode) ty->mouse_rep = MOUSE_URXVT;
else ty->mouse_rep = MOUSE_OFF;
INF("XXX: set mouse (rxvt-unicdode style) %i", mode);
break;
case 1034: // ignore

View File

@ -78,7 +78,6 @@ struct _Termstate
unsigned int kbd_lock : 1;
unsigned int reverse : 1;
unsigned int no_autorepeat : 1;
unsigned int mouse_rep : 3;
unsigned int cjk_ambiguous_wide : 1;
};
@ -109,6 +108,7 @@ struct _Termpty
Termstate state, save, swap;
int exit_code;
unsigned int altbuf : 1;
unsigned int mouse_rep : 3;
};
struct _Termcell