fixes Savannah bug #47133.
* src/files.c (save_poshistory): Allocate enough space for printing
out the line and column numbers. This fixes Savannah bug #47135.
+ * src/*.c: Switch the cursor on and off at the appropriate moments,
+ so that it no longer shows in the help screen nor in the file list.
+ This fixes Savannah bug #47126.
GNU nano 2.5.2 - 2016.02.12
functionptrtype func;
/* The function of the key the user typed in. */
+ /* Don't show a cursor in the file list. */
curs_set(0);
blank_statusbar();
bottombars(MBROWSER);
/* The path we switch to at the "Go to Directory"
* prompt. */
+ /* Make sure that the cursor is off. */
+ curs_set(0);
+
#ifndef NANO_TINY
if (kbinput == KEY_WINCH) {
/* Rebuild the file list and sort it. */
do_help_void();
/* The window dimensions might have changed, so act as if. */
kbinput = KEY_WINCH;
- curs_set(0);
#else
say_there_is_no_help();
#endif
} else if (func == do_search) {
/* Search for a filename. */
- curs_set(1);
do_filesearch();
- curs_set(0);
} else if (func == do_research) {
/* Search for another filename. */
do_fileresearch();
selected = filelist_len - 1;
} else if (func == goto_dir_void) {
/* Go to a specific directory. */
- curs_set(1);
i = do_prompt(TRUE,
#ifndef DISABLE_TABCOMP
FALSE,
/* TRANSLATORS: This is a prompt. */
browser_refresh, _("Go To Directory"));
- curs_set(0);
bottombars(MBROWSER);
/* If the directory begins with a newline (i.e. an
}
titlebar(NULL);
edit_refresh();
- curs_set(1);
if (old_const_update)
SET(CONST_UPDATE);
blank_edit();
wmove(edit, 0, 0);
- /* Disable el cursor. */
+ /* Don't show a cursor in the list of completions. */
curs_set(0);
for (match = 0; match < num_matches; match++) {
if (!*list)
refresh_func();
- /* Enable el cursor. */
- curs_set(1);
-
return buf;
}
#endif /* !DISABLE_TABCOMP */
functionptrtype func;
/* The function of the key the user typed in. */
+ /* Don't show a cursor in the help screen. */
curs_set(0);
blank_edit();
blank_statusbar();
#ifndef NANO_TINY
if (kbinput == KEY_WINCH) {
kbinput = ERR;
- curs_set(0);
continue; /* Redraw the screen. */
}
#endif
} else
bottombars(oldmenu);
- curs_set(1);
-
#ifndef DISABLE_BROWSER
if (oldmenu == MBROWSER || oldmenu == MWHEREISFILE || oldmenu == MGOTODIR)
browser_refresh();
* name with the TEMP_FILE flag set, just before the filename prompt. */
void no_current_file_name_warning(void)
{
- curs_set(0);
-
/* Warn that the current file has no name. */
statusbar(_("No file name"));
beep();
currmenu = MMAIN;
+ /* Turn the cursor on when waiting for input. */
+ curs_set(1);
+
/* Read in and interpret characters. */
do_input(TRUE);
}
* this case, disable all keys that would change the text if the
* filename isn't blank and we're at the "Write File" prompt. */
while (TRUE) {
+ /* Ensure the cursor is on when waiting for input. */
+ curs_set(1);
+
kbinput = do_statusbar_input(&ran_func, &finished, refresh_func);
assert(statusbar_x <= strlen(answer));
edit_refresh();
+ /* Don't show cursor, to not distract from highlighted match. */
curs_set(0);
do_replace_highlight(TRUE, exp_word);
free(exp_word);
- curs_set(1);
-
if (i == -1) { /* We canceled the replace. */
if (canceled != NULL)
*canceled = TRUE;
char *msg = charalloc(1024 + strlen(curlint->filename));
int i;
- sprintf(msg, _("This message is for unopened file %s, open it in a new buffer?"),
+ sprintf(msg, _("This message is for unopened file %s,"
+ " open it in a new buffer?"),
curlint->filename);
+ /* Show a cursor after the question. */
+ curs_set(1);
i = do_yesno_prompt(FALSE, msg);
free(msg);
if (i == -1) {
bottombars(MLINTER);
}
+ /* Show the cursor to indicate the affected line. */
+ curs_set(1);
+
kbinput = get_kbinput(bottomwin);
#ifndef NANO_TINY
{
int kbinput;
- /* Turn the cursor on when waiting for input. */
- curs_set(1);
-
/* Read in a character and interpret it. Continue doing this until
* we get a recognized value or sequence. */
while ((kbinput = parse_kbinput(win)) == ERR)
UNSET(NO_HELP);
window_init();
- curs_set(1);
nodelay(edit, FALSE);
total_refresh();