-
Notifications
You must be signed in to change notification settings - Fork 0
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
Error trying to delete note with command, delete icon does nothing. #6
Comments
Thanks for the bug report. Would you be able to provide your OS? I suspect it may be a problem with Windows. |
Windows 11 Pro |
I get the same result on my other machine: |
Thanks again. I'll let you know as soon as I've had a chance to take a look. |
Your welcome |
Did some refactoring, will publish an update soon. Hopefully this resolves your issue |
Patrick, Please let me know if I can provide further information. |
Sorry, my response wasn't exactly clear, I made some changes but didn't release them yet. I just published v4.0.0 but there's no guarantee it fixes this issue. I believe it has to do with Windows paths, which unfortunately I don't have a way of testing directly since I don't have a Windows machine. As far as the error message, when the delete link is clicked, the extension opens the noted document and runs editor commands to delete the line. This is why the error is related to registerCommand("linenoteplus.removeNote", async (uuid?: string) => {
const _uuid = uuid || Note.matchUuidOnActiveLine(getEditor());
if (_uuid) {
// remove specified note (when invoked from the hover text)
const note = getNoteCache().get(_uuid);
if (note.line > -1) {
const uri = vscode.Uri.parse(note.targetPath);
const document = await vscode.workspace.openTextDocument(uri);
const line = document.lineAt(note.line);
const edit = new vscode.WorkspaceEdit();
edit.delete(uri, line.rangeIncludingLineBreak);
vscode.workspace.applyEdit(edit);
}
await note.remove();
decorateDebounce();
}
}), If it still doesn't work with the refactored v4.0.0, I can take a deeper dive. Thank you for your investigation. |
I tried version 4 and got the error ERR cannot open d:%5CSaved%5CJunk%5Cjunk1.txt. Detail: Unable to resolve resource d:%5CSaved%5CJunk%5Cjunk1.txt: Error: cannot open d:%5CSaved%5CJunk%5Cjunk1.txt. Detail: Unable to resolve resource d:%5CSaved%5CJunk%5Cjunk1.txt I am willing to do a screen share using Live Share or webEx if you want to remotely debug my PC... |
No worries, I have an old windows machine I'll boot up and give it a shot with |
I look forward to a new version. Thanks! |
Thank you for your patience. I wasn't able to test it on my windows machine, but I added some error logging so I can better track down what's happening. Would you mind trying again and then pasting the error from the |
Thanks. |
When I execute the command "Line Note Plus: Remove note at the current position (Delete Note)", I get the following error:
[Window Title]
Visual Studio Code
[Main Instruction]
Command 'Line Note Plus: Remove note at current position (Delete Note)' resulted in an error
[Content]
cannot open d:%5CGitHub%5CTest%5CPGP%5CApplicationSettings.cs. Detail: Unable to resolve resource d:%5CGitHub%5CTest%5CPGP%5CApplicationSettings.cs
[OK]
It doesn't seem to matter where on the line I put the cursor, or whether the cursor is on the comment line that is added or the line immediately below that is being documented, the result is the same.
Holding the control key down and clicking the waste bin icon does nothing. I can manually delete the comment line.
The text was updated successfully, but these errors were encountered: