diff options
Diffstat (limited to 'init.lua')
| -rw-r--r-- | init.lua | 10 |
1 files changed, 4 insertions, 6 deletions
@@ -25,12 +25,10 @@ vis.events.subscribe(vis.events.WIN_OPEN, function(win) -- fire a new WIN_OPEN event because we changed the file vis.events.emit(vis.events.WIN_OPEN, win) - -- After the other handlers ran we set the position. - vis:feedkeys(line.."G") - - if column then - vis:feedkeys(tostring(column) .. "l") - end + -- After the other handlers ran we set the position + column = column or 1 + local pos = win.file:pos_by_linecol(line, column) + vis.win.selection.pos = pos -- Stop handling the old FILE_OPEN event since we changed the file and emitted -- a new WIN_OPEN event |
