Miscellaneous tweaks and fixes (#2223)
* Miscellaneous tweaks and fixes Mostly these were found by running golangci-lint with a bunch of linters (more than the default set) enabled. * fmt.Fprint -> fmt.Fprintln where possible * Remove "nolint:staticcheck" for now
This commit is contained in:
1 parent
b12cb33918
commit
fc4b3637bb
11 files changed
+105
-108
No files matched your search
@@ -51,13 +51,13 @@ func (sxs *sixelScreen) printSixel(win *win, screen tcell.Screen, reg *reg) {
|
||||
screen.LockRegion(win.x, y, printLength(line), 1, true)
|
||||
fmt.Fprintf(&b, "\033[%d;%dH", y+1, win.x+1)
|
||||
b.WriteString(line)
|
||||
y += 1
|
||||
y++
|
||||
continue
|
||||
}
|
||||
|
||||
matches := reSixelSize.FindStringSubmatch(line)
|
||||
if matches == nil {
|
||||
log.Printf("sixel: failed to get image size")
|
||||
log.Print("sixel: failed to get image size")
|
||||
continue
|
||||
}
|
||||
|
||||
@@ -104,7 +104,7 @@ func cellSize(screen tcell.Screen) (int, int, error) {
|
||||
|
||||
ws, err := tty.WindowSize()
|
||||
if err != nil {
|
||||
return -1, -1, fmt.Errorf("failed to get window size: %s", err)
|
||||
return -1, -1, fmt.Errorf("failed to get window size: %w", err)
|
||||
}
|
||||
|
||||
cw, ch := ws.CellDimensions()
|
||||
|
||||
Reference in new issue
Block a user