Debian BTS 866366
The non-greedy '%>' has been broken since the introduction of the
nested-if patch.
The second command should create a line of dots ending in a ']'
set index_format="%?M?collapsed%|.]&expanded?
set index_format="%?M?collapsed%>.]&expanded?
lrbalance = 1;
while ((lrbalance > 0) && (count < sizeof(ifstring)) && *src)
{
+ if ((src[0] == '%') && (src[1] == '>'))
+ {
+ /* This is a padding expando; copy two chars and carry on */
+ *cp++ = *src++;
+ *cp++ = *src++;
+ count += 2;
+ continue;
+ }
+
if (*src == '\\')
{
src++;
count = 0;
while ((lrbalance > 0) && (count < sizeof(elsestring)) && *src)
{
+ if ((src[0] == '%') && (src[1] == '>'))
+ {
+ /* This is a padding expando; copy two chars and carry on */
+ *cp++ = *src++;
+ *cp++ = *src++;
+ count += 2;
+ continue;
+ }
+
if (*src == '\\')
{
src++;