mirror of
https://github.com/rkd77/elinks.git
synced 2024-08-26 21:54:50 -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:
parent
9959f4d788
commit
69f38bcbcc
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user