mirror of
https://github.com/kovidgoyal/kitty.git
synced 2026-08-04 14:46:03 +00:00
Show proper error message in diff when failing to load image
This commit is contained in:
parent
5b199b28c3
commit
5e6d020275
2 changed files with 4 additions and 1 deletions
|
|
@ -86,6 +86,9 @@ func (self *ImageCollection) GetSizeIfAvailable(key string, page_size Size) (Siz
|
|||
}
|
||||
ans := img.renderings[page_size]
|
||||
if ans == nil {
|
||||
if img.err != nil {
|
||||
return Size{}, img.err
|
||||
}
|
||||
return Size{}, ErrNotFound
|
||||
}
|
||||
return Size{ans.img.Width, ans.img.Height}, img.err
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue