diff options
| author | Marc André Tanner <mat@brain-dump.org> | 2016-03-08 13:48:32 +0100 |
|---|---|---|
| committer | Marc André Tanner <mat@brain-dump.org> | 2016-03-08 13:48:32 +0100 |
| commit | 19de55089e69605186a61da633809d75db67b0d5 (patch) | |
| tree | ca1c8877e67411f2e3b82b4375decd6af40fee9c | |
| parent | 73dda181924e869b298e026981613734bebdef7b (diff) | |
| download | vis-19de55089e69605186a61da633809d75db67b0d5.tar.gz vis-19de55089e69605186a61da633809d75db67b0d5.tar.xz | |
vis: handle lexer module load failure even more gracefully
Close #197
| -rw-r--r-- | visrc.lua | 5 |
1 files changed, 3 insertions, 2 deletions
@@ -1,9 +1,10 @@ local ok, msg = pcall(function() + vis.lexers = {} vis.lexers = require('lexer') end) if not ok then - vis:info('WARNING: could not load lexer module') + vis:info('WARNING: could not load lexer module, is lpeg installed?') end vis.events = {} @@ -188,7 +189,7 @@ vis.events.win_open = function(win) if #filename >= #pattern then local s, e = string.find(filename, pattern, -#pattern, true) if s ~= e and e == #filename then - vis:command('set syntax '.. lang) + win.syntax = lang return; end end |
