-
Notifications
You must be signed in to change notification settings - Fork 79
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
Fix search text in jars and add highlighting #918
Conversation
@Arthurm1 Tested it locally but it seems that there is some issues. |
76ee30b
to
f501d53
Compare
@dos65 This should be better/faster - it uses the The issue was that when you open a text document (even when it's not shown) then |
@Arthurm1 oh, yep. I remembered that we already had this issue with didOpen. So, I think the best solution would be to extend the Location structure in response from the server. |
@kpodsiad You're a typescript expert - how do I solve this issue with ESLint - it wants var fileContent;
if (uri.scheme == "jar") {
fileContent = await metalsFileProvider.provideTextDocumentContent(uri);
} else {
const readData = await workspace.fs.readFile(uri);
fileContent = Buffer.from(readData).toString("utf8");
} |
You're too kind @Arthurm1! :D
|
f501d53
to
1e0726d
Compare
@dos65 I agree - extending the I saw that there is a VSCode API proposal for find text in files API with what looks like a workable result class with preview but I've no idea how long these things stay as a proposal of if there is any timeline for them. The issue hasn't changed for a while. This might also be solved by implementing the FileSystemProvider API for jars - which should put all the searching in VSCode's hands. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@Arthurm1 tested the recent changes locally - works great!
I'm fine with the current solution as it works fast enough.
Thx for the fix!
I saw that there is a VSCode API proposal for find text in files API with what looks like a workable result class with preview but I've no idea how long these things stay as a proposal of if there is any timeline for them. The microsoft/vscode#59924 hasn't changed for a while.
Yep, I've seen it too. The only we can do is to wait and switch on it after it become stable.
This might also be solved by implementing the FileSystemProvider API for jars - which should put all the searching in VSCode's hands.
Some time ago I was checking vscode sources. From what I found, its native search doesn't work with custom FileSystems provided by extension.
Quick fix for searching text in jars when using virtual documents.
Adds highlighting to search text. E.g. here is a search for Cipher...
@dos65 I felt guilty I broke your stuff