Mercurial > vim
comparison src/typval.c @ 23909:5db7d275543c v8.2.2497
patch 8.2.2497: no error when using more than one character for a register
Commit: https://github.com/vim/vim/commit/418a29f0ffcaa0a3d778724ab6d1111db525d3cc
Author: Bram Moolenaar <Bram@vim.org>
Date: Wed Feb 10 22:23:41 2021 +0100
patch 8.2.2497: no error when using more than one character for a register
Problem: No error when using more than one character for a register name.
Solution: In Vim9 script check for a single character string. (closes https://github.com/vim/vim/issues/7814)
Fix that VAR_BOOL and VAR_SPECIAL are not considered equal.
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Wed, 10 Feb 2021 22:30:06 +0100 |
parents | d12ef361d9de |
children | 083f07f99e20 |
comparison
equal
deleted
inserted
replaced
23908:0b3a5d2eff3d | 23909:5db7d275543c |
---|---|
1067 r = func_equal(tv1, tv2, ic); | 1067 r = func_equal(tv1, tv2, ic); |
1068 --recursive_cnt; | 1068 --recursive_cnt; |
1069 return r; | 1069 return r; |
1070 } | 1070 } |
1071 | 1071 |
1072 if (tv1->v_type != tv2->v_type) | 1072 if (tv1->v_type != tv2->v_type |
1073 && ((tv1->v_type != VAR_BOOL && tv1->v_type != VAR_SPECIAL) | |
1074 || (tv2->v_type != VAR_BOOL && tv2->v_type != VAR_SPECIAL))) | |
1073 return FALSE; | 1075 return FALSE; |
1074 | 1076 |
1075 switch (tv1->v_type) | 1077 switch (tv1->v_type) |
1076 { | 1078 { |
1077 case VAR_LIST: | 1079 case VAR_LIST: |