Preventing a segfault when spellchecking a marked region

and nonewlines isn't set.


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@5298 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
This commit is contained in:
Benno Schulenberg
2015-07-13 18:04:05 +00:00
parent 42f307ef75
commit 5e53c6ee9e
2 changed files with 5 additions and 0 deletions

View File

@@ -420,6 +420,9 @@ void replace_buffer(const char *filename)
/* If opening the file succeeded, read it in. */
if (descriptor > 0)
read_file(f, descriptor, filename, FALSE, TRUE);
/* Put current at a place that is certain to exist. */
openfile->current = openfile->fileage;
}
#endif /* !DISABLE_SPELLER */