From: Benno Schulenberg Date: Sun, 31 Jan 2016 13:26:15 +0000 (+0000) Subject: Making Home go always fully home. X-Git-Tag: v2.5.2~31 X-Git-Url: https://git.wh0rd.org/?a=commitdiff_plain;h=7ade5deabef998934de5b4da203fdd2fa675a677;p=nano.git Making Home go always fully home. git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@5604 35c25a1d-7b9e-4130-9fde-d3aeb78583b8 --- diff --git a/ChangeLog b/ChangeLog index 07d6b170..a248884c 100644 --- a/ChangeLog +++ b/ChangeLog @@ -2,6 +2,7 @@ * src/files.c (has_valid_path): Be more specific in how a given path is invalid. The change was improved by Rishabh Dave. * doc/syntax/nanorc.nanorc: Show ^^ and M-^ as valid key names. + * src/prompt.c (do_statusbar_home): Make Home go always fully home. 2016-01-29 Benno Schulenberg * src/files.c (do_insertfile): Do display the buffer when configured diff --git a/src/prompt.c b/src/prompt.c index 5a2e7b98..cfcf5cb2 100644 --- a/src/prompt.c +++ b/src/prompt.c @@ -319,25 +319,10 @@ void do_statusbar_output(char *output, size_t output_len, bool update_statusbar_line(answer, statusbar_x); } -/* Move to the beginning of the prompt text. If the SMART_HOME flag is - * set, move to the first non-whitespace character of the prompt text if - * we're not already there, or to the beginning of the prompt text if we - * are. */ +/* Move to the beginning of the prompt text. */ void do_statusbar_home(void) { -#ifndef NANO_TINY - if (ISSET(SMART_HOME)) { - size_t statusbar_x_save = statusbar_x; - - statusbar_x = indent_length(answer); - - if (statusbar_x == statusbar_x_save || - statusbar_x == strlen(answer)) - statusbar_x = 0; - } else -#endif - statusbar_x = 0; - + statusbar_x = 0; update_the_bar(); }