Open saravanabalagi opened 5 years ago
Hmm, if you are able to propose a fix, and test on your machine, would be open to a PR! I have linux so I wouldn't be able to reproduce the error, but maybe others with Windows could.
I confirm that I faced the same bug in Ubuntu 18.04
@vsoch I'm happy to help, I just do not where to look! Where could this issue be coming from?
I was looking over the grammar (here) and it doesn't pop out immediately what might be causing it. Generally most of the match statements are to determine (when a file is open) if it should be highlighted, so the fact that "find" doesn't work sounds like a bug! A surefire way to figure it out is to go through the match statements, one by one, and remove each one, and restart the editor to see if the issue is still there. Once we figure out the statement, we can either determine if it's fix/ changeable, or if it's an Atom bug (and we will report it). How does that sound?
The grammars should be in .atom/packages/language-boxes/grammars
And here are the steps to try safe mode, debug, and then look for similar issues on the boards https://github.com/atom/language-python/issues/196
For info, this seems to be the error that's causing the Find issue:
(from ~/.atom/packages/language-singularity/lib/main.js
)
It could be due to there being no active text editor when running Search in Folder / Project Find.
Running on macOS Catalina (10.15.1)
I’d like to see this reproduced on a different version of Mac OS or Linux before changing anything - I know for a fact there were a lot of issues with Catalina.
Hi @vsoch
I've replicated the issue in a fresh Atom install running on Ubuntu 18.04.3 LTS:
There's a brief (and somewhat old!) discussion of a similar issue here: https://discuss.atom.io/t/cannot-get-active-text-editor-in-tests/24285 but if I understand correctly the bit around line 36 probably just needs wrapping in an if
(or some other logic) statement for cases where there's no active editor window (which will always be the case when doing a project-level search). I don't know js, else I'd do a PR!
Thank you this is hugely helpful! I'm not a javascript ninja, but I'll take a look and see if I can put together something to test.
This seems to be breaking atom's find feature on Windows (Not sure on other OSes):