fix: remove sixel height override for tmux (#2474)
* fix: remove sixel height override for tmux * Update `CHANGELOG.md`
This commit is contained in:
1 parent
1aefc1f010
commit
c5c3de643e
2 files changed
+1
-7
No files matched your search
@@ -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).
|
- 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).
|
- 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).
|
- 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)
|
## [r41](https://github.com/gokcehan/lf/releases/tag/r41)
|
||||||
|
|
||||||
|
|||||||
@@ -59,13 +59,6 @@ func (sxs *sixelScreen) printSixel(win *win, screen tcell.Screen, reg *reg) {
|
|||||||
iw, _ := strconv.Atoi(matches[1])
|
iw, _ := strconv.Atoi(matches[1])
|
||||||
ih, _ := strconv.Atoi(matches[2])
|
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
|
sw := (iw + cw - 1) / cw
|
||||||
sh := (ih + ch - 1) / ch
|
sh := (ih + ch - 1) / ch
|
||||||
|
|
||||||
|
|||||||
Reference in new issue
Block a user