aboutsummaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorRobin Jarry <robin@jarry.cc>2023-03-02 23:50:50 +0100
committerRobin Jarry <robin@jarry.cc>2023-03-08 00:42:51 +0100
commit21d0f3381e642764e8778bc909cb1fdb4cb5e7ce (patch)
tree0dfeff93bcbd51ebe26f6ef94d4dd4c3dbd30ef2 /lib
parentab8f433e1739f0c823809ddab192693e875d75df (diff)
downloadaerc-21d0f3381e642764e8778bc909cb1fdb4cb5e7ce.tar.gz
templates: avoid error when using .Style with unknown style name
When using {{.Style "foo" bar}} and "foo" is not defined in the styleset under the [user] section, there is an obscure error: template: column-right:1:18: executing "column-right" at <.Style>: error calling Style: runtime error: invalid memory address or nil pointer dereference Which is most of the time truncated and can only be read in logs. Referencing an undefined style is not a serious problem. Return the default tcell style in that case and avoid the error. Signed-off-by: Robin Jarry <robin@jarry.cc> Acked-by: Tim Culverhouse <tim@timculverhouse.com>
Diffstat (limited to 'lib')
0 files changed, 0 insertions, 0 deletions