Just tried Goland and it works the way you describe. Emacs is immediate restore. CLion and Goland are both JetBrains IDEs, so no surprise they use the same mechanism. FWIW, I like it and think it's preferable.