1
0
mirror of https://github.com/rkd77/elinks.git synced 2024-07-16 15:04:37 -04:00

After editing a textarea in an external editor, do not unlink the file

if it was too large to fit into the textarea.
This commit is contained in:
Miciah Dashiel Butler Masters 2005-12-18 16:02:37 +00:00 committed by Miciah Dashiel Butler Masters
parent 9959f4d788
commit 69f38bcbcc

View File

@ -380,14 +380,14 @@ textarea_edit(int op, struct terminal *term_, struct form_state *fs_,
goto free_and_return;
}
unlink(fn);
if (file.length > fc_maxlength) {
done_string(&file);
textarea_editor = 0;
goto free_and_return;
}
unlink(fn);
mem_free(fs->value);
fs->value = file.source;
fs->state = file.length;