- [X] merge command 9-A-m could work as one command. If there is an
active selection, the patch is moved to that selection.
- [X] merge command 9 must ensure selection is full lines.
-- [ ] if cursor position causes pane size to change, this doesn't
+- [X] if cursor position causes pane size to change, this doesn't
propagate.
- [ ] When is left_margin used? Can I use it for hanging indent? If
not, how do I do that? Can I tab out, set margin, tab back for
text? Am I using points properly?
- [X] find a better way to handle "case when EOF is at the end" of
a non-empty line.
-- [ ] as renderline changes result if cursor is present, cursor pos
+- [X] as renderline changes result if cursor is present, cursor pos
must ALWAYS be given.
- [ ] write test view mode that treats each line in document as markup
so markup can be tested more directly.
start_of_file = doc_prior(focus, start) == WEOF;
for (m = start; m && !found_end && y < p->h; m = vmark_next(m)) {
struct pane *hp;
- int found;
+ int found = 0;
+ int offset = -1;
if (refresh_all)
vmark_invalidate(m);
call_render_line(p, focus, m, NULL);
- found = measure_line(p, focus, m);
- found_end = found & 2;
+ m2 = vmark_next(m);
+ /* The "found & 1" handles case when EOF is at the end
+ * of a non-empty line.
+ */
+ if (pm && m2 && mark_same(pm, m2))
+ /* Cursor at end shouldn't affect appearance */
+ found = measure_line(p, focus, m);
+ if (pm && m2 && mark_ordered_or_same(m, pm) &&
+ (mark_ordered_not_same(pm, m2) ||
+ (mark_same(pm, m2) && !(found & 1))))
+ /* Cursor is on this line */
+ offset = call_render_line_to_point(focus,
+ pm, m);
+ found = measure_line(p, focus, m, offset);
+
hp = m->mdata;
if (!mark_valid(m) || !hp)
break;
+ found_end = found & 2;
+
if (y != hp->y) {
pane_damaged(p, DAMAGED_REFRESH);
hp->damaged &= ~DAMAGED_SIZE;
pane_damaged(hp, DAMAGED_REFRESH);
}
y += hp->h;
- m2 = vmark_next(m);
- /* The "found & 1" handles case when EOF is at the end
- * of a non-empty line.
- */
- if (pm && m2 && mark_ordered_or_same(m, pm) &&
- (mark_ordered_not_same(pm, m2) ||
- (mark_same(pm, m2) && !(found & 1)))) {
-
+ if (offset >= 0) {
/* Cursor is on this line */
- int offset = call_render_line_to_point(focus,
- pm, m);
int lh = attr_find_int(hp->attrs,
"line-height");
int cy = y - hp->h + hp->cy;
if (lh < 1)
lh = 1;
- measure_line(p, focus, m, offset);
if (m == start && rl->skip_height > 0) {
/* Point might be in this line, but off top
* of the screen
Key "- "
Display 80,30 A84DE4E3F90DB9F454DC6BDD158DAEC4 5,7
Key "- "
-Display 80,30 21D172645F11E5F6F6A2B853FB151B23 6,7
+Display 80,30 3C812011C331AE6C522C00B0145F9E4D 6,7
Key ":C-F"
-Display 80,30 21D172645F11E5F6F6A2B853FB151B23 7,7
+Display 80,30 3C812011C331AE6C522C00B0145F9E4D 7,7
Key ":C-F"
Display 80,30 68CC3869602D7CE09C8CB343CB22E8D9 2,7
Key ":C-X"