summaryrefslogtreecommitdiff
path: root/src/bin
diff options
context:
space:
mode:
authorSebastian Dransfeld <sd@tango.flipp.net>2012-07-02 08:58:49 +0000
committerSebastian Dransfeld <sd@tango.flipp.net>2012-07-02 08:58:49 +0000
commit5ecbbb7f2315650b13a1b41b94aee20a3f003f3c (patch)
treeb3230a31e6a3d28440e7b8a6d661b59aac68372e /src/bin
parentd2c099699a32ce0ac37f2fcc67e7c2f0ce4212b8 (diff)
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
Diffstat (limited to 'src/bin')
-rw-r--r--src/bin/termio.c10
-rw-r--r--src/bin/termpty.c20
-rw-r--r--src/bin/termpty.h2
3 files changed, 16 insertions, 16 deletions
diff --git a/src/bin/termio.c b/src/bin/termio.c
index 6b7bb87..ad75ed2 100644
--- a/src/bin/termio.c
+++ b/src/bin/termio.c
@@ -826,8 +826,8 @@ _rep_mouse_down(Evas_Object *obj, Evas_Event_Mouse_Down *ev, int cx, int cy)
826 826
827 sd = evas_object_smart_data_get(obj); 827 sd = evas_object_smart_data_get(obj);
828 if (!sd) return; 828 if (!sd) return;
829 if (sd->pty->state.mouse_rep == MOUSE_OFF) return; 829 if (sd->pty->mouse_rep == MOUSE_OFF) return;
830 switch (sd->pty->state.mouse_rep) 830 switch (sd->pty->mouse_rep)
831 { 831 {
832 case MOUSE_X10: 832 case MOUSE_X10:
833 if ((cx < (0xff - ' ')) && (cy < (0xff - ' '))) 833 if ((cx < (0xff - ' ')) && (cy < (0xff - ' ')))
@@ -927,8 +927,8 @@ _rep_mouse_up(Evas_Object *obj, Evas_Event_Mouse_Up *ev, int cx, int cy)
927 927
928 sd = evas_object_smart_data_get(obj); 928 sd = evas_object_smart_data_get(obj);
929 if (!sd) return; 929 if (!sd) return;
930 if (sd->pty->state.mouse_rep == MOUSE_OFF) return; 930 if (sd->pty->mouse_rep == MOUSE_OFF) return;
931 switch (sd->pty->state.mouse_rep) 931 switch (sd->pty->mouse_rep)
932 { 932 {
933 case MOUSE_UTF8: // ESC.[.M.BTN/FLGS.UTF8.YUTF8 933 case MOUSE_UTF8: // ESC.[.M.BTN/FLGS.UTF8.YUTF8
934 { 934 {
@@ -1005,7 +1005,7 @@ _rep_mouse_move(Evas_Object *obj, Evas_Event_Mouse_Move *ev __UNUSED__, int cx _
1005 1005
1006 sd = evas_object_smart_data_get(obj); 1006 sd = evas_object_smart_data_get(obj);
1007 if (!sd) return; 1007 if (!sd) return;
1008 if (sd->pty->state.mouse_rep == MOUSE_OFF) return; 1008 if (sd->pty->mouse_rep == MOUSE_OFF) return;
1009 // not sure what to d here right now so do nothing. 1009 // not sure what to d here right now so do nothing.
1010} 1010}
1011 1011
diff --git a/src/bin/termpty.c b/src/bin/termpty.c
index 561b77f..c105fda 100644
--- a/src/bin/termpty.c
+++ b/src/bin/termpty.c
@@ -1190,8 +1190,8 @@ _handle_esc_csi(Termpty *ty, const Eina_Unicode *c, Eina_Unicode *ce)
1190 break; 1190 break;
1191 case 9: 1191 case 9:
1192 handled = 1; 1192 handled = 1;
1193 if (mode) ty->state.mouse_rep = MOUSE_X10; 1193 if (mode) ty->mouse_rep = MOUSE_X10;
1194 else ty->state.mouse_rep = MOUSE_OFF; 1194 else ty->mouse_rep = MOUSE_OFF;
1195 break; 1195 break;
1196 case 12: // ignore 1196 case 12: // ignore
1197 handled = 1; 1197 handled = 1;
@@ -1244,8 +1244,8 @@ _handle_esc_csi(Termpty *ty, const Eina_Unicode *c, Eina_Unicode *ce)
1244 break; 1244 break;
1245 case 1000: 1245 case 1000:
1246 handled = 1; 1246 handled = 1;
1247 if (mode) ty->state.mouse_rep = MOUSE_NORMAL; 1247 if (mode) ty->mouse_rep = MOUSE_NORMAL;
1248 else ty->state.mouse_rep = MOUSE_OFF; 1248 else ty->mouse_rep = MOUSE_OFF;
1249 INF("XXX: set mouse (press+release only) to %i", mode); 1249 INF("XXX: set mouse (press+release only) to %i", mode);
1250 break; 1250 break;
1251 case 1001: 1251 case 1001:
@@ -1266,14 +1266,14 @@ _handle_esc_csi(Termpty *ty, const Eina_Unicode *c, Eina_Unicode *ce)
1266 break; 1266 break;
1267 case 1005: 1267 case 1005:
1268 handled = 1; 1268 handled = 1;
1269 if (mode) ty->state.mouse_rep = MOUSE_UTF8; 1269 if (mode) ty->mouse_rep = MOUSE_UTF8;
1270 else ty->state.mouse_rep = MOUSE_OFF; 1270 else ty->mouse_rep = MOUSE_OFF;
1271 INF("XXX: set mouse (xterm utf8 style) %i", mode); 1271 INF("XXX: set mouse (xterm utf8 style) %i", mode);
1272 break; 1272 break;
1273 case 1006: 1273 case 1006:
1274 handled = 1; 1274 handled = 1;
1275 if (mode) ty->state.mouse_rep = MOUSE_SGR; 1275 if (mode) ty->mouse_rep = MOUSE_SGR;
1276 else ty->state.mouse_rep = MOUSE_OFF; 1276 else ty->mouse_rep = MOUSE_OFF;
1277 INF("XXX: set mouse (xterm sgr style) %i", mode); 1277 INF("XXX: set mouse (xterm sgr style) %i", mode);
1278 break; 1278 break;
1279 case 1010: // ignore 1279 case 1010: // ignore
@@ -1286,8 +1286,8 @@ _handle_esc_csi(Termpty *ty, const Eina_Unicode *c, Eina_Unicode *ce)
1286 break; 1286 break;
1287 case 1015: 1287 case 1015:
1288 handled = 1; 1288 handled = 1;
1289 if (mode) ty->state.mouse_rep = MOUSE_URXVT; 1289 if (mode) ty->mouse_rep = MOUSE_URXVT;
1290 else ty->state.mouse_rep = MOUSE_OFF; 1290 else ty->mouse_rep = MOUSE_OFF;
1291 INF("XXX: set mouse (rxvt-unicdode style) %i", mode); 1291 INF("XXX: set mouse (rxvt-unicdode style) %i", mode);
1292 break; 1292 break;
1293 case 1034: // ignore 1293 case 1034: // ignore
diff --git a/src/bin/termpty.h b/src/bin/termpty.h
index e531dcc..970a219 100644
--- a/src/bin/termpty.h
+++ b/src/bin/termpty.h
@@ -78,7 +78,6 @@ struct _Termstate
78 unsigned int kbd_lock : 1; 78 unsigned int kbd_lock : 1;
79 unsigned int reverse : 1; 79 unsigned int reverse : 1;
80 unsigned int no_autorepeat : 1; 80 unsigned int no_autorepeat : 1;
81 unsigned int mouse_rep : 3;
82 unsigned int cjk_ambiguous_wide : 1; 81 unsigned int cjk_ambiguous_wide : 1;
83}; 82};
84 83
@@ -109,6 +108,7 @@ struct _Termpty
109 Termstate state, save, swap; 108 Termstate state, save, swap;
110 int exit_code; 109 int exit_code;
111 unsigned int altbuf : 1; 110 unsigned int altbuf : 1;
111 unsigned int mouse_rep : 3;
112}; 112};
113 113
114struct _Termcell 114struct _Termcell