screen: retain the placewewant also when using an alternate speller
When using the default speller or the formatter, the placewewant is remembered. So it should be remembered too when the user specifies a different speller. (This behavior was inadvertently lost last year, in commit 82d737e.)master
parent
f85648db68
commit
d8031af030
|
@ -2927,6 +2927,7 @@ const char *do_alt_speller(char *tempfile_name)
|
||||||
{
|
{
|
||||||
int alt_spell_status;
|
int alt_spell_status;
|
||||||
size_t current_x_save = openfile->current_x;
|
size_t current_x_save = openfile->current_x;
|
||||||
|
size_t pww_save = openfile->placewewant;
|
||||||
ssize_t current_y_save = openfile->current_y;
|
ssize_t current_y_save = openfile->current_y;
|
||||||
ssize_t lineno_save = openfile->current->lineno;
|
ssize_t lineno_save = openfile->current->lineno;
|
||||||
struct stat spellfileinfo;
|
struct stat spellfileinfo;
|
||||||
|
@ -3075,6 +3076,7 @@ const char *do_alt_speller(char *tempfile_name)
|
||||||
/* Go back to the old position. */
|
/* Go back to the old position. */
|
||||||
goto_line_posx(lineno_save, current_x_save);
|
goto_line_posx(lineno_save, current_x_save);
|
||||||
openfile->current_y = current_y_save;
|
openfile->current_y = current_y_save;
|
||||||
|
openfile->placewewant = pww_save;
|
||||||
edit_update(STATIONARY);
|
edit_update(STATIONARY);
|
||||||
|
|
||||||
/* Stat the temporary file again, and mark the buffer as modified only
|
/* Stat the temporary file again, and mark the buffer as modified only
|
||||||
|
|
Loading…
Reference in New Issue