mirror of
https://github.com/rkd77/elinks.git
synced 2024-12-04 14:46:47 -05: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:
parent
9959f4d788
commit
69f38bcbcc
@ -380,14 +380,14 @@ textarea_edit(int op, struct terminal *term_, struct form_state *fs_,
|
|||||||
goto free_and_return;
|
goto free_and_return;
|
||||||
}
|
}
|
||||||
|
|
||||||
unlink(fn);
|
|
||||||
|
|
||||||
if (file.length > fc_maxlength) {
|
if (file.length > fc_maxlength) {
|
||||||
done_string(&file);
|
done_string(&file);
|
||||||
textarea_editor = 0;
|
textarea_editor = 0;
|
||||||
goto free_and_return;
|
goto free_and_return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
unlink(fn);
|
||||||
|
|
||||||
mem_free(fs->value);
|
mem_free(fs->value);
|
||||||
fs->value = file.source;
|
fs->value = file.source;
|
||||||
fs->state = file.length;
|
fs->state = file.length;
|
||||||
|
Loading…
Reference in New Issue
Block a user