]> git.wh0rd.org Git - nano.git/commitdiff
Normalizing the indentation somewhat.
authorBenno Schulenberg <bensberg@justemail.net>
Fri, 4 Apr 2014 19:26:08 +0000 (19:26 +0000)
committerBenno Schulenberg <bensberg@justemail.net>
Fri, 4 Apr 2014 19:26:08 +0000 (19:26 +0000)
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@4729 35c25a1d-7b9e-4130-9fde-d3aeb78583b8

ChangeLog
src/prompt.c

index 3ddaa1f8e7296eeff19f2668c168f8da8c24629e..4b4e8134ef93167968363a18c2fff1462c666cb5 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -17,6 +17,7 @@
        * src/nano.c (do_mouse): Fix warning with --enable-mouse.
        * src/prompt.c (get_prompt_string): Fix compilation for the
        combination of --enable-tiny with --enable-tabcomp.
+       * src/prompt.c (get_prompt_string): Normalize the indentation.
 
 2014-04-03  Benno Schulenberg  <bensberg@justemail.net>
        * configure.ac: Remove unused '*_support' variables.
index 8752ca7d7ddaa24aac1644c99fe4451f8b61e45a..e598fc976a97e11239314e3c216c01227c1a2e1c 100644 (file)
@@ -988,101 +988,89 @@ fprintf(stderr, "get_prompt_string: answer = \"%s\", statusbar_x = %lu\n", answe
 
        if (s && s->scfunc == do_tab) {
 #ifndef NANO_TINY
-               if (history_list != NULL) {
-                   if (last_kbinput != sc_seq_or(do_tab, NANO_CONTROL_I))
-                       complete_len = strlen(answer);
+           if (history_list != NULL) {
+               if (last_kbinput != sc_seq_or(do_tab, NANO_CONTROL_I))
+                   complete_len = strlen(answer);
 
-                   if (complete_len > 0) {
-                       answer = mallocstrcpy(answer,
+               if (complete_len > 0) {
+                   answer = mallocstrcpy(answer,
                                get_history_completion(history_list,
-                               answer, complete_len));
-                       statusbar_x = strlen(answer);
-                   }
-               } else
+                                       answer, complete_len));
+                   statusbar_x = strlen(answer);
+               }
+           } else
 #endif /* !NANO_TINY */
-               if (allow_tabs)
-                   answer = input_tab(answer, allow_files,
-                       &statusbar_x, &tabbed, refresh_func, list);
+           if (allow_tabs)
+               answer = input_tab(answer, allow_files, &statusbar_x,
+                                  &tabbed, refresh_func, list);
 
-               update_statusbar_line(answer, statusbar_x);
+           update_statusbar_line(answer, statusbar_x);
        } else
 #endif /* !DISABLE_TABCOMP */
 #ifndef NANO_TINY
        if (s && s->scfunc == get_history_older_void) {
-               if (history_list != NULL) {
-                   /* If we're scrolling up at the bottom of the
-                    * history list and answer isn't blank, save answer
-                    * in magichistory. */
-                   if ((*history_list)->next == NULL &&
-                       answer[0] != '\0')
-                       magichistory = mallocstrcpy(magichistory,
-                               answer);
-
-                   /* Get the older search from the history list and
-                    * save it in answer.  If there is no older search,
-                    * don't do anything. */
-                   if ((history =
-                       get_history_older(history_list)) != NULL) {
-                       answer = mallocstrcpy(answer, history);
-                       statusbar_x = strlen(answer);
-                   }
+           if (history_list != NULL) {
+               /* If we're scrolling up at the bottom of the history list
+                * and answer isn't blank, save answer in magichistory. */
+               if ((*history_list)->next == NULL && answer[0] != '\0')
+                   magichistory = mallocstrcpy(magichistory, answer);
+
+               /* Get the older search from the history list and save it in
+                * answer.  If there is no older search, don't do anything. */
+               if ((history = get_history_older(history_list)) != NULL) {
+                   answer = mallocstrcpy(answer, history);
+                   statusbar_x = strlen(answer);
+               }
 
-                   update_statusbar_line(answer, statusbar_x);
+               update_statusbar_line(answer, statusbar_x);
 
-                   /* This key has a shortcut list entry when it's used
-                    * to move to an older search, which means that
-                    * finished has been set to TRUE.  Set it back to
-                    * FALSE here, so that we aren't kicked out of the
-                    * statusbar prompt. */
-                   finished = FALSE;
-               }
+               /* This key has a shortcut-list entry when it's used to
+                * move to an older search, which means that finished has
+                * been set to TRUE.  Set it back to FALSE here, so that
+                * we aren't kicked out of the statusbar prompt. */
+                finished = FALSE;
+           }
        } else if (s && s->scfunc == get_history_newer_void) {
-               if (history_list != NULL) {
-                   /* Get the newer search from the history list and
-                    * save it in answer.  If there is no newer search,
-                    * don't do anything. */
-                   if ((history =
-                       get_history_newer(history_list)) != NULL) {
-                       answer = mallocstrcpy(answer, history);
-                       statusbar_x = strlen(answer);
-                   }
+           if (history_list != NULL) {
+               /* Get the newer search from the history list and save it in
+                * answer.  If there is no newer search, don't do anything. */
+               if ((history = get_history_newer(history_list)) != NULL) {
+                   answer = mallocstrcpy(answer, history);
+                   statusbar_x = strlen(answer);
+               }
 
-                   /* If, after scrolling down, we're at the bottom of
-                    * the history list, answer is blank, and
-                    * magichistory is set, save magichistory in
-                    * answer. */
-                   if ((*history_list)->next == NULL &&
-                       *answer == '\0' && magichistory != NULL) {
+               /* If, after scrolling down, we're at the bottom of the
+                * history list, answer is blank, and magichistory is set,
+                * save magichistory in answer. */
+               if ((*history_list)->next == NULL &&
+                   *answer == '\0' && magichistory != NULL) {
                        answer = mallocstrcpy(answer, magichistory);
                        statusbar_x = strlen(answer);
                    }
 
-                   update_statusbar_line(answer, statusbar_x);
+               update_statusbar_line(answer, statusbar_x);
 
-                   /* This key has a shortcut list entry when it's used
-                    * to move to a newer search, which means that
-                    * finished has been set to TRUE.  Set it back to
-                    * FALSE here, so that we aren't kicked out of the
-                    * statusbar prompt. */
-                   finished = FALSE;
-               }
+               /* This key has a shortcut-list entry when it's used to
+                * move to a newer search, which means that finished has
+                * been set to TRUE.  Set it back to FALSE here, so that
+                * we aren't kicked out of the statusbar prompt. */
+               finished = FALSE;
+           }
        } else
 #endif /* !NANO_TINY */
        if (s && s->scfunc == do_help_void) {
-               update_statusbar_line(answer, statusbar_x);
+           update_statusbar_line(answer, statusbar_x);
 
-               /* This key has a shortcut list entry when it's used to
-                * go to the help browser or display a message
-                * indicating that help is disabled, which means that
-                * finished has been set to TRUE.  Set it back to FALSE
-                * here, so that we aren't kicked out of the statusbar
-                * prompt. */
-               finished = FALSE;
+           /* This key has a shortcut-list entry when it's used to go to
+            * the help browser or display a message indicating that help
+            * is disabled, which means that finished has been set to TRUE.
+            * Set it back to FALSE here, so that we aren't kicked out of
+            * the statusbar prompt. */
+           finished = FALSE;
        }
 
-       /* If we have a shortcut with an associated function, break out
-        * if we're finished after running or trying to run the
-        * function. */
+       /* If we have a shortcut with an associated function, break out if
+        * we're finished after running or trying to run the function. */
        if (finished)
            break;
 
@@ -1096,8 +1084,8 @@ fprintf(stderr, "get_prompt_string: answer = \"%s\", statusbar_x = %lu\n", answe
 
 
 #ifndef NANO_TINY
-    /* Set the current position in the history list to the bottom and
-     * free magichistory, if we need to. */
+    /* Set the current position in the history list to the bottom,
+     * and free magichistory if we need to. */
     if (history_list != NULL) {
        history_reset(*history_list);