Skipping lines on cursor down

2007-05-23 Thread Stefan Schimanski
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

Re: Skipping lines on cursor down

2007-05-23 Thread Abdelrazak Younes
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

Re: Skipping lines on cursor down

2007-05-23 Thread Jean-Marc Lasgouttes
Abdelrazak == Abdelrazak Younes [EMAIL PROTECTED] writes: Abdelrazak 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 *

Re: Skipping lines on cursor down

2007-05-23 Thread Bennett Helm
On May 23, 2007, at 5:07 AM, 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 +

Re: Skipping lines on cursor down

2007-05-23 Thread Martin Vermeer
On Wed, May 23, 2007 at 02:08:21PM +0200, Jean-Marc Lasgouttes wrote: Abdelrazak == Abdelrazak Younes [EMAIL PROTECTED] writes: Abdelrazak 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:

Re: Skipping lines on cursor down

2007-05-23 Thread Abdelrazak Younes
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

Re: Skipping lines on cursor down

2007-05-23 Thread Stefan Schimanski
Am 23.05.2007 um 17:08 schrieb Abdelrazak Younes: 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,

Re: Skipping lines on cursor down

2007-05-23 Thread Richard Heck
Stefan Schimanski wrote: I removed the margin now completely and substract 1 in the cursorUp case. This works fine everywhere but the display math. In display math (i.e. a InsetMathHull) the cursor up/down keys are not handled properly. Instead Cursor::bruteFind is used to find the nearest

Re: Skipping lines on cursor down

2007-05-23 Thread Stefan Schimanski
I am not completely sure how to do this in the right way, but what we need something like this: Index: src/Cursor.cpp === --- src/Cursor.cpp (Revision 18436) +++ src/Cursor.cpp (Arbeitskopie) @@ -1101,10 +1101,18 @@

Re: Skipping lines on cursor down

2007-05-23 Thread Stefan Schimanski
All that below of course should be a better way to implement cursorUp/ Down in display math (after removing the mentioned magic margin in Text::cursorUp/Down which was needed according to Martin for display math). Stefan I am not completely sure how to do this in the right way, but what

Skipping lines on cursor down

2007-05-23 Thread Stefan Schimanski
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

Re: Skipping lines on cursor down

2007-05-23 Thread Abdelrazak Younes
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

Re: Skipping lines on cursor down

2007-05-23 Thread Jean-Marc Lasgouttes
> "Abdelrazak" == Abdelrazak Younes <[EMAIL PROTECTED]> writes: Abdelrazak> 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 * >>

Re: Skipping lines on cursor down

2007-05-23 Thread Bennett Helm
On May 23, 2007, at 5:07 AM, 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 +

Re: Skipping lines on cursor down

2007-05-23 Thread Martin Vermeer
On Wed, May 23, 2007 at 02:08:21PM +0200, Jean-Marc Lasgouttes wrote: > > "Abdelrazak" == Abdelrazak Younes <[EMAIL PROTECTED]> writes: > > Abdelrazak> Stefan Schimanski wrote: > >> Hi! > >> > >> My cursor often skips lines when moving downwards. I was trying to > >> understand the code and

Re: Skipping lines on cursor down

2007-05-23 Thread Abdelrazak Younes
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

Re: Skipping lines on cursor down

2007-05-23 Thread Stefan Schimanski
Am 23.05.2007 um 17:08 schrieb Abdelrazak Younes: 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,

Re: Skipping lines on cursor down

2007-05-23 Thread Richard Heck
Stefan Schimanski wrote: I removed the margin now completely and substract 1 in the cursorUp case. This works fine everywhere but the display math. In display math (i.e. a InsetMathHull) the cursor up/down keys are not handled properly. Instead Cursor::bruteFind is used to find the nearest

Re: Skipping lines on cursor down

2007-05-23 Thread Stefan Schimanski
I am not completely sure how to do this in the right way, but what we need something like this: Index: src/Cursor.cpp === --- src/Cursor.cpp (Revision 18436) +++ src/Cursor.cpp (Arbeitskopie) @@ -1101,10 +1101,18 @@

Re: Skipping lines on cursor down

2007-05-23 Thread Stefan Schimanski
All that below of course should be a better way to implement cursorUp/ Down in display math (after removing the mentioned magic margin in Text::cursorUp/Down which was needed according to Martin for display math). Stefan I am not completely sure how to do this in the right way, but what