ITADN

Hyperlinks leak into the next file

#2554Openveltza 创建于 2026-04-27
bug
V
veltzacommented
## Description When previewing a text file that contains hyperlinks (OSC 8), `lf` (or `Tcell`) does not properly close the last hyperlink. As a result, when you move the cursor to the next file, it is also rendered as a hyperlink. Here you can see how a text file that contains a hyperlink is rendered correctly: <img width="562" height="200" alt="Image" src="https://github.com/user-attachments/assets/2a778de6-d2ea-4c3d-a6d3-1a07d66abe11" /> But when I move the cursor to the next text file, it is rendered as the same hyperlink. Even the filenames are now displayed as hyperlinks: <img width="562" height="200" alt="Image" src="https://github.com/user-attachments/assets/42dd044c-0b35-4277-b5ba-13d6a79e531d" /> ## Minimal Config In the example above, I used this simple previewer: ```sh #!/bin/sh bat -pp -f -- "$1" ``` And I created the `link.txt` file using this printf command: ```sh printf '\e]8;;http://example.com\e\\This is a link\e]8;;\e\\\n' > link.txt ``` ## Git Bisect Result I found that the issue started with commit cef9b45a47d22c14a92ac2c349a0759754f32f90.
1 条评论