<p dir="auto">This has lost so much work in the las few days. I can't find a pattern: it happens in different file types and there doesn't appear to be any trigger, other than Undo.</p>
<p dir="auto">I hit (Cmd-Z, with the keyboard), and occasionally and randomly it takes the file back to some previous state, but it's clearly NOT the last saved state. I believe it's the originally opened state.</p>
<p dir="auto">If I'm not watching close, it'll happen and I miss it, then continue editing.</p>
<p dir="auto">It leaves the file marked as "dirty", so saving after this happens will overwrite any changes since the state it restored it to, which in one case was a few days ago, so saving often does not help.</p>
<p dir="auto">Version 0.120.0 on OS X Mavericks.</p>
<p dir="auto">The default keyboard mapping for <code class="notranslate">editor:checkout-head-revision</code> is <kbd>Cmd+Alt+Z</kbd> or <kbd>Ctrl+Alt+Z</kbd> on Windows/Linux. This is pretty easy to fat-finger and there is no confirmation dialog. Also, the Redo command doesn't restore what was lost ... but Undo does ... which is confusing when this command is accidentally triggered.</p>
<p dir="auto">We should probably display a confirmation dialog for this command to be certain it is what the user wants and since data loss (or perceived data loss) can result.</p>
<p dir="auto">See Discuss topics:</p>
<ul dir="auto">
<li><a href="https://discuss.atom.io/t/sometimes-s-or-z-does-buu-buu/11186?u=leedohm" rel="nofollow">https://discuss.atom.io/t/sometimes-s-or-z-does-buu-buu/11186?u=leedohm</a></li>
<li><a href="https://discuss.atom.io/t/a-seriously-nasty-problem/11286" rel="nofollow">https://discuss.atom.io/t/a-seriously-nasty-problem/11286</a></li>
<li><a href="https://discuss.atom.io/t/undo-redo-broken/10658" rel="nofollow">https://discuss.atom.io/t/undo-redo-broken/10658</a></li>
<li><a href="https://discuss.atom.io/t/undo-defect-undo-make-my-file-back-to-status-when-i-open-it/10512" rel="nofollow">https://discuss.atom.io/t/undo-defect-undo-make-my-file-back-to-status-when-i-open-it/10512</a></li>
</ul>