aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/eval.c
diff options
context:
space:
mode:
authorJan Edmund Lazo <jan.lazo@mail.utoronto.ca>2019-07-01 14:02:48 -0400
committerJan Edmund Lazo <jan.lazo@mail.utoronto.ca>2019-07-15 23:07:28 -0400
commit263d62f628ee611c883b216bd9098484293d46a0 (patch)
tree76b0f65213dcc9901a4250035f682640c35f635f /src/nvim/eval.c
parent990f99658bb060ac2ac4e1cff2966eab1e96f9d9 (diff)
downloadrneovim-263d62f628ee611c883b216bd9098484293d46a0.tar.gz
rneovim-263d62f628ee611c883b216bd9098484293d46a0.tar.bz2
rneovim-263d62f628ee611c883b216bd9098484293d46a0.zip
vim-patch:8.1.0495: :filter only supports some commands
Problem: :filter only supports some commands. Solution: Add :filter support for more commands. (Marcin Szamotulski, closes vim/vim#2856) https://github.com/vim/vim/commit/f86db78fed78541cefdb706e4779ce5ae9ca7820
Diffstat (limited to 'src/nvim/eval.c')
-rw-r--r--src/nvim/eval.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/src/nvim/eval.c b/src/nvim/eval.c
index 6a5149614b..0e60f7a35a 100644
--- a/src/nvim/eval.c
+++ b/src/nvim/eval.c
@@ -1782,6 +1782,15 @@ static void list_hashtable_vars(hashtab_T *ht, const char *prefix, int empty,
if (!HASHITEM_EMPTY(hi)) {
todo--;
di = TV_DICT_HI2DI(hi);
+ char buf[IOSIZE];
+
+ // apply :filter /pat/ to variable name
+ xstrlcpy(buf, prefix, IOSIZE - 1);
+ xstrlcat(buf, (char *)di->di_key, IOSIZE);
+ if (message_filtered((char_u *)buf)) {
+ continue;
+ }
+
if (empty || di->di_tv.v_type != VAR_STRING
|| di->di_tv.vval.v_string != NULL) {
list_one_var(di, prefix, first);
@@ -20851,6 +20860,9 @@ void ex_function(exarg_T *eap)
if (!HASHITEM_EMPTY(hi)) {
--todo;
fp = HI2UF(hi);
+ if (message_filtered(fp->uf_name)) {
+ continue;
+ }
if (!func_name_refcount(fp->uf_name)) {
list_func_head(fp, false);
}