Stop the appending #L<number> when nothing is selected
This commit is contained in:
parent
8b7778d4ea
commit
faf75f3e0a
3 changed files with 24 additions and 15 deletions
|
|
@ -6,10 +6,10 @@ vim.g.openingh = true
|
|||
local openingh = require("openingh")
|
||||
|
||||
vim.api.nvim_create_user_command("OpenInGHFile", function(opts)
|
||||
if opts.range == 0 or opts.range == 1 then
|
||||
openingh.openFile()
|
||||
else
|
||||
openingh.openFile(opts.line1, opts.line2)
|
||||
if opts.range == 0 then -- Nothing was selected
|
||||
openingh.open_file()
|
||||
else -- Current line or block was selected
|
||||
openingh.open_file(opts.line1, opts.line2)
|
||||
end
|
||||
end, {
|
||||
range = true,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue