4 From: Bram Moolenaar <Bram@moolenaar.net>
6 Content-Type: text/plain; charset=UTF-8
7 Content-Transfer-Encoding: 8bit
11 Problem: synIDattr() cannot return the font.
12 Solution: Support the "font" argument. (Christian Brabandt)
13 Files: runtime/doc/eval.txt, src/eval.c, src/syntax.c
16 *** ../vim-7.2.388/runtime/doc/eval.txt 2010-01-19 15:51:29.000000000 +0100
17 --- runtime/doc/eval.txt 2010-03-10 12:52:12.000000000 +0100
21 the color, cterm: color number as a string,
23 "bg" background color (as with "fg")
24 + "font" font name (only available in the GUI)
26 "sp" special color (as with "fg") |highlight-guisp|
27 "fg#" like "fg", but for the GUI and the GUI is
28 running the name in "#RRGGBB" form
32 "italic" "1" if italic
33 "reverse" "1" if reverse
34 "inverse" "1" if inverse (= reverse)
35 + "standout" "1" if standout
36 "underline" "1" if underlined
37 "undercurl" "1" if undercurled
39 *** ../vim-7.2.388/src/eval.c 2010-02-24 15:47:58.000000000 +0100
40 --- src/eval.c 2010-03-10 12:54:27.000000000 +0100
43 p = highlight_has_attr(id, HL_BOLD, modec);
46 ! case 'f': /* fg[#] */
47 p = highlight_color(id, what, modec);
51 p = highlight_has_attr(id, HL_BOLD, modec);
54 ! case 'f': /* fg[#] or font */
55 p = highlight_color(id, what, modec);
58 *** ../vim-7.2.388/src/syntax.c 2010-03-02 17:50:30.000000000 +0100
59 --- src/syntax.c 2010-03-10 13:05:39.000000000 +0100
63 highlight_color(id, what, modec)
65 ! char_u *what; /* "fg", "bg", "sp", "fg#", "bg#" or "sp#" */
66 int modec; /* 'g' for GUI, 'c' for cterm, 't' for term */
68 static char_u name[20];
71 highlight_color(id, what, modec)
73 ! char_u *what; /* "font", "fg", "bg", "sp", "fg#", "bg#" or "sp#" */
74 int modec; /* 'g' for GUI, 'c' for cterm, 't' for term */
76 static char_u name[20];
84 if (id <= 0 || id > highlight_ga.ga_len)
87 ! if (TOLOWER_ASC(what[0]) == 'f')
90 ! else if (TOLOWER_ASC(what[0]) == 's')
94 /* return #RRGGBB form (only possible when GUI is running) */
95 ! if (gui.in_use && what[1] && what[2] == '#')
106 if (id <= 0 || id > highlight_ga.ga_len)
109 ! if (TOLOWER_ASC(what[0]) == 'f' && TOLOWER_ASC(what[1]) == 'g')
112 ! else if (TOLOWER_ASC(what[0]) == 'f' && TOLOWER_ASC(what[1]) == 'o'
113 ! && TOLOWER_ASC(what[2]) == 'n' && TOLOWER_ASC(what[3]) == 't')
115 ! else if (TOLOWER_ASC(what[0]) == 's' && TOLOWER_ASC(what[1]) == 'p')
117 + else if (!(TOLOWER_ASC(what[0]) == 'b' && TOLOWER_ASC(what[1]) == 'g'))
121 + /* return font name */
123 + return HL_TABLE()[id - 1].sg_font_name;
125 /* return #RRGGBB form (only possible when GUI is running) */
126 ! if (gui.in_use && what[2] == '#')
133 return (HL_TABLE()[id - 1].sg_gui_sp_name);
134 return (HL_TABLE()[id - 1].sg_gui_bg_name);
141 *** ../vim-7.2.388/src/version.c 2010-03-10 13:19:28.000000000 +0100
142 --- src/version.c 2010-03-10 13:33:25.000000000 +0100
146 { /* Add new patch number below this line */
152 WOMAN: Dennis, there's some lovely filth down here. Oh -- how d'you do?
153 ARTHUR: How do you do, good lady. I am Arthur, King of the Britons.
154 Who's castle is that?
155 WOMAN: King of the who?
156 The Quest for the Holy Grail (Monty Python)
158 /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\
159 /// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
160 \\\ download, build and distribute -- http://www.A-A-P.org ///
161 \\\ help me help AIDS victims -- http://ICCF-Holland.org ///