mirror of
git://git.sv.gnu.org/nano.git
synced 2024-12-15 07:12:38 +03:00
don't let remove_magicline() remove the magicline if it's the only line
in the file git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2077 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
This commit is contained in:
parent
eb5d8383c8
commit
29f446ec40
@ -444,7 +444,7 @@ void new_magicline(void)
|
||||
/* Remove the magicline from filebot, if there is one. */
|
||||
void remove_magicline(void)
|
||||
{
|
||||
if (filebot->data[0] == '\0') {
|
||||
if (filebot->data[0] == '\0' && filebot->prev != NULL) {
|
||||
filebot = filebot->prev;
|
||||
free_filestruct(filebot->next);
|
||||
filebot->next = NULL;
|
||||
|
Loading…
Reference in New Issue
Block a user