- // We may want to place a check here, for whether the line is too short
- if (list == texts)
- {
- // if there is only one line in the paragraph,
- // do not try to avoid orphans
- ps->set_property ("last-markup-line", SCM_BOOL_F);
- ps->set_property ("first-markup-line", SCM_BOOL_F);
- }
- else
- {
- ps->set_property ("last-markup-line", SCM_BOOL_T);
+ /* Set properties to avoid widowed/orphaned lines.
+ Single-line markup_lists are excluded, but in future
+ we may want to add the case of a very short, single line. */
+ if (first && last)
+ {
+ last->set_property ("last-markup-line", SCM_BOOL_T);
+ first->set_property ("first-markup-line", SCM_BOOL_T);