Problem: Vimscript functions return number to signal ok/error. Lua doesn't convert these to be falsey. Solution: Explicitly check if the return value is 0.