-
Notifications
You must be signed in to change notification settings - Fork 16
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
[BUG] Every first screenshot fails with "node code selected" #103
Comments
Hi @willdavidow, thx for this issue reporting, that's interesting bug but I can't reproduce on my machine.
The "first attempt" refer to the first screenshot taken after first CodeSnap was installed or the first screenshot taken after opening nvim every time? |
It's every time after closing and reopening |
What version of your Neovim? If you enter command instead of use hotkey, did it works? |
i have the same behaviour upon the couple of first time , when i opend nvim ( LAZYVIM config here) with command line it work like a charm
could be related to Lazy event ?? EDIT: |
I'm running Running the command directly does work just fine. |
I have the same issue, it seems to be a problem with nvim. After starting nvim, the return value of this command is empty. Only after the second execution does the command produce content: vim.fn.getline("'<", "'>") Update: '<,'>lua local lines = vim.fn.getline("'<", "'>"); for _, line in ipairs(lines) do print(line) end |
I encountered the same issue, but it appears I've found a solution. It seems that the markers To resolve this, I simply adjusted my configuration to exit visual mode before calling CodeSnap. Executing the following command: As this bug arises due to the plugin attempting to retrieve the last selection markers rather than the current selection, it could imply that the snapshot result consistently lags by one. However, that requires further verification. |
Work as expected, but for me it's kinda of a |
Just installed the plugin and everything works fine for the most part, but it seems the first attempt always fails when trying to generate screenshots to both the clipboard or the save path.
Steps to reproduce
Open
nvim
and any fileSelect code and attempt to generate screenshot
Result
no code is selected
Expected
Screenshot generated to either clipboard or save path
When I de-select and re-select the exact code, in the exact same way, everything works fine.. it's just that first attempt that doesn't work.
Screen.Recording.2024-05-09.at.9.20.52.AM.mov
The text was updated successfully, but these errors were encountered: