fix(windows): check nil (#529)

* small fixes: sidebar: opts.win ~= nil case && bash

- and bash in Makefile (should correspond to she-bang in build.sh)

* fix lua style
This commit is contained in:
Josef Moudrik 2024-09-04 16:34:33 +02:00 committed by GitHub
parent d10cca4265
commit bf8a943f45
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 4 additions and 2 deletions

View File

@ -32,7 +32,7 @@ else
endif
else
$1:
LUA_VERSION=$1 sh ./build.sh
LUA_VERSION=$1 bash ./build.sh
endif
endef

View File

@ -1484,7 +1484,9 @@ function Sidebar:render(opts)
opts = opts or {}
local chat_history = Path.history.load(self.code.bufnr)
local get_position = function() return (opts and opts.win.position) and opts.win.position or Config.windows.position end
local get_position = function()
return (opts and opts.win and opts.win.position) and opts.win.position or Config.windows.position
end
local get_height = function()
local selected_code_size = self:get_selected_code_size()