### Triage
+- [ ] if cursor position causes pane size to change, this doesn't
+ propagate.
- [X] check formatting in x11 display. Wrap causes problems 474/476 of
render-present.py and elsewhere
- [X] check notmuch formatting. wrap-margin isn't right!
- [X] email display: image positioning is wrong. Maybe they don't get
erased when moved.
-- [ ] remove tab_right hack by not requiring tail_length after
+- [X] remove tab_right hack by not requiring tail_length after
final non-eol item
- [X] resolve fixme around wrap_margin when splitting
- [X] resolve fixme reguarding margin in find_curs
else
buf[0] = 0;
/* justify 10pt (1 char) from right to avoid triggering a wrap */
- pane_str(mli->line, buf, "bold,fg:blue,rtab");
+ pane_str(mli->line, buf, "bold,fg:blue,right:10,rtab");
}
return 1;
}
struct call_return cr;
int x, y;
bool eop = False;
+ bool seen_rtab = False;
if (!rd->content)
return eop;
x += ri->width;
continue;
}
+ if (ri->tab_align == TAB_RIGHT)
+ seen_rtab = True;
w = ri->width;
for (ri2 = ri->next;
ri2 && ri2->tab_align == TAB_LEFT && ri2->tab == TAB_UNSET;
margin = right_margin;
if (ri2)
margin = (rd->left_margin * rd->scale / 1000) + calc_tab(ri2->tab, right_margin, rd->scale);
- if (ri->tab_align == TAB_RIGHT) {
- margin -= rd->tail_length;// FIXME don't want this HACK
+ if (ri->tab_align == TAB_RIGHT)
x = x + margin - x - w;
- } else
+ else
x = x + (margin - x - w) / 2;
ri->x = x;
while (ri->next && ri->next->next && ri->next->tab_align == TAB_LEFT) {
}
if (ri->x + ri->width <= right_margin - rd->tail_length)
continue;
+ if ((ri->next == NULL || ri->next->eol) &&
+ ri->x + ri->width <= right_margin &&
+ seen_rtab)
+ /* Don't need any tail space for last item.
+ * This allows rtab to fully right-justify,
+ * but leaves no-where for the cursor. So
+ * only do it if rtab is present.
+ */
+ continue;
/* This doesn't fit here */
if (wraprl) {
/* Move wraprl to next line and hide it unless it contains cursor */