Skip to content

Commit c04cfcb

Browse files
committed
feat: remove the "Erase in Line" ANSI control sequence that *baleia* doesn't handle
1 parent 1af5eea commit c04cfcb

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

Diff for: lua/neogit/lib/buffer.lua

+4
Original file line numberDiff line numberDiff line change
@@ -148,6 +148,10 @@ function Buffer:set_ansi_highlights(highlights)
148148
for _, hl in ipairs(highlights) do
149149
local first_line, last_line = unpack(hl)
150150
local text = self:get_lines(first_line, last_line, false)
151+
for i, line in ipairs(text) do
152+
line = line:gsub("\27%[0K.*", "")
153+
text[i] = line
154+
end
151155
vim.g.baleia.buf_set_lines(self.handle, first_line, last_line, false, text)
152156
end
153157
end

0 commit comments

Comments
 (0)