fix(terminal): do not trim whitespace that is actually in the terminal (#16423)

This commit is contained in:
zeertzjq
2022-05-17 21:09:28 +08:00
committed by GitHub
parent bbfc4567df
commit f49699737c
4 changed files with 66 additions and 15 deletions

View File

@@ -785,7 +785,8 @@ describe('API: buffer events:', function()
local function lines_subset(first, second)
for i = 1,#first do
if first[i] ~= second[i] then
-- need to ignore trailing spaces
if first[i]:gsub(' +$', '') ~= second[i]:gsub(' +$', '') then
return false
end
end