Fix crash in project search when project has no files
This commit is contained in:
parent
d3bd35b577
commit
e93bbc559c
|
@ -171,7 +171,7 @@ function ResultsView:draw()
|
||||||
local ox, oy = self:get_content_offset()
|
local ox, oy = self:get_content_offset()
|
||||||
local x, y = ox + style.padding.x, oy + style.padding.y
|
local x, y = ox + style.padding.x, oy + style.padding.y
|
||||||
local files_number = core.project_files_number()
|
local files_number = core.project_files_number()
|
||||||
local per = files_number and self.last_file_idx / files_number or 1
|
local per = common.clamp(files_number and self.last_file_idx / files_number or 1, 0, 1)
|
||||||
local text
|
local text
|
||||||
if self.searching then
|
if self.searching then
|
||||||
if files_number then
|
if files_number then
|
||||||
|
|
Loading…
Reference in New Issue