CE edit handle empty file
All checks were successful
Build documentation / build-and-deploy (push) Successful in 2m5s

This commit is contained in:
2026-03-08 23:52:34 +01:00
parent bea4ddd2c8
commit a352e9c501

View File

@@ -89,7 +89,10 @@ static bool prepare_lines_cb (void* ctx, const char* start, size_t len) {
} }
static void prepare_lines (const char* text, size_t len) { static void prepare_lines (const char* text, size_t len) {
str_split_lines (text, len, NULL, &prepare_lines_cb); if (len == 0)
str_split_lines ("\n", 1, NULL, &prepare_lines_cb);
else
str_split_lines (text, len, NULL, &prepare_lines_cb);
} }
static void update_horz_scroll (size_t screen_cols) { static void update_horz_scroll (size_t screen_cols) {