termptyext: add operator to test whether selection is active
This commit is contained in:
parent
f679d28809
commit
19ffa91f15
|
@ -314,6 +314,16 @@ _handle_link(Termpty *ty, const Eina_Unicode *buf)
|
|||
free(link);
|
||||
}
|
||||
|
||||
static void
|
||||
_handle_selection_active(Termpty *ty,
|
||||
const Eina_Unicode *buf)
|
||||
{
|
||||
if (*buf == '!')
|
||||
assert(ty->selection.is_active);
|
||||
else
|
||||
assert(!ty->selection.is_active);
|
||||
}
|
||||
|
||||
static void
|
||||
_handle_selection_is(Termpty *ty,
|
||||
const Eina_Unicode *buf)
|
||||
|
@ -414,7 +424,7 @@ tytest_handle_escape_codes(Termpty *ty,
|
|||
_handle_mouse_move(ty, buf + 1);
|
||||
break;
|
||||
case 'n':
|
||||
assert(!ty->selection.is_active);
|
||||
_handle_selection_active(ty, buf + 1);
|
||||
break;
|
||||
case 'r':
|
||||
_handle_force_render(ty);
|
||||
|
|
Loading…
Reference in New Issue