diff --git a/CHANGELOG.md b/CHANGELOG.md index 308e2d31..49c42c96 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -41,6 +41,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/), - Executable files on Windows are now correctly recognized for icon and color lookup based on `PATHEXT` (#2448). - The number of bytes read is now limited for previews that contain extremely long lines (#2458). - Control characters are now stripped from previews to prevent dangerous terminal sequences from being processed if the default previewer is used (#2459). +- Sixel images with the same height as the preview window are now displayed correctly when using `tmux` (#2474). ## [r41](https://github.com/gokcehan/lf/releases/tag/r41) diff --git a/sixel.go b/sixel.go index 292c8614..f7098002 100644 --- a/sixel.go +++ b/sixel.go @@ -59,13 +59,6 @@ func (sxs *sixelScreen) printSixel(win *win, screen tcell.Screen, reg *reg) { iw, _ := strconv.Atoi(matches[1]) ih, _ := strconv.Atoi(matches[2]) - if os.Getenv("TMUX") != "" { - // tmux rounds the image height up to a multiple of 6, so we - // need to do the same to avoid overwriting the image, as tmux - // would remove the image if we touched it. - ih = (ih + 5) / 6 * 6 - } - sw := (iw + cw - 1) / cw sh := (ih + ch - 1) / ch