1
0
mirror of https://github.com/taigrr/wtf synced 2025-01-18 04:03:14 -08:00

Merge pull request #712 from Daanikus/close-file

Close unclosed file
This commit is contained in:
Chris Cummer 2019-10-21 21:19:11 -07:00 committed by GitHub
commit 97bf42045b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -96,6 +96,7 @@ func (widget *Widget) formattedText() string {
if err != nil {
return err.Error()
}
defer file.Close()
lexer := lexers.Match(filePath)
if lexer == nil {