aboutsummaryrefslogtreecommitdiff
path: root/selection.c
diff options
context:
space:
mode:
authorCraig Barnes <craigbarnes@protonmail.com>2021-02-10 09:01:51 +0000
committerCraig Barnes <craigbarnes@protonmail.com>2021-02-10 09:01:51 +0000
commit3c86af52c2a3e9352a88e969392575e55c3b6f74 (patch)
treedeed54e12bea0689caaad21f76f4f56b92e68d92 /selection.c
parentConvert some more uses of xassert(false) to BUG("...") (diff)
Convert all but 2 remaining uses of xassert(false) to BUG("...")
Diffstat (limited to 'selection.c')
-rw-r--r--selection.c13
1 files changed, 6 insertions, 7 deletions
diff --git a/selection.c b/selection.c
index 90c6c392..cb625541 100644
--- a/selection.c
+++ b/selection.c
@@ -195,11 +195,10 @@ foreach_selected(
return;
case SELECTION_NONE:
- xassert(false);
- return;
+ break;
}
- xassert(false);
+ BUG("Invalid selection kind");
}
static bool
@@ -426,7 +425,7 @@ selection_start(struct terminal *term, int col, int row,
break;
case SELECTION_NONE:
- xassert(false);
+ BUG("Invalid selection kind");
break;
}
@@ -728,7 +727,7 @@ selection_update(struct terminal *term, int col, int row)
break;
case SELECTION_NONE:
- xassert(false);
+ BUG("Invalid selection kind");
break;
}
@@ -861,7 +860,7 @@ selection_extend_normal(struct terminal *term, int col, int row,
case SELECTION_BLOCK:
case SELECTION_NONE:
- xassert(false);
+ BUG("Invalid selection kind in this context");
break;
}
@@ -963,7 +962,7 @@ selection_extend(struct seat *seat, struct terminal *term,
switch (term->selection.kind) {
case SELECTION_NONE:
- xassert(false);
+ BUG("Invalid selection kind");
return;
case SELECTION_CHAR_WISE: