I'd like to make it so that no matter how many time I hit Undo, the active/highlighted layer will not change (unless of course it is deleted by the undo action). I understand this may not be possible because the undo action would be altering things in inactive (is that the right term?) layers.
This has caused problems for me before causing me to accidentally paint on the wrong layer.
This isn't exactly on subject, but this is something that helps, I've been using smartobjects to make layers un-editable. Basically keeping all my layers as smartobjects until i need to edit them, turning off the smartobject, then turning it back on when i'm done. Its pretty simple and it keeps me from drawing on the wrong layer.