Scintilla 5 on Mac seems to make the assumption that it is the only thing the app will do and it will be instantiated before the app becomes active for the first time, so a new Scintilla instance is inactive by default and will not activate until it gets applicationDidBecomeActive. Scintilla 4 did not have this behaviour.
I guess this works just fine for SciTE, but I think this assumption doesn't hold for other applications and the default state should be active. Otherwise creating any text editor instance in a running and already-active application requires an explicit applicationDidBecomeActive sent to the scintilla nsview. Not doing so results in the Scintilla instance being stuck in the inactive state until you deactivate and reactivate the entire app.
Fix is to change line 419 of ScintillaCocoa.mm
isActive = true; // was false
Shouldn't it check if the application is active? Scintilla views could be created by an inactive application.
Yes, it should. That would be a pretty rare use case (to instantiate a new window in the background and not come to the front immediately) but somebody might have it.
This worked for me in the active case, I don't have a test case for instantiating while inactive. The active property was new in NSApp in Yosemite
Committed change as [92b29d]. No guard clause as isActive was available much earlier than 10.10 with the first mention on StackExchange in 2009.
Related
Commit: [92b29d]