Stefan Schimanski wrote:
Hi!

My cursor often skips lines when moving downwards. I was trying to understand the code and found this in Text2.cpp:

// To middle of next row
int const margin = 3 * InsetMathHull::displayMargin() / 2;
editXY(cur, x, y + pm.rows()[row].descent() + margin);

What is the reasoning here? Why do we take the margin of a math hull in general text cursor handling?

This looks weird indeed.

Isn't the row descent() enough?

dunno.


Moreover is there a need to have Text::cursorDown and Text::cursorUp sharing 95% of it's code?

I guess not. Inertia...


Stefan

P.S.: Strangely moving upwards is fine.

Then merging the two function would probably solve the problem. Don't forget to flip upside down your screen when you're done.

Abdel.


Reply via email to