Thomas Morley - 2017-07-24

Things are even worse if \start/stopStaff is happen at line-break, repeat-signs and different StaffSymbol.line-positions are used.

\paper {
  indent = 0
  line-width = 40
}

musII = { 
  \repeat volta 2 { c'1 }
  %\workAround
  \break 
  \stopStaff 
  \override Staff.StaffSymbol.line-positions = #'(-6) 
  \override Staff.Clef #'stencil = ##f
  \startStaff 
  \repeat volta 2 { c'1 }
}

\new StaffGroup 
  <<
    \new Staff \musII
    \new Staff \musII

See attached png.

A workaround for the Barline could be:

workAround =
\once \override Staff.BarLine #'before-line-breaking =
  #(lambda (grob)
    (if (eqv? LEFT (ly:item-break-dir grob))
        (begin
          (ly:grob-set-property! grob 'bar-extent '(-5 . -1))
          (ly:grob-set-property! grob 'Y-extent '(-5 . -1))    
          (ly:grob-set-property! grob 'Y-offset 3))))

Still no SpanBar, that's issue 2876, though.