From 20402e690116caf34deb9a561b6ce6b90dff5561 Mon Sep 17 00:00:00 2001 From: Mat Jones Date: Mon, 23 Oct 2023 13:59:48 -0400 Subject: [PATCH] fix(scratchpad): Treat boolean false as a valid return value --- lua/legendary/ui/scratchpad.lua | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lua/legendary/ui/scratchpad.lua b/lua/legendary/ui/scratchpad.lua index 24e6b872..62302f90 100644 --- a/lua/legendary/ui/scratchpad.lua +++ b/lua/legendary/ui/scratchpad.lua @@ -75,13 +75,13 @@ end local function results_win(result, err) local lines = nil - if err then + if err ~= nil then lines = err - elseif result then + elseif result ~= nil then lines = result end - if not lines then + if lines == nil then Log.warn('[legendary.nvim] No return value from Lua evaluation.') return end