Closed Muzza closed 1 year ago
Can you check the file is in the workspace? The indenting relies on the parser and the parser only parses files in the workspace
I've added this task to parse files that are not in the workspace https://github.com/slynch8/10x/issues/1367
The file was in the workspace (a VS workspace, I was compiling it). So far today it has not happened. Either just restarting 10x, or possibly the cache files being deleted fixed it (Separate issue but I still have to regularly delete cache files or I get all sorts of parsing and search errors).
However, I do notice that Auto Indent has stopped working in .inl files too. The background colour of the file is different, which normally occurs when the file is not in the workspace, but this one is.
If I create a folder with a .c and .inl and then use 10x OpenFolder, I get the same thing. The .inl file has a different background colour in the text editor, and auto indent does not work.
I just noticed you have an error in your ParserExtensions
setting, there is no comma after the .inl setting. I think this was a bug that went in a while ago although I did automatically fix it in one of the updates.
I'm not sure what would cause the .c issue though. I've tried it with your settings file and couldn't get it. If it happens again can you use the ListworkspaceFiles
and CppParser.ListWorkspaceFiles
commands and check that the files are in the workspace files lists. It sounds like the parser doesn't know about the file for some reason.
Also, you shouldn't ever have to delete the cache anymore. You can use the ReparseFile
and ReparseAll
commands from the ctrl+shift+X
command panel or the menu.
But ideally you shouldn't ever have to do a manual reparse. I know it's really tricky to track these things down, but if you notice what sort of edit you are doing before it goes wrong then let me know. I need to track these issues down as a high priority - thanks.
I've not seen the .c issue again, and the .inl was fixed in the settings file. As for clearing the cache, this has always been an issue for me. Autocomplete will start degrading - giving terrible suggestions. Go to symbol will stop working. Sometimes I've had duplicate results appearing in the search panel, but some in grey (this one not recently though). Issue #554 means that autocomplete/go to symbol don't always work for me anyway, so often I assume it is just that until things get so bad that I try deleting the cache, and find everything generally improves. I've no idea what causes it - it just seems to happen over time as I edit files. Anyway this issue can be closed.
I'm sorry to hear that. It's usually very easy to fix once I find out what's causing it. It's usually because it's not re-parsing all the lines that it should be after an edit. I fixed a load of these bugs a while back, it was often things like it not parsing enough lines after typing an open and then a close brace, or adding a class just above an existing class, things like that. I'll keep a lookout for these problems.
Indenting in .c files has stopped working, See example:
My settings file: