aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMatěj Cepl <mcepl@cepl.eu>2020-05-11 23:49:52 +0200
committerMatěj Cepl <mcepl@cepl.eu>2020-05-11 23:49:52 +0200
commit5fdbde2d279a235767c38cc74619441138f09153 (patch)
tree8a76b7445f69050d2d4244715367e0aff2c4a18e
parent04861fba1f56142b9d2ecf7998e2f29a199db9b8 (diff)
downloadvis-open_rej-5fdbde2d279a235767c38cc74619441138f09153.tar.gz
Fix use of vis API.
-rw-r--r--init.lua8
1 files changed, 3 insertions, 5 deletions
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