backport: fixup(clipboard): Use case matching #14962

Context: https://github.com/neovim/neovim/pull/14848#discussion_r663203173
This commit is contained in:
Shadman 2021-07-03 06:47:18 +06:00 committed by Sean Dewar
parent 88336851ee
commit 2229e99ef9
No known key found for this signature in database
GPG Key ID: 08CC2C83AD41B581

View File

@ -158,7 +158,7 @@ function! s:clipboard.get(reg) abort
end
let clipboard_data = s:try_cmd(s:paste[a:reg])
if match(&clipboard, '\v(unnamed|unnamedplus)') >= 0 && get(s:selections[a:reg].data, 0, []) == clipboard_data
if match(&clipboard, '\v(unnamed|unnamedplus)') >= 0 && get(s:selections[a:reg].data, 0, []) ==# clipboard_data
" When system clipboard return is same as our cache return the cache
" as it contains regtype information
return s:selections[a:reg].data