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
Этот коммит содержится в:
родитель
eb5d8383c8
Коммит
29f446ec40
@ -444,7 +444,7 @@ void new_magicline(void)
|
|||||||
/* Remove the magicline from filebot, if there is one. */
|
/* Remove the magicline from filebot, if there is one. */
|
||||||
void remove_magicline(void)
|
void remove_magicline(void)
|
||||||
{
|
{
|
||||||
if (filebot->data[0] == '\0') {
|
if (filebot->data[0] == '\0' && filebot->prev != NULL) {
|
||||||
filebot = filebot->prev;
|
filebot = filebot->prev;
|
||||||
free_filestruct(filebot->next);
|
free_filestruct(filebot->next);
|
||||||
filebot->next = NULL;
|
filebot->next = NULL;
|
||||||
|
Загрузка…
x
Ссылка в новой задаче
Block a user