diff options
| author | Matthieu Coudron <mattator@gmail.com> | 2020-07-19 18:41:40 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2020-07-19 18:41:40 +0200 |
| commit | daa5bffd93e19987980705990615c730fe07ea5f (patch) | |
| tree | 38e422d674d51d0a4c0fb49a4fb2d0423ec9d6d7 /src/nvim/eval/typval.c | |
| parent | 8e350c1c6922f9c678e83d97227e7edd84967571 (diff) | |
| parent | 140a372017c7649e156742622c9ccc1cd8b794c1 (diff) | |
| download | rneovim-daa5bffd93e19987980705990615c730fe07ea5f.tar.gz rneovim-daa5bffd93e19987980705990615c730fe07ea5f.tar.bz2 rneovim-daa5bffd93e19987980705990615c730fe07ea5f.zip | |
Merge pull request #12611 from janlazo/vim-8.0.1531
vim-patch:8.0.{1531,1544,1589,1591,1712,1745,1747},8.1.{819},8.2.{420,539,893,894,895,899,1114,1118,1169,1170,1171,1172,1173,1177,1179,1180,1181,1187,1188,1196,1198,1211,1214,1215,1222}
Diffstat (limited to 'src/nvim/eval/typval.c')
| -rw-r--r-- | src/nvim/eval/typval.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/src/nvim/eval/typval.c b/src/nvim/eval/typval.c index 89ca2db59b..2394eb8099 100644 --- a/src/nvim/eval/typval.c +++ b/src/nvim/eval/typval.c @@ -799,10 +799,14 @@ bool tv_list_equal(list_T *const l1, list_T *const l2, const bool ic, if (l1 == l2) { return true; } - if (l1 == NULL || l2 == NULL) { + if (tv_list_len(l1) != tv_list_len(l2)) { return false; } - if (tv_list_len(l1) != tv_list_len(l2)) { + if (tv_list_len(l1) == 0) { + // empty and NULL list are considered equal + return true; + } + if (l1 == NULL || l2 == NULL) { return false; } |
