diff --git a/internal/action/bufpane.go b/internal/action/bufpane.go index cf5ac23e..7b8e9d00 100644 --- a/internal/action/bufpane.go +++ b/internal/action/bufpane.go @@ -215,7 +215,6 @@ func (h *BufPane) Name() string { } // HandleEvent executes the tcell event properly -// TODO: multiple actions bound to one key func (h *BufPane) HandleEvent(event tcell.Event) { switch e := event.(type) { case *tcell.EventRaw: diff --git a/internal/util/util.go b/internal/util/util.go index d10c9851..92af3bce 100644 --- a/internal/util/util.go +++ b/internal/util/util.go @@ -353,7 +353,6 @@ func IntOpt(opt interface{}) int { // coordinate (this is necessary because tabs are 1 char but // 4 visual spaces) func GetCharPosInLine(b []byte, visualPos int, tabsize int) int { - // Scan rune by rune until we exceed the visual width that we are // looking for. Then we can return the character position we have found i := 0 // char pos diff --git a/pkg/terminfo/terminfo.go b/pkg/terminfo/terminfo.go index b7fc0fa9..4bf3beed 100644 --- a/pkg/terminfo/terminfo.go +++ b/pkg/terminfo/terminfo.go @@ -717,10 +717,11 @@ func AddTerminfo(t *Terminfo) { func loadFromFile(fname string, term string) (*Terminfo, error) { var e error - var f io.Reader + var f io.ReadCloser if f, e = os.Open(fname); e != nil { return nil, e } + defer f.Close() if strings.HasSuffix(fname, ".gz") { if f, e = gzip.NewReader(f); e != nil { return nil, e