Initialize totsize in files.c:new_file() and let do_gotopos keep current position when invoking the alternate speller (DLR)
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@799 35c25a1d-7b9e-4130-9fde-d3aeb78583b8master
parent
2bef18210a
commit
1b3381bee8
|
@ -24,10 +24,14 @@ CVS code -
|
|||
command is Meta-] (hope you dont mind since I already sold off
|
||||
Meta-O to the MacOS file code Ken...) Fixes to bracket_msg
|
||||
by DLR.
|
||||
- Call do_gotopos from do_alt_spell() to keep position
|
||||
consistent when invoking alt speller (DLR).
|
||||
- files.c:
|
||||
do_writeout()
|
||||
- Expanded strings to not use %s and ?: to determine
|
||||
write/append string to be nice to translators.
|
||||
new_file()
|
||||
- Initialize totsize (DLR).
|
||||
- nano.c:
|
||||
main()
|
||||
- Added vars oldcurrent and oldcurrent_x to check whether cursor
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* config.h.in. Generated automatically from configure.in by autoheader. */
|
||||
/* config.h.in. Generated automatically from configure.in by autoheader 2.13. */
|
||||
|
||||
/* Define if using alloca.c. */
|
||||
#undef C_ALLOCA
|
||||
|
|
1
files.c
1
files.c
|
@ -78,6 +78,7 @@ void new_file(void)
|
|||
editbot = fileage;
|
||||
current = fileage;
|
||||
totlines = 1;
|
||||
totsize = 0;
|
||||
|
||||
#ifdef ENABLE_MULTIBUFFER
|
||||
/* if there aren't any entries in open_files, create the entry for
|
||||
|
|
9
nano.c
9
nano.c
|
@ -1526,7 +1526,7 @@ int do_int_speller(char *tempfile_name)
|
|||
/* External spell checking */
|
||||
int do_alt_speller(char *file_name)
|
||||
{
|
||||
int alt_spell_status, y_cur = current_y;
|
||||
int alt_spell_status, x_cur = current_x, y_cur = current_y, pww_cur = placewewant;
|
||||
pid_t pid_spell;
|
||||
char *ptr;
|
||||
long lineno_cur = current->lineno;
|
||||
|
@ -1579,10 +1579,9 @@ int do_alt_speller(char *file_name)
|
|||
global_init(1);
|
||||
open_file(file_name, 0, 1);
|
||||
|
||||
/* go back to the old line while keeping the same position, mark the
|
||||
file as modified, and make sure that the titlebar is refreshed */
|
||||
current_y = y_cur;
|
||||
do_gotoline(lineno_cur, 1);
|
||||
/* go back to the old position, mark the file as modified, and make
|
||||
sure that the titlebar is refreshed */
|
||||
do_gotopos(lineno_cur, x_cur, y_cur, pww_cur);
|
||||
set_modified();
|
||||
clearok(topwin, FALSE);
|
||||
titlebar(NULL);
|
||||
|
|
2
proto.h
2
proto.h
|
@ -113,7 +113,7 @@ int do_replace_loop(char *prevanswer, filestruct *begin, int *beginx,
|
|||
int wholewords, int *i);
|
||||
int do_find_bracket(void);
|
||||
|
||||
#ifdef ENABLE_MULTIBUFFER
|
||||
#if defined (ENABLE_MULTIBUFFER) || !defined (DISABLE_SPELLER)
|
||||
void do_gotopos(long line, int pos_x, int pos_y, int pos_placewewant);
|
||||
#endif
|
||||
|
||||
|
|
Loading…
Reference in New Issue