term: assert(false) on MOUSE_X10

This mouse mode is never enabled. I.e. we don't support it. Add
asserts to catch usage of it, should we ever decide to implement it.
This commit is contained in:
Daniel Eklöf 2019-11-18 11:18:48 +01:00
parent 29cccadd1d
commit 832cc8c269
No known key found for this signature in database
GPG key ID: 5BBD4992C116573F

View file

@ -1321,12 +1321,16 @@ term_mouse_down(struct terminal *term, int button, int row, int col,
case MOUSE_NONE:
break;
case MOUSE_X10:
case MOUSE_CLICK:
case MOUSE_DRAG:
case MOUSE_MOTION:
report_mouse_click(term, encoded, row, col, false);
break;
case MOUSE_X10:
/* Never enabled */
assert(false && "unimplemented");
break;
}
}
@ -1359,12 +1363,16 @@ term_mouse_up(struct terminal *term, int button, int row, int col,
case MOUSE_NONE:
break;
case MOUSE_X10:
case MOUSE_CLICK:
case MOUSE_DRAG:
case MOUSE_MOTION:
report_mouse_click(term, encoded, row, col, true);
break;
case MOUSE_X10:
/* Never enabled */
assert(false && "unimplemented");
break;
}
}
@ -1396,7 +1404,6 @@ term_mouse_motion(struct terminal *term, int button, int row, int col,
switch (term->mouse_tracking) {
case MOUSE_NONE:
case MOUSE_X10:
case MOUSE_CLICK:
return;
@ -1408,6 +1415,11 @@ term_mouse_motion(struct terminal *term, int button, int row, int col,
case MOUSE_MOTION:
report_mouse_motion(term, encoded, row, col);
break;
case MOUSE_X10:
/* Never enabled */
assert(false && "unimplemented");
break;
}
}