feat(commands): add :Preview open subcommand (#6)
Problem: after closing a viewer, there was no way to re-open the last compiled output without recompiling. Solution: track the most recent output file per buffer in a `last_output` table that persists after compilation finishes. Add `compiler.open()`, `M.open()`, and wire it into the command dispatch.
This commit is contained in:
parent
0b16ff7178
commit
cfe101c6c4
5 changed files with 76 additions and 2 deletions
|
|
@ -35,6 +35,13 @@ describe('commands', function()
|
|||
end)
|
||||
end)
|
||||
|
||||
it('does not error on :Preview open', function()
|
||||
require('preview.commands').setup()
|
||||
assert.has_no.errors(function()
|
||||
vim.cmd('Preview open')
|
||||
end)
|
||||
end)
|
||||
|
||||
it('does not error on :Preview toggle with no provider', function()
|
||||
require('preview.commands').setup()
|
||||
assert.has_no.errors(function()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue