atom-build icon indicating copy to clipboard operation
atom-build copied to clipboard

Active Target is lost when closing window

Open TheStealthReporter opened this issue 8 years ago • 3 comments

Every time I select an active target, close all Atom windows and open my project/session again, I have to manually reselect the old active target (it jumps back to default).

My expected behaviour is that this value is restored so I can pick up the work the way I left it.

I encountered this problem both with Make and Cargo (though it probably occurs with other build providers as well).

TheStealthReporter avatar May 19 '16 08:05 TheStealthReporter

To allow this we'd need unique ids for targets, because the list of targets may change between reloads. Maybe we could hash the target's settings...

oli-obk avatar May 19 '16 09:05 oli-obk

Yes, this is "caused" by the core project, so the issue is correct here.

What could be possible to do is store the state when the package is deactivated (e.g. the name of the current active target) and restore that when the package is activated after the targets have been refreshed.

noseglid avatar May 19 '16 09:05 noseglid

I would like to see this added as well.

As an alternative or stop-gap it would also be nice to be able to set a default target on a per-build-package basis. So for build-gradle I might select build as my default where someone else might select classes. For build-rake I might want to select a different default.

If the default target didn't exist you could fall back to the existing behavior.

jfs avatar Jul 07 '16 21:07 jfs