~kevin8t8/mutt

bbfa9271e13752f72da3a67f1bc041164c5c8cdf — Kevin McCarthy 6 months ago b09a0b8
Make shortpath/indent code guards explicit.

In actuality, the parent_depth and indent_width won't ever be
negative.

But the new code for unset $sidebar_relative_shortpath_indent makes
this much less obvious.  Better to be explicit than have some small
future code change result in a bug.
1 files changed, 2 insertions(+), 2 deletions(-)

M sidebar.c
M sidebar.c => sidebar.c +2 -2
@@ 750,7 750,7 @@ static void draw_sidebar (int num_rows, int num_cols, int div_width)
        }
      }

      if (option (OPTSIDEBARSHORTPATH) && parent_depth)
      if (option (OPTSIDEBARSHORTPATH) && (parent_depth > 0))
      {
        for (i = 0; parent_depth && sidebar_folder_name[i]; i++)
          if (strchr (SidebarDelimChars, sidebar_folder_name[i]))


@@ 758,7 758,7 @@ static void draw_sidebar (int num_rows, int num_cols, int div_width)
        sidebar_folder_name += i;
      }

      if (option (OPTSIDEBARFOLDERINDENT) && indent_width)
      if (option (OPTSIDEBARFOLDERINDENT) && (indent_width > 0))
      {
        mutt_buffer_clear (indent_folder_name);
        for (i = 0; i < indent_width; i++)