Mike Alexander <mta(a)arbortext.com> writes:
The patch below avoids this problem. It occurs if the height of a
window is so small that not even one line can be formatted in it. In
this case the line cache will always be empty and
point-in-line-start-cache will return -1 which was causing vmotion-1
to assert. I looked at the various callers of vmotion-1 and it
appears that it is reasonable to just have it return the input point
unchanged in this case, so that's what I did. If this is not the
right thing to do, I'd be happy to hear alternative suggestions.
I have made similar changes to callers of point_in_line_start_cache,
so the work around is along the right lines.
However
1. Just returning point sort-of seems wrong. vmotion is intended to
scroll to it seems a nice thing to at least move to the next line.
2. vmotion calls pilsc with a min_past argument so there should have
been lines layed out even if non can be completely visible.
It would be nice if you could put a break point on the assert and
call point_in_line_start_cache with the same arguments again and
step though it with the debugger.
I think the reason this stuff is hard is because normally such small
windows don't exist very long because of window-min-height
Jan