From e4a2022f4fec2d5ebc79afa612f96d8b11c627b3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=B3n=C3=A1n=20Carrigan?= Date: Thu, 28 Sep 2023 20:49:32 +0100 Subject: [PATCH] fix(wrapped-compact): default max width See #225 --- lua/notify/render/wrapped-compact.lua | 3 +++ 1 file changed, 3 insertions(+) diff --git a/lua/notify/render/wrapped-compact.lua b/lua/notify/render/wrapped-compact.lua index 0de7a8d..16497fc 100644 --- a/lua/notify/render/wrapped-compact.lua +++ b/lua/notify/render/wrapped-compact.lua @@ -46,6 +46,9 @@ return function(bufnr, notif, highlights, config) -- wrap the text & add spacing local max_width = config.max_width() + if max_width == nil then + max_width = 80 + end notif.message = custom_wrap(notif.message, max_width) local default_titles = { "Error", "Warning", "Notify" }