aboutsummaryrefslogtreecommitdiff
path: root/selection.c
diff options
context:
space:
mode:
authorCraig Barnes <craigbarnes@protonmail.com>2021-02-10 21:03:00 +0000
committerCraig Barnes <craigbarnes@protonmail.com>2021-02-10 21:03:00 +0000
commit1add430b5b6bc2ff616fb859c3b882602ff5222d (patch)
treea7df73c007742a43b4948a8ef4565be5bf18e070 /selection.c
parentMerge branch 'turn-meson-terminfo-option-into-a-feature' (diff)
parentMark slave_exec() as "noreturn" and convert xassert(false) to BUG(...) (diff)
Merge branch 'xassert-false'
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: