summaryrefslogtreecommitdiff
path: root/src/assert.hh
AgeCommit message (Collapse)Author
2025-02-04Change kak_expect_throw macro to use alignofColeman McFarland
2025-02-02Change kak_assert macro to silence a clang-tidy warningColeman McFarland
When KAK_DEBUG is false (release mode), clang tidy emits a warning when we pass a pointer to kak_assert. It's mad about passing a pointer to `sizeof`. We can avoid this warning by using `alignof(decltype(...))`. It will still type-check the expression.
2018-04-11Add support for the shift modifier.Tim Allen
Because keyboard layouts vary, the shift-modifier `<s-…>` is only supported for special keys (like `<up>` and `<home>`) and for ASCII lowercase where we assume the shift-modifier just produces the matching uppercase character. Even that's not universally true, since in Turkish `i` and `I` are not an uppercase/lowercase pair, but Kakoune's default keyboard mappings already assume en-US mappings for mnemonic purposes. Mappings of the form `<s-x>` are normalized to `<X>` when `x` is an ASCII character. `<backtab>` is removed, since we can now say `<s-tab>`.
2017-10-19Avoid some warnings in optimized buildsfsub
2017-02-23Use false instead of 0 in the kak_assert do whileMaxime Coste
2017-02-22Properly wrap `kak_assert` into a do-while scopeFrank LENORMAND
Expanding the `kak_assert` macro to either an `if` statement or nothing leads to issues when the macro is used in a conditional statement that doesn't use braces. Example: ncurses_ui.cc:476, in non debug mode, the macro will expand to an empty line, resulting in the `ungetch` call not being executed if the `ioctl` call succeeds (line 448).
2016-05-17Use variadic macros for kak_assert to remove the need for COMMAMaxime Coste
2016-02-29Use a StringView in notify_fatal_errorMaxime Coste
2015-05-29Extract xmessage/MessageBox support in a notify_fatal_error functionMaxime Coste
2013-04-09rename assert to kak_assert to avoid collisionsMaxime Coste
2013-02-27Add a debug option to Makefile, and use KAK_DEBUG define to remove debug codeMaxime Coste
2012-10-17assert: simplify headerMaxime Coste
2012-10-16assert: use xmessage to block on assert failedMaxime Coste
2012-09-04add override markersMaxime Coste
2012-04-14replace std::string references with StringMaxime Coste
2012-03-25add a COMMA macro for assert parametersMaxime Coste
2011-09-09assert: custom implementationMaxime Coste