Skip to content

Commit

Permalink
Merge pull request #421 from mrjones2014/mrj/420/lua-eval
Browse files Browse the repository at this point in the history
fix(scratchpad): Treat boolean false as a valid return value
  • Loading branch information
mrjones2014 authored Oct 23, 2023
2 parents e2828d4 + 4aa09aa commit 234e2ef
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions lua/legendary/ui/scratchpad.lua
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 234e2ef

Please sign in to comment.