tweaks: reshuffle a few things

master
Benno Schulenberg 2016-05-23 21:34:02 +02:00
parent a617d9c05e
commit e0e788e218
3 changed files with 7 additions and 9 deletions

View File

@ -1173,7 +1173,7 @@ GNU nano 2.4.2 - 2015.07.05
2015-06-11 Benno Schulenberg <bensberg@justemail.net> 2015-06-11 Benno Schulenberg <bensberg@justemail.net>
* src/winio.c (get_key_buffer): Add some debugging code to make it * src/winio.c (get_key_buffer): Add some debugging code to make it
easy to see what codes a key stroke produces. easy to see what codes a keystroke produces.
2015-06-07 Benno Schulenberg <bensberg@justemail.net> 2015-06-07 Benno Schulenberg <bensberg@justemail.net>
* doc/texinfo/nano.texi: Show the node with the command-line options * doc/texinfo/nano.texi: Show the node with the command-line options

View File

@ -2232,15 +2232,15 @@ bool write_marked_file(const char *name, FILE *f_open, bool tmp,
int do_writeout(bool exiting) int do_writeout(bool exiting)
{ {
int i; int i;
bool result = FALSE;
append_type append = OVERWRITE; append_type append = OVERWRITE;
char *given; char *given;
/* The filename we offer, or what the user typed so far. */ /* The filename we offer, or what the user typed so far. */
bool maychange = FALSE;
/* Whether it's okay to save the file under a different name. */
#ifndef DISABLE_EXTRA #ifndef DISABLE_EXTRA
static bool did_credits = FALSE; static bool did_credits = FALSE;
#endif #endif
bool maychange = FALSE;
/* Whether it's okay to save the file under a different name. */
bool result = FALSE;
if (exiting && ISSET(TEMP_FILE) && openfile->filename[0] != '\0') { if (exiting && ISSET(TEMP_FILE) && openfile->filename[0] != '\0') {
if (write_file(openfile->filename, NULL, FALSE, OVERWRITE, FALSE)) if (write_file(openfile->filename, NULL, FALSE, OVERWRITE, FALSE))

View File

@ -36,8 +36,7 @@ static size_t key_buffer_len = 0;
static int statusblank = 0; static int statusblank = 0;
/* The number of keystrokes left before we blank the statusbar. */ /* The number of keystrokes left before we blank the statusbar. */
static bool suppress_cursorpos = FALSE; static bool suppress_cursorpos = FALSE;
/* Should we temporarily disable constant cursor position /* Should we skip constant position display for one keystroke? */
* display? */
static bool seen_wide = FALSE; static bool seen_wide = FALSE;
/* Whether we've seen a multicolumn character in the current line. */ /* Whether we've seen a multicolumn character in the current line. */
@ -2118,13 +2117,12 @@ void statusline(message_type importance, const char *msg, ...)
wattroff(bottomwin, A_BOLD); wattroff(bottomwin, A_BOLD);
wattroff(bottomwin, interface_color_pair[STATUS_BAR].pairnum); wattroff(bottomwin, interface_color_pair[STATUS_BAR].pairnum);
/* Push the message to the screen straightaway. */
wnoutrefresh(bottomwin); wnoutrefresh(bottomwin);
doupdate();
suppress_cursorpos = TRUE; suppress_cursorpos = TRUE;
/* Push the message to the screen straightaway. */
doupdate();
/* If we're doing quick statusbar blanking, blank it after just one /* If we're doing quick statusbar blanking, blank it after just one
* keystroke. Otherwise, blank it after twenty-six keystrokes, as * keystroke. Otherwise, blank it after twenty-six keystrokes, as
* Pico does. */ * Pico does. */