struct attr_return *ar = container_of(ci->comm, struct attr_return,
rtn);
if (ci->num >= 0) {
- if (!ci->str)
- return Enoarg;
- as_add(ar, ci->num, ci->num2, ci->str);
+ if (ci->str)
+ as_add(ar, ci->num, ci->num2, ci->str);
} else
as_clear(ar, ci->num2, ci->str);
if (ci->str2)
elif char == "emsp":
char = " "
elif char == "rsquo":
- char = chr(8217)
+ char = chr(8217) # ’
+ elif char == "lsquo":
+ char = chr(8216) # ‘
+ elif char == "rdquo":
+ char = chr(8221) # ”
+ elif char == "ldquo":
+ char = chr(8220) # “
+ elif char == "copy":
+ char = chr(169) # ©
+ elif char == "reg":
+ char = chr(174) # ®
else:
char = "!" + char
doc.call('doc:set-attr', 1, st, "render:char", "%d:%s" % (len,char))
if str == "render:char":
w = str2.split(':')
attr = None
- if w[1][0] == '!' and w[1] != '!':
+ if w[1] and w[1][0] == '!' and w[1] != '!':
# not recognised, so highlight the name
attr = "fg:magenta-60,bold"
comm2("attr:callback", focus, int(w[0]), mark,
- attr, 120, w[1])
- # Don't show the htm entity description, just the rendering.
+ attr, 120, str2=w[1])
+ # Don't show the html entity description, just the rendering.
comm2("attr:callback", focus, int(w[0]), mark,
"hide", 60000)
if str == 'start-of-line':