0
0
mirror of https://github.com/vim/vim.git synced 2025-09-24 03:44:06 -04:00

patch 8.1.2012: more functions can be used as methods

Problem:    More functions can be used as methods.
Solution:   Make terminal functions usable as a method.  Fix term_getattr().
This commit is contained in:
Bram Moolenaar
2019-09-08 20:55:06 +02:00
parent ce90e36f59
commit 7ee80f7661
6 changed files with 155 additions and 63 deletions

View File

@@ -5055,6 +5055,8 @@ f_term_getattr(typval_T *argvars, typval_T *rettv)
if (name == NULL)
return;
if (attr > HL_ALL)
attr = syn_attr2attr(attr);
for (i = 0; i < sizeof(attrs)/sizeof(attrs[0]); ++i)
if (STRCMP(name, attrs[i].name) == 0)
{