Re: [PATCH] Fixing cursors in multiview mode (was Re: Warning Question)

2007-05-23 Thread Abdelrazak Younes
Stefan Schimanski wrote: The attached patch fixes that. It should fix also a number of other situation where cursor may be invalidated. I had to add a test in Cursor::fixIfBroken() for the case were we are not inside an Inset but in the main Text. Nice! Testing it for a few minutes now. Looks

Re: [PATCH] Fixing cursors in multiview mode (was Re: Warning Question)

2007-05-23 Thread Stefan Schimanski
The attached patch fixes that. It should fix also a number of other situation where cursor may be invalidated. I had to add a test in Cursor::fixIfBroken() for the case were we are not inside an Inset but in the main Text. Nice! Testing it for a few minutes now. Looks fine. Couldn't cause a

[PATCH] Fixing cursors in multiview mode (was Re: Warning Question)

2007-05-23 Thread Abdelrazak Younes
Stefan Schimanski wrote: Am 23.05.2007 um 11:34 schrieb Abdelrazak Younes: Jean-Marc Lasgouttes wrote: "Richard" == Richard Heck <[EMAIL PROTECTED]> writes: Richard> This is from Text2.cpp, around line 1220. Since we do Richard> now have multiple views, either there is a bug here or else Ric

Re: Warning Question

2007-05-23 Thread Abdelrazak Younes
Jean-Marc Lasgouttes wrote: "Abdelrazak" == Abdelrazak Younes <[EMAIL PROTECTED]> writes: Abdelrazak> Jean-Marc Lasgouttes wrote: "Richard" == Richard Heck <[EMAIL PROTECTED]> writes: Richard> This is from Text2.cpp, around line 1220. Since we do now Richard> have multiple views, either there

Re: Warning Question

2007-05-23 Thread Abdelrazak Younes
Stefan Schimanski wrote: Am 23.05.2007 um 11:34 schrieb Abdelrazak Younes: Jean-Marc Lasgouttes wrote: "Richard" == Richard Heck <[EMAIL PROTECTED]> writes: Richard> This is from Text2.cpp, around line 1220. Since we do Richard> now have multiple views, either there is a bug here or else Ric

Re: Warning Question

2007-05-23 Thread Jean-Marc Lasgouttes
> "Stefan" == Stefan Schimanski <[EMAIL PROTECTED]> writes: Stefan> Put text "abcde" in two windows. Put the cursor of window 2 in Stefan> the middle of the text. Select the text in window 2 and delete Stefan> it. The cursor in window 2 is now invalid. Switch to Window 2 Stefan> and crash! Ou

Re: Warning Question

2007-05-23 Thread Jean-Marc Lasgouttes
> "Abdelrazak" == Abdelrazak Younes <[EMAIL PROTECTED]> writes: Abdelrazak> Jean-Marc Lasgouttes wrote: >>> "Richard" == Richard Heck <[EMAIL PROTECTED]> writes: >> Richard> This is from Text2.cpp, around line 1220. Since we do now Richard> have multiple views, either there is a bug here o

Re: Warning Question

2007-05-23 Thread Alfredo Braunstein
Michael Gerz wrote: > E.g., when I tried to fix #3160 (sorry, fix is still pending - I am very > busy these days :-( ), I noticed that a proper solution would drop DEPM > support (including double-space deletion, leading space deletion). This > can lead to ugly cases with empty paragraphs. > > IM

Re: Warning Question

2007-05-23 Thread Stefan Schimanski
Am 23.05.2007 um 11:34 schrieb Abdelrazak Younes: Jean-Marc Lasgouttes wrote: "Richard" == Richard Heck <[EMAIL PROTECTED]> writes: Richard> This is from Text2.cpp, around line 1220. Since we do Richard> now have multiple views, either there is a bug here or else Richard> the warning can be r

Re: Warning Question

2007-05-23 Thread Abdelrazak Younes
Jean-Marc Lasgouttes wrote: "Richard" == Richard Heck <[EMAIL PROTECTED]> writes: Richard> This is from Text2.cpp, around line 1220. Since we do Richard> now have multiple views, either there is a bug here or else Richard> the warning can be removed. I think we have a bug, but it is not easy t

Re: Warning Question

2007-05-22 Thread Michael Gerz
Jean-Marc Lasgouttes schrieb: "Stefan" == Stefan Schimanski <[EMAIL PROTECTED]> writes: Stefan> With multiple views every edit gets kind of global because Stefan> some other cursor can be inside the edited inset. Stefan> I guess there is no infra structure in place for all that, Stefan> right

Re: Warning Question

2007-05-22 Thread Andre Poenitz
On Tue, May 22, 2007 at 09:58:58AM +0200, Jean-Marc Lasgouttes wrote: > > "Stefan" == Stefan Schimanski <[EMAIL PROTECTED]> writes: > > Stefan> With multiple views every edit gets kind of global because > Stefan> some other cursor can be inside the edited inset. > > Stefan> I guess there is n

Re: Warning Question

2007-05-22 Thread Abdelrazak Younes
Andre Poenitz wrote: On Mon, May 21, 2007 at 05:59:45PM -0400, Richard Heck wrote: Just wanted to bring this to people's attention: #ifdef WITH_WARNINGS #warning This will not work anymore when we have multiple views of the same buffer // In this case, we will have to correct also the cursors he

Re: Warning Question

2007-05-22 Thread Jean-Marc Lasgouttes
> "Stefan" == Stefan Schimanski <[EMAIL PROTECTED]> writes: Stefan> With multiple views every edit gets kind of global because Stefan> some other cursor can be inside the edited inset. Stefan> I guess there is no infra structure in place for all that, Stefan> right? I had trouble with exactly

Re: Warning Question

2007-05-21 Thread Stefan Schimanski
Do I see it correctly that there are two cases of cursor updates: local edits around the cursor, partly from inside the cursor class; global edits (e.g. search/replace). The latter must check that the cursor is not inside the area that is changed. Otherwise the cursor is invalidated or must

Re: Warning Question

2007-05-21 Thread Richard Heck
Andre Poenitz wrote: > On Mon, May 21, 2007 at 05:59:45PM -0400, Richard Heck wrote: > >> Just wanted to bring this to people's attention: >> #ifdef WITH_WARNINGS >> #warning This will not work anymore when we have multiple views of the >> same buffer > Do we officially have multiple views now?

Re: Warning Question

2007-05-21 Thread Andre Poenitz
On Mon, May 21, 2007 at 05:59:45PM -0400, Richard Heck wrote: > > Just wanted to bring this to people's attention: > #ifdef WITH_WARNINGS > #warning This will not work anymore when we have multiple views of the > same buffer > // In this case, we will have to correct also the cursors held by > //

Re: Warning Question

2007-05-21 Thread Jean-Marc Lasgouttes
> "Richard" == Richard Heck <[EMAIL PROTECTED]> writes: Richard> This is from Text2.cpp, around line 1220. Since we do Richard> now have multiple views, either there is a bug here or else Richard> the warning can be removed. I think we have a bug, but it is not easy to trigger :) It goes lik