diff src/terminal.c @ 18033:049a7481d737 v8.1.2012

patch 8.1.2012: more functions can be used as methods Commit: https://github.com/vim/vim/commit/7ee80f766130f22598c928415c92ec612a8f18cf Author: Bram Moolenaar <Bram@vim.org> Date: Sun Sep 8 20:55:06 2019 +0200 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().
author Bram Moolenaar <Bram@vim.org>
date Sun, 08 Sep 2019 21:00:03 +0200
parents ba18f78c8529
children d1e77015f60b
line wrap: on
line diff
--- a/src/terminal.c
+++ b/src/terminal.c
@@ -5055,6 +5055,8 @@ f_term_getattr(typval_T *argvars, typval
     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)
 	{