This prevents seeing a λ or other non a-z (but letter characters according
to the %a character class) as the start of a word.
-- Take a single word from str, if posible. Returns the rest of the string and
-- the word taken.
function buffers.visualizers.lam.take_word(str)
- res, newstr = utf.match(str, "^(%a[%a%d_]+)(.*)")
+ -- A word must always start with a-z (in particular, λ is not a valid
+ -- start of a word).
+ res, newstr = utf.match(str, "^([a-z][%a%d_]+)(.*)")
return res, newstr or str
end