Commit f400c232 authored by David Lawrence Ramsey's avatar David Lawrence Ramsey
Browse files

tweak do_alt_speller() to remove the assumption that the file always

ends in a magicline


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@3106 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
No related merge requests found
Showing with 5 additions and 3 deletions
+5 -3
...@@ -39,8 +39,8 @@ CVS code - ...@@ -39,8 +39,8 @@ CVS code -
do_help() (all moved to help.c). (DLR) do_help() (all moved to help.c). (DLR)
- Tweak a few functions to remove the assumption that the file - Tweak a few functions to remove the assumption that the file
always ends in a magicline. Changes to do_cut_till_end(), always ends in a magicline. Changes to do_cut_till_end(),
open_buffer(), read_file(), write_file(), do_last_line(), and open_buffer(), read_file(), write_file(), do_last_line(),
do_wordlinechar_count(). (DLR) do_alt_speller(), and do_wordlinechar_count(). (DLR)
- Tweak a few functions to rely on fileage and filebot instead - Tweak a few functions to rely on fileage and filebot instead
of NULL for their checks to detect the top or bottom of the of NULL for their checks to detect the top or bottom of the
file. Changes to cut_line(), cut_to_eol(), do_page_up(), file. Changes to cut_line(), cut_to_eol(), do_page_up(),
......
...@@ -1953,10 +1953,12 @@ const char *do_alt_speller(char *tempfile_name) ...@@ -1953,10 +1953,12 @@ const char *do_alt_speller(char *tempfile_name)
initialize_buffer_text(); initialize_buffer_text();
/* Reload the temp file. Open it, read it into the current buffer, /* Reload the temp file. Open it, read it into the current buffer,
* and move back to the first line of the buffer. */ * and move back to the beginning of the first line of the
* buffer. */
open_file(tempfile_name, FALSE, &f); open_file(tempfile_name, FALSE, &f);
read_file(f, tempfile_name); read_file(f, tempfile_name);
openfile->current = openfile->fileage; openfile->current = openfile->fileage;
openfile->current_x = 0;
#ifndef NANO_SMALL #ifndef NANO_SMALL
if (old_mark_set) { if (old_mark_set) {
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment