diff options
| author | Maxime Coste <mawww@kakoune.org> | 2017-07-09 11:03:04 +0900 |
|---|---|---|
| committer | Maxime Coste <mawww@kakoune.org> | 2017-07-09 11:03:04 +0900 |
| commit | 50e26a2bac3c3accddca6769be5d4663701ff115 (patch) | |
| tree | 35d6c9fd45302c613d67aee3e52f5d690ad0f195 /src/string.hh | |
| parent | 52c8dc9d09737c0185c85cd6194d91f3e18dff08 (diff) | |
Remove assert in String::String(Codepoint, ColumnCount)
codepoint_width is locale dependent, and we could end up with it
returning a different value depending on the locale. It is better
to return a string of the wrong column length than fail on assert
in this case as we cannot fix it anyway.
Fixes #1489
Diffstat (limited to 'src/string.hh')
| -rw-r--r-- | src/string.hh | 1 |
1 files changed, 0 insertions, 1 deletions
diff --git a/src/string.hh b/src/string.hh index 2a384cde..70a95374 100644 --- a/src/string.hh +++ b/src/string.hh @@ -113,7 +113,6 @@ public: } explicit String(Codepoint cp, ColumnCount count) { - kak_assert(count % codepoint_width(cp) == 0); int cp_count = (int)(count / std::max(codepoint_width(cp), 1_col)); reserve(utf8::codepoint_size(cp) * cp_count); while (cp_count-- > 0) |
