diff options
| author | ZyX <kp-pav@yandex.ru> | 2016-12-04 22:35:10 +0300 | 
|---|---|---|
| committer | ZyX <kp-pav@yandex.ru> | 2017-03-29 10:08:44 +0300 | 
| commit | a56f2d27e3c09aaae00a58a70652ac5db3287dee (patch) | |
| tree | f7780dcc7e02474b114463c6c6b9348c26e6c80d /src/nvim/eval.c | |
| parent | 1e3e302dc2bdced563ecd2c3fb101af31f72b3df (diff) | |
| download | rneovim-a56f2d27e3c09aaae00a58a70652ac5db3287dee.tar.gz rneovim-a56f2d27e3c09aaae00a58a70652ac5db3287dee.tar.bz2 rneovim-a56f2d27e3c09aaae00a58a70652ac5db3287dee.zip | |
eval: Make dictionary watchers work with empty keys
Looks like dict_notifications_spec test used to depend on some state which
should not be preserved. Changed all `setup()` calls to `before_each()` and
added necessary state in addition to changes required to test empty keys.
Note: unit tests for tv_dict_watcher* are still needed.
Diffstat (limited to 'src/nvim/eval.c')
| -rw-r--r-- | src/nvim/eval.c | 6 | 
1 files changed, 3 insertions, 3 deletions
| diff --git a/src/nvim/eval.c b/src/nvim/eval.c index 80278cf3bb..bd88678f16 100644 --- a/src/nvim/eval.c +++ b/src/nvim/eval.c @@ -160,7 +160,6 @@ static char *e_missbrac = N_("E111: Missing ']'");  static char *e_listarg = N_("E686: Argument of %s must be a List");  static char *e_listdictarg = N_(      "E712: Argument of %s must be a List or Dictionary"); -static char *e_emptykey = N_("E713: Cannot use empty key for Dictionary");  static char *e_listreq = N_("E714: List required");  static char *e_dictreq = N_("E715: Dictionary required");  static char *e_stringreq = N_("E928: String required"); @@ -2112,8 +2111,9 @@ static char_u *get_lval(char_u *const name, typval_T *const rettv,        for (len = 0; ASCII_ISALNUM(key[len]) || key[len] == '_'; ++len)          ;        if (len == 0) { -        if (!quiet) -          EMSG(_(e_emptykey)); +        if (!quiet) { +          EMSG(_("E713: Cannot use empty key after .")); +        }          return NULL;        }        p = key + len; | 
