From 5fdbde2d279a235767c38cc74619441138f09153 Mon Sep 17 00:00:00 2001 From: Matěj Cepl Date: Mon, 11 May 2020 23:49:52 +0200 Subject: Fix use of vis API. --- init.lua | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) (limited to 'init.lua') diff --git a/init.lua b/init.lua index 85f3e8d..d94b8e9 100644 --- a/init.lua +++ b/init.lua @@ -8,12 +8,10 @@ function file_exists(name) end end -function open_rej_file() - local win = vis.win - local file = win.file - local rejfile = file.path .. '.rej' +function open_rej_file(file) + local rejfile = file .. '.rej' if file_exists(rejfile) then - vis:command('ed ' .. rejfile) + vis:command('open ' .. rejfile) end end -- cgit