Re: [yet another patch] Cursor movement fine-tuning

2007-05-31 Thread Andre Poenitz
On Thu, May 31, 2007 at 09:50:03AM +0200, Stefan Schimanski wrote: > > Am 31.05.2007 um 09:43 schrieb Jean-Marc Lasgouttes: > > >>"Stefan" == Stefan Schimanski <[EMAIL PROTECTED]> writes: > > > >Stefan> This is fine, mostly. I don't like 7. There should be a > >Stefan> position behind the c,

Re: [yet another patch] Cursor movement fine-tuning

2007-05-31 Thread Andre Poenitz
On Thu, May 31, 2007 at 09:25:15AM +0200, Stefan Schimanski wrote: > So, removing the whole boundary business, we get this behavious: > > 1) abc| \ndef =right=> abc \n|def > 2) ab|c\ndef =right=> abc\n|def =right=> abc\nd|ef > 3) abc \nd|ef =left=> abc \n|def =left=> abc| \ndef > 4) abc\nd|ef =lef

Re: [yet another patch] Cursor movement fine-tuning

2007-05-31 Thread Michael Gerz
Stefan Schimanski schrieb: Am 31.05.2007 um 10:56 schrieb Michael Gerz: Abdelrazak Younes schrieb: Isn't this related to change-tracking? Change tracking adds meta information to a virtual (i.e. non-existing) end-of-par character at the end of each paragraph. It does not care for cursor st

Re: [yet another patch] Cursor movement fine-tuning

2007-05-31 Thread Stefan Schimanski
Am 31.05.2007 um 10:56 schrieb Michael Gerz: Abdelrazak Younes schrieb: Isn't this related to change-tracking? Change tracking adds meta information to a virtual (i.e. non- existing) end-of-par character at the end of each paragraph. It does not care for cursor stuff. (I haven't follow the

Re: [yet another patch] Cursor movement fine-tuning

2007-05-31 Thread Abdelrazak Younes
Michael Gerz wrote: Abdelrazak Younes schrieb: Isn't this related to change-tracking? Change tracking adds meta information to a virtual (i.e. non-existing) end-of-par character at the end of each paragraph. Ah yes I remembered something about a virtual end-of-par. It does not care for cur

Re: [yet another patch] Cursor movement fine-tuning

2007-05-31 Thread Michael Gerz
Abdelrazak Younes schrieb: Isn't this related to change-tracking? Change tracking adds meta information to a virtual (i.e. non-existing) end-of-par character at the end of each paragraph. It does not care for cursor stuff. (I haven't follow the thread but I hope that you did not kill any CT-

Re: [yet another patch] Cursor movement fine-tuning

2007-05-31 Thread Jean-Marc Lasgouttes
> "Abdelrazak" == Abdelrazak Younes <[EMAIL PROTECTED]> writes: >> Good question. In 1.4.x, the two positions exist. I am not sure >> why the position in front of the display inset is deemed useful. Abdelrazak> Isn't this related to change-tracking? I think it is something else, but what?

Re: [yet another patch] Cursor movement fine-tuning

2007-05-31 Thread Abdelrazak Younes
Jean-Marc Lasgouttes wrote: "Stefan" == Stefan Schimanski <[EMAIL PROTECTED]> writes: Stefan> Am 31.05.2007 um 09:43 schrieb Jean-Marc Lasgouttes: "Stefan" == Stefan Schimanski <[EMAIL PROTECTED]> writes: Stefan> This is fine, mostly. I don't like 7. There should be a Stefan> position behind

Re: [yet another patch] Cursor movement fine-tuning

2007-05-31 Thread Stefan Schimanski
Am 31.05.2007 um 10:13 schrieb Jean-Marc Lasgouttes: "Stefan" == Stefan Schimanski <[EMAIL PROTECTED]> writes: Stefan> The only case I can imagine is while selecting an inset like Stefan> display math. It might seem more intuitive if you can select Stefan> just the line of a display math. Bu

Re: [yet another patch] Cursor movement fine-tuning

2007-05-31 Thread Jean-Marc Lasgouttes
> "Stefan" == Stefan Schimanski <[EMAIL PROTECTED]> writes: Stefan> The only case I can imagine is while selecting an inset like Stefan> display math. It might seem more intuitive if you can select Stefan> just the line of a display math. But the visual effect will remain the same anyway. I

Re: [yet another patch] Cursor movement fine-tuning

2007-05-31 Thread Stefan Schimanski
Am 31.05.2007 um 09:57 schrieb Jean-Marc Lasgouttes: "Stefan" == Stefan Schimanski <[EMAIL PROTECTED]> writes: Stefan> Am 31.05.2007 um 09:43 schrieb Jean-Marc Lasgouttes: "Stefan" == Stefan Schimanski <[EMAIL PROTECTED]> writes: Stefan> This is fine, mostly. I don't like 7. There should

Re: [yet another patch] Cursor movement fine-tuning

2007-05-31 Thread Jean-Marc Lasgouttes
> "Stefan" == Stefan Schimanski <[EMAIL PROTECTED]> writes: Stefan> Am 31.05.2007 um 09:43 schrieb Jean-Marc Lasgouttes: >>> "Stefan" == Stefan Schimanski <[EMAIL PROTECTED]> writes: >> Stefan> This is fine, mostly. I don't like 7. There should be a Stefan> position behind the c, because

Re: [yet another patch] Cursor movement fine-tuning

2007-05-31 Thread Stefan Schimanski
Am 31.05.2007 um 09:43 schrieb Jean-Marc Lasgouttes: "Stefan" == Stefan Schimanski <[EMAIL PROTECTED]> writes: Stefan> This is fine, mostly. I don't like 7. There should be a Stefan> position behind the c, because if you type with the cursor in Stefan> front of the $$1$ $ the characters appea

Re: [yet another patch] Cursor movement fine-tuning

2007-05-31 Thread Jean-Marc Lasgouttes
> "Stefan" == Stefan Schimanski <[EMAIL PROTECTED]> writes: Stefan> This is fine, mostly. I don't like 7. There should be a Stefan> position behind the c, because if you type with the cursor in Stefan> front of the $$1$ $ the characters appear behind c. In fact Stefan> the position in front of

Re: [yet another patch] Cursor movement fine-tuning

2007-05-31 Thread Stefan Schimanski
So, removing the whole boundary business, we get this behavious: 1) abc| \ndef =right=> abc \n|def 2) ab|c\ndef =right=> abc\n|def =right=> abc\nd|ef 3) abc \nd|ef =left=> abc \n|def =left=> abc| \ndef 4) abc\nd|ef =left=> abc\ndef =left=> ab|c\ndef 5) abc|\ndef =right=> abc\n|def 6) abcd|ef =lef

Re: [yet another patch] Cursor movement fine-tuning

2007-05-30 Thread Andre Poenitz
On Thu, May 31, 2007 at 02:29:38AM +0300, Dov Feldstern wrote: > At least cursorLeft and cursorRight are much simpler now... I have no idea whether the patch is sound, but I certainly like the structure... Andre'

[yet another patch] Cursor movement fine-tuning

2007-05-30 Thread Dov Feldstern
[This should be applied after the patch in http://permalink.gmane.org/gmane.editors.lyx.devel/86074, which fixes bug 3754.] Okay, you guys (Stefan and Andre') are correct, as always ;) . We really don't need the boundary almost anywhere. The comment on boundary_ in DocIterator.h is (almost) r

Re: [patch] Cursor movement fine-tuning

2007-05-30 Thread Dov Feldstern
Dov Feldstern wrote: Dov Feldstern wrote: Dov Feldstern wrote: Stefan Schimanski wrote: There's also a separate case, but it doesn't manifest itself in cursor movement (in terms of affecting the number of keystrokes between positions): if I'm between emph and normal text, and type a character

Re: [patch] Cursor movement fine-tuning

2007-05-30 Thread Andre Poenitz
On Thu, May 31, 2007 at 12:14:25AM +0300, Dov Feldstern wrote: > Andre Poenitz wrote: > > > >I am also uncertain whether > > > > cur.paragraph().isNewline(cur.pos() + 1) && > > cur.paragraph().isLineSeparator(cur.pos() + 1) && > > cur.para

Re: [patch] Cursor movement fine-tuning

2007-05-30 Thread Dov Feldstern
Dov Feldstern wrote: Stefan Schimanski wrote: Am 30.05.2007 um 22:53 schrieb Dov Feldstern: Dov Feldstern wrote: Why should that correct? The condition will never be true because no character is newline and separator at the same time. Hmm... right... maybe some of those should be "or"s. Bu

Re: [patch] Cursor movement fine-tuning

2007-05-30 Thread Dov Feldstern
Andre Poenitz wrote: I am also uncertain whether cur.paragraph().isNewline(cur.pos() + 1) && cur.paragraph().isLineSeparator(cur.pos() + 1) && cur.paragraph().isSeparator(cur.pos() + 1)) makes much sense. Right, we're past that stage alrea

Re: [patch] Cursor movement fine-tuning

2007-05-30 Thread Andre Poenitz
On Wed, May 30, 2007 at 11:12:32PM +0300, Dov Feldstern wrote: > Index: lyx-devel/src/Text2.cpp > === > --- lyx-devel.orig/src/Text2.cpp 2007-05-30 22:49:48.0 +0300 > +++ lyx-devel/src/Text2.cpp 2007-05-30 22:58:42.0

Re: [patch] Cursor movement fine-tuning

2007-05-30 Thread Dov Feldstern
Stefan Schimanski wrote: Am 30.05.2007 um 22:53 schrieb Dov Feldstern: Dov Feldstern wrote: Why should that correct? The condition will never be true because no character is newline and separator at the same time. Hmm... right... maybe some of those should be "or"s. But obviously they're n

Re: [patch] Cursor movement fine-tuning

2007-05-30 Thread Stefan Schimanski
Am 30.05.2007 um 22:53 schrieb Dov Feldstern: Dov Feldstern wrote: Why should that correct? The condition will never be true because no character is newline and separator at the same time. Hmm... right... maybe some of those should be "or"s. But obviously they're not really necessary at a

Re: [patch] Cursor movement fine-tuning

2007-05-30 Thread Dov Feldstern
Dov Feldstern wrote: Why should that correct? The condition will never be true because no character is newline and separator at the same time. Hmm... right... maybe some of those should be "or"s. But obviously they're not really necessary at all... That's what I tried saying a few days ago,

Re: [patch] Cursor movement fine-tuning

2007-05-30 Thread Dov Feldstern
Dov Feldstern wrote: Dov Feldstern wrote: Stefan Schimanski wrote: There's also a separate case, but it doesn't manifest itself in cursor movement (in terms of affecting the number of keystrokes between positions): if I'm between emph and normal text, and type a character, should it be emph o

Re: [patch] Cursor movement fine-tuning

2007-05-30 Thread Dov Feldstern
Dov Feldstern wrote: Stefan Schimanski wrote: There's also a separate case, but it doesn't manifest itself in cursor movement (in terms of affecting the number of keystrokes between positions): if I'm between emph and normal text, and type a character, should it be emph or not? Well, if I'm co

Re: [patch] Cursor movement fine-tuning

2007-05-30 Thread Dov Feldstern
Stefan Schimanski wrote: Type a long line with no spaces (aa) until the line breaks because it's too wide, and continue a bit. Then type a space, and then b... until the moves to a new line. Recall, there is no space in the middle of the , but there is a space between aaa

Re: [patch] Cursor movement fine-tuning

2007-05-30 Thread Stefan Schimanski
Type a long line with no spaces (aa) until the line breaks because it's too wide, and continue a bit. Then type a space, and then b... until the moves to a new line. Recall, there is no space in the middle of the , but there is a space between and . So, start

[patch] Cursor movement fine-tuning

2007-05-30 Thread Dov Feldstern
Hi! Attached find a patch to fix the following: Type a long line with no spaces (aa) until the line breaks because it's too wide, and continue a bit. Then type a space, and then b... until the moves to a new line. Recall, there is no space in the middle of the , but ther