aboutsummaryrefslogtreecommitdiff
path: root/test/functional/api/buffer_updates_spec.lua
diff options
context:
space:
mode:
authorzeertzjq <zeertzjq@outlook.com>2022-05-17 21:09:28 +0800
committerGitHub <noreply@github.com>2022-05-17 21:09:28 +0800
commitf49699737c9b24e1af52719974cf3bc770539ef9 (patch)
tree045c760d2904da291a95c7e0e0a452c9ddc9008d /test/functional/api/buffer_updates_spec.lua
parentbbfc4567dfabc8d4378ad26a2d1020e3b2565107 (diff)
downloadrneovim-f49699737c9b24e1af52719974cf3bc770539ef9.tar.gz
rneovim-f49699737c9b24e1af52719974cf3bc770539ef9.tar.bz2
rneovim-f49699737c9b24e1af52719974cf3bc770539ef9.zip
fix(terminal): do not trim whitespace that is actually in the terminal (#16423)
Diffstat (limited to 'test/functional/api/buffer_updates_spec.lua')
-rw-r--r--test/functional/api/buffer_updates_spec.lua3
1 files changed, 2 insertions, 1 deletions
diff --git a/test/functional/api/buffer_updates_spec.lua b/test/functional/api/buffer_updates_spec.lua
index fc09e4cde0..097757f53d 100644
--- a/test/functional/api/buffer_updates_spec.lua
+++ b/test/functional/api/buffer_updates_spec.lua
@@ -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