Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

bugfix for external_file links containing :linenumber #902

Closed
wants to merge 2 commits into from

Conversation

laher
Copy link
Contributor

@laher laher commented May 27, 2023

Currently when you link to an external file like {/ file.txt:123}, it opens a file named file.txt:123 instead of file.txt on line 123.

This addresses it, but there are 2 (related) workarounds here - see comments. I'd appreciate any help with eliminating them.

My first neorg PR. Ta

@laher
Copy link
Contributor Author

laher commented May 27, 2023

So it seems the workaround is needed (or some similar workaround), for now, due to a neovim inconsistency between nvim_command and nvim_cmd/nvim_parse_cmd.

vim.api.nvim_command('edit +1 index.html') -- this works
vim.api.nvim_cmd(vim.api.nvim_parse_cmd('edit +1 index.html',{}),{}) -- this opens "+1 index.html”

See neovim/neovim#23782 . Thanks @champignoom

@laher
Copy link
Contributor Author

laher commented May 27, 2023

Ha, it looks like this has been superceded by a broader fix in this PR: #903

I'll close this for now & see how it goes with the other PR

@laher laher closed this May 27, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant