<table><tr><td style="">dfaure added a comment.
</td><a style="text-decoration: none; padding: 4px 8px; margin: 0 8px 8px; float: right; color: #464C5C; font-weight: bold; border-radius: 3px; background-color: #F7F7F9; background-image: linear-gradient(to bottom,#fff,#f1f0f1); display: inline-block; border: 1px solid rgba(71,87,120,.2);" href="https://phabricator.kde.org/D14890">View Revision</a></tr></table><br /><div><div><p>I just tested how vim handles this. No QSaveFile-like behaviour (direct write, says strace), and in case of partition full, this error message appears:</p>
<p>"myfile" E514: write error (file system full?)</p>
<div style="margin: 16px 0;
padding: 12px;
border-left: 3px solid #f1c40f;
background: #fdf5d4;"><span class="remarkup-note-word">WARNING:</span> Original file may be lost or damaged
don't quit the editor until the file is successfully written!</div>
<p>That's the beautiful difference between a text editor and a program saving a config file or whatever else: you can leave the editor open so the data is not lost!<br />
I recommend that kate implements something similar, if not already done.</p>
<p>For the curious, here's how I investigated vim's behaviour without filling my real partition:</p>
<div class="remarkup-code-block" style="margin: 12px 0;" data-code-lang="text" data-sigil="remarkup-code-block"><pre class="remarkup-code" style="font: 11px/15px "Menlo", "Consolas", "Monaco", monospace; padding: 12px; margin: 0; background: rgba(71, 87, 120, 0.08);">cd /tmp
dd if=/dev/zero of=loopback count=200
sudo mkfs.ext2 loopback
sudo mount -o loop loopback mnt
sudo chown $USER:$GID mnt
cd mnt
yes > myfile
# (this ends with "No space left on device")
vim myfile
# elsewhere: strace -e file -p `pidof vim`
in vim, paste a whole bunch of additional text into the file, save</pre></div></div></div><br /><div><strong>REPOSITORY</strong><div><div>R39 KTextEditor</div></div></div><br /><div><strong>REVISION DETAIL</strong><div><a href="https://phabricator.kde.org/D14890">https://phabricator.kde.org/D14890</a></div></div><br /><div><strong>To: </strong>cullmann, dhaumann<br /><strong>Cc: </strong>dfaure, kwrite-devel, kde-frameworks-devel, michaelh, kevinapavew, ngraham, bruns, demsking, cullmann, sars, dhaumann<br /></div>