~quf/visrc

8f9585002a84c8ac2706af5da16f3842cd028e89 — Lukas Himbert 1 year, 10 months ago 9dd29a1
fix behaviour when no file is opened
1 files changed, 6 insertions(+), 2 deletions(-)

M visrc.lua
M visrc.lua => visrc.lua +6 -2
@@ 29,8 29,12 @@ vis.events.subscribe(vis.events.WIN_OPEN, on_win_open)
-- Function that runs whenever a file is opened
function on_file_open(file)
  -- Run function for specific file names or suffixes
  filename = get_filename(file.path)
  suffix = get_suffix(filename)
  if file ~= nil and file.path ~= nil then
    filename = get_filename(file.path)
    suffix = get_suffix(filename)
  else
    suffix = ""
  end

  -- Override default tab settings
  if filename == "makefile" or filename == "Makefile" or filename == "GNUmakefile" then