- Remove do_preserve_msg, as using -p still gives Pico-style
string behavior, so an annoying message every invocation is
probably unneeded (all cheer).
+ - Change resetpos function to be global (now called
+ resetstatuspos. Fixes annoying but small odd problem with
+ cursor placement when inserting a file. This needs to be done
+ better in 1.3 (originally by David Lawrence Ramsey).
+ Added this issue to TODO.
- files.c:
cwd_tab_completion()
- Memory leak fix (David Benbennick).
- Make "To line" (^W^T) and "Read from Command" (^R^X) re-enter their
parent menu when their keystroke is entered a second time (^W^T^T and
(^R^X^X)(requires figuring out when to keep cursor pos and when not to).
+- Fix resetstatuspos global which we shouldn't have.
Old requests:
if (tmp != NULL) {
free(answer);
answer = tmp;
+ resetstatuspos = 1;
} else
goto start_again;
}
set in main(). */
#endif
+int resetstatuspos; /* Hack for resetting the status bar
+ cursor position */
char *answer = NULL; /* Answer str to many questions */
int totlines = 0; /* Total number of lines in the file */
long totsize = 0; /* Total number of bytes in the file */
extern char *alt_speller;
#endif
+extern int resetstatuspos;
extern struct stat fileinfo;
extern filestruct *current, *fileage, *edittop, *editbot, *filebot;
extern filestruct *cutbuffer;
#ifndef DISABLE_TABCOMP
, int *list
#endif
- , int resetpos);
+ );
void set_modified(void);
void titlebar(char *path);
void bottombars(const shortcut *s);
#ifndef DISABLE_TABCOMP
, int *list
#endif
- , int resetpos)
+ )
{
int kbinput;
static int x = -1;
it would be past the end of the string as it is. Otherwise,
leave it alone. This is so the cursor position stays at the same
place if a prompt-changing toggle is pressed. */
- if (x == -1 || x > xend || resetpos)
+ if (x == -1 || x > xend || resetstatuspos)
x = xend;
answer = (char *)nrealloc(answer, xend + 1);
#ifndef DISABLE_TABCOMP
int list = 0;
#endif
- static int resetpos = 0; /* Do we need to scrap the cursor position
- on the statusbar? */
bottombars(s);
#ifndef DISABLE_TABCOMP
, &list
#endif
- , resetpos);
+ );
free(foo);
- resetpos = 0;
+ resetstatuspos = 0;
switch (ret) {
case NANO_FIRSTLINE_KEY:
do_first_line();
- resetpos = 1;
+ resetstatuspos = 1;
break;
case NANO_LASTLINE_KEY:
do_last_line();
- resetpos = 1;
+ resetstatuspos = 1;
break;
case NANO_CANCEL_KEY:
ret = -1;
- resetpos = 1;
+ resetstatuspos = 1;
break;
}
blank_statusbar();