Re: Warning Question
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? I had trouble with exactly the same with my macro Stefan patch. That's it. Maybe all cursors should be regirtered in a central place, or something like that. It is not trivial in any case. Yes, knowing all cursors would indeed solve a lot of problems! 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. IMHO, the only way to apply DEPM safely and consistently is to call it from a central place. However, for that purpose we need to know all active cursors (before and after some user action). If someone is going to implement this, the first OK is assured :-) Michael
Re: Warning Question
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 to trigger :) It's even more difficult than you can imagine because this use case below is working correctly here. All cursors are always valid ;-) Abdel. It goes like this: in window 1 Some text and a double space somewhere ^(cursor between the two spaces) In window 2 the same paragraph Some text and a double space somewhere ^(cursor at end) Move the cursor in window 1, dEPM triggers, and the cursor is not valid anymore in window 2. JMarc
Re: Warning Question
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 removed. I think we have a bug, but it is not easy to trigger :) It's even more difficult than you can imagine because this use case below is working correctly here. All cursors are always valid ;-) It's even much easier: Put text abcde in two windows. Put the cursor of window 2 in the middle of the text. Select the text in window 2 and delete it. The cursor in window 2 is now invalid. Switch to Window 2 and crash! Stefan PGP.sig Description: Signierter Teil der Nachricht
Re: Warning Question
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. IMHO, the only way to apply DEPM safely and consistently is to call it from a central place. However, for that purpose we need to know all active cursors (before and after some user action). Or... we could eliminate DE{S,P}M altogether, see recent discussion starting at http://marc.info/?l=lyx-develm=104713633219511w=2. A (slightly outdated) patch roughly implementing Proposal 4) is available at http://marc.info/?t=10473470922r=1w=2 Good thing that's Wednesday so I can add a ;-) A/ [I know that this wouldn't magically solve all issues with invalid/wrong cursors due to multiple bv... ]
Re: Warning Question
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 or else the Richard warning can be removed. I think we have a bug, but it is not easy to trigger :) Abdelrazak It's even more difficult than you can imagine because this Abdelrazak use case below is working correctly here. All cursors are Abdelrazak always valid ;-) How is the second cursor updated? JMarc
Re: Warning Question
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! Ouch! It is much worse than I thought. JMarc
Re: Warning Question
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 Richard the warning can be removed. I think we have a bug, but it is not easy to trigger :) It's even more difficult than you can imagine because this use case below is working correctly here. All cursors are always valid ;-) It's even much easier: Put text abcde in two windows. Put the cursor of window 2 in the middle of the text. Select the text in window 2 and delete it. The cursor in window 2 is now invalid. Switch to Window 2 and crash! I have no crash here but an infinite loop with this at the console: correcting cursor to level 0 new: cursor:| anchor: --- | inset: 025CA980 idx: 0 par: 4 pos: 12 selection: 0 x_target: -1 wrong pos 12, max is 0 at level 1. Trying to correct this. old: cursor:| anchor: inset: 025CA980 idx: 0 par: 4 pos: 12 | inset: 025CA980 idx: 0 par: 4 pos: 12 selection: 0 x_target: -1 correcting cursor to level 0 new: cursor:| anchor: --- | inset: 025CA980 idx: 0 par: 4 pos: 12 selection: 0 x_target: -1 wrong pos 12, max is 0 at level 1. Trying to correct this. old: cursor:| anchor: inset: 025CA980 idx: 0 par: 4 pos: 12 | inset: 025CA980 idx: 0 par: 4 pos: 12 selection: 0 x_target: -1 correcting cursor to level 0 new: cursor:| anchor: --- | inset: 025CA980 idx: 0 par: 4 pos: 12 selection: 0 x_target: -1 wrong pos 12, max is 0 at level 1. Trying to correct this. old: cursor:| anchor: inset: 025CA980 idx: 0 par: 4 pos: 12 | inset: 025CA980 idx: 0 par: 4 pos: 12 selection: 0 x_target: -1 correcting cursor to level 0 new: cursor:| anchor: --- | inset: 025CA980 idx: 0 par: 4 pos: 12 selection: 0 x_target: -1 wrong pos 12, max is 0 at level 1. Trying to correct this. old: cursor:| anchor: inset: 025CA980 idx: 0 par: 4 pos: 12 | inset: 025CA980 idx: 0 par: 4 pos: 12 selection: 0 x_target: -1 correcting cursor to level 0 new: cursor:| anchor: -
Re: Warning Question
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 is a bug here or else the Richard warning can be removed. I think we have a bug, but it is not easy to trigger :) Abdelrazak It's even more difficult than you can imagine because this Abdelrazak use case below is working correctly here. All cursors are Abdelrazak always valid ;-) How is the second cursor updated? IIRC, if DEPM is triggered Buffer::changed() is emitted and the other BufferViews will automatically update their cursors. Abdel.
[PATCH] Fixing cursors in multiview mode (was Re: Warning Question)
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 Richard the warning can be removed. I think we have a bug, but it is not easy to trigger :) It's even more difficult than you can imagine because this use case below is working correctly here. All cursors are always valid ;-) It's even much easier: Put text abcde in two windows. Put the cursor of window 2 in the middle of the text. Select the text in window 2 and delete it. The cursor in window 2 is now invalid. Switch to Window 2 and crash! 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. Abdel. Index: Cursor.cpp === --- Cursor.cpp (revision 18473) +++ Cursor.cpp (working copy) @@ -1299,9 +1299,31 @@ void Cursor::fixIfBroken() { + Cursor copy = *this; + + if (depth() == 1) { + bool fixed = false; + if (pit() lastpit()) { + pit() = lastpit(); + pos() = 0; + fixed = true; + } + else if(pos() lastpos()) { + pos() = lastpos(); + fixed = true; + } + if (fixed) { + lyxerr correcting cursor to level depth() endl; + lyxerr old: copy endl; + lyxerr new: *this endl; + clearSelection(); + } + return; + } + // find out last good level - Cursor copy = *this; size_t newdepth = depth(); + while (!copy.empty()) { if (copy.idx() copy.lastidx()) { lyxerr wrong idx copy.idx() Index: frontends/WorkArea.cpp === --- frontends/WorkArea.cpp (revision 18473) +++ frontends/WorkArea.cpp (working copy) @@ -140,9 +140,11 @@ // No need to do anything if this is the current view. The BufferView // metrics are already up to date. - if (lyx_view_ != theApp()-currentView()) + if (lyx_view_ != theApp()-currentView()) { // FIXME: it would be nice to optimize for the off-screen case. buffer_view_-updateMetrics(false); + buffer_view_-cursor().fixIfBroken(); + } updateScrollbar();
Re: [PATCH] Fixing cursors in multiview mode (was Re: Warning Question)
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 crash yet. Stefan PGP.sig Description: Signierter Teil der Nachricht
Re: [PATCH] Fixing cursors in multiview mode (was Re: Warning Question)
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 fine. Couldn't cause a crash yet. I need a second OK. JMarc? Abdel.
Re: Warning Question
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? I had trouble with exactly the same with my macro Stefan> patch. That's it. Maybe all cursors should be regirtered in a central place, or something like that. It is not trivial in any case. Yes, knowing all cursors would indeed solve a lot of problems! 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. IMHO, the only way to apply DEPM safely and consistently is to call it from a central place. However, for that purpose we need to know all active cursors (before and after some user action). If someone is going to implement this, the first "OK" is assured :-) Michael
Re: Warning Question
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 to trigger :) It's even more difficult than you can imagine because this use case below is working correctly here. All cursors are always valid ;-) Abdel. It goes like this: in window 1 Some text and a double space somewhere ^(cursor between the two spaces) In window 2 the same paragraph Some text and a double space somewhere ^(cursor at end) Move the cursor in window 1, dEPM triggers, and the cursor is not valid anymore in window 2. JMarc
Re: Warning Question
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 removed. I think we have a bug, but it is not easy to trigger :) It's even more difficult than you can imagine because this use case below is working correctly here. All cursors are always valid ;-) It's even much easier: Put text "abcde" in two windows. Put the cursor of window 2 in the middle of the text. Select the text in window 2 and delete it. The cursor in window 2 is now invalid. Switch to Window 2 and crash! Stefan PGP.sig Description: Signierter Teil der Nachricht
Re: Warning Question
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. > > IMHO, the only way to apply DEPM safely and consistently is to call it > from a central place. However, for that purpose we need to know all > active cursors (before and after some user action). Or... we could eliminate DE{S,P}M altogether, see recent discussion starting at http://marc.info/?l=lyx-devel=104713633219511=2. A (slightly outdated) patch roughly implementing Proposal 4) is available at http://marc.info/?t=10473470922=1=2 Good thing that's Wednesday so I can add a ;-) A/ [I know that this wouldn't magically solve all issues with invalid/wrong cursors due to multiple bv... ]
Re: Warning Question
> "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 or else the Richard> warning can be removed. >> I think we have a bug, but it is not easy to trigger :) Abdelrazak> It's even more difficult than you can imagine because this Abdelrazak> use case below is working correctly here. All cursors are Abdelrazak> always valid ;-) How is the second cursor updated? JMarc
Re: Warning Question
> "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! Ouch! It is much worse than I thought. JMarc
Re: Warning Question
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 Richard> the warning can be removed. I think we have a bug, but it is not easy to trigger :) It's even more difficult than you can imagine because this use case below is working correctly here. All cursors are always valid ;-) It's even much easier: Put text "abcde" in two windows. Put the cursor of window 2 in the middle of the text. Select the text in window 2 and delete it. The cursor in window 2 is now invalid. Switch to Window 2 and crash! I have no crash here but an infinite loop with this at the console: correcting cursor to level 0 new: cursor:| anchor: --- | inset: 025CA980 idx: 0 par: 4 pos: 12 selection: 0 x_target: -1 wrong pos 12, max is 0 at level 1. Trying to correct this. old: cursor:| anchor: inset: 025CA980 idx: 0 par: 4 pos: 12 | inset: 025CA980 idx: 0 par: 4 pos: 12 selection: 0 x_target: -1 correcting cursor to level 0 new: cursor:| anchor: --- | inset: 025CA980 idx: 0 par: 4 pos: 12 selection: 0 x_target: -1 wrong pos 12, max is 0 at level 1. Trying to correct this. old: cursor:| anchor: inset: 025CA980 idx: 0 par: 4 pos: 12 | inset: 025CA980 idx: 0 par: 4 pos: 12 selection: 0 x_target: -1 correcting cursor to level 0 new: cursor:| anchor: --- | inset: 025CA980 idx: 0 par: 4 pos: 12 selection: 0 x_target: -1 wrong pos 12, max is 0 at level 1. Trying to correct this. old: cursor:| anchor: inset: 025CA980 idx: 0 par: 4 pos: 12 | inset: 025CA980 idx: 0 par: 4 pos: 12 selection: 0 x_target: -1 correcting cursor to level 0 new: cursor:| anchor: --- | inset: 025CA980 idx: 0 par: 4 pos: 12 selection: 0 x_target: -1 wrong pos 12, max is 0 at level 1. Trying to correct this. old: cursor:| anchor: inset: 025CA980 idx: 0 par: 4 pos: 12 | inset: 025CA980 idx: 0 par: 4 pos: 12 selection: 0 x_target: -1 correcting cursor to level 0 new: cursor:| anchor: -
Re: Warning Question
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 is a bug here or else the Richard> warning can be removed. I think we have a bug, but it is not easy to trigger :) Abdelrazak> It's even more difficult than you can imagine because this Abdelrazak> use case below is working correctly here. All cursors are Abdelrazak> always valid ;-) How is the second cursor updated? IIRC, if DEPM is triggered Buffer::changed() is emitted and the other BufferViews will automatically update their cursors. Abdel.
[PATCH] Fixing cursors in multiview mode (was Re: Warning Question)
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 Richard> the warning can be removed. I think we have a bug, but it is not easy to trigger :) It's even more difficult than you can imagine because this use case below is working correctly here. All cursors are always valid ;-) It's even much easier: Put text "abcde" in two windows. Put the cursor of window 2 in the middle of the text. Select the text in window 2 and delete it. The cursor in window 2 is now invalid. Switch to Window 2 and crash! 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. Abdel. Index: Cursor.cpp === --- Cursor.cpp (revision 18473) +++ Cursor.cpp (working copy) @@ -1299,9 +1299,31 @@ void Cursor::fixIfBroken() { + Cursor copy = *this; + + if (depth() == 1) { + bool fixed = false; + if (pit() > lastpit()) { + pit() = lastpit(); + pos() = 0; + fixed = true; + } + else if(pos() > lastpos()) { + pos() = lastpos(); + fixed = true; + } + if (fixed) { + lyxerr << "correcting cursor to level " << depth() << endl; + lyxerr << "old: " << copy << endl; + lyxerr << "new: " << *this << endl; + clearSelection(); + } + return; + } + // find out last good level - Cursor copy = *this; size_t newdepth = depth(); + while (!copy.empty()) { if (copy.idx() > copy.lastidx()) { lyxerr << "wrong idx " << copy.idx() Index: frontends/WorkArea.cpp === --- frontends/WorkArea.cpp (revision 18473) +++ frontends/WorkArea.cpp (working copy) @@ -140,9 +140,11 @@ // No need to do anything if this is the current view. The BufferView // metrics are already up to date. - if (_view_ != theApp()->currentView()) + if (_view_ != theApp()->currentView()) { // FIXME: it would be nice to optimize for the off-screen case. buffer_view_->updateMetrics(false); + buffer_view_->cursor().fixIfBroken(); + } updateScrollbar();
Re: [PATCH] Fixing cursors in multiview mode (was Re: Warning Question)
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 crash yet. Stefan PGP.sig Description: Signierter Teil der Nachricht
Re: [PATCH] Fixing cursors in multiview mode (was Re: Warning Question)
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 fine. Couldn't cause a crash yet. I need a second OK. JMarc? Abdel.
Re: Warning Question
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 be updated (more or less manually, or trivially set to the paragraph begin or something similar). With multiple views every edit gets kind of global because some other cursor can be inside the edited inset. I guess there is no infra structure in place for all that, right? I had trouble with exactly the same with my macro patch. Stefan Am 22.05.2007 um 00:35 schrieb 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 // other bufferviews. It will probably be easier to do that in a more // automated way in CursorSlice code. (JMarc 26/09/2001) #endif This is from Text2.cpp, around line 1220. Since we do now have multiple views, either there is a bug here or else the warning can be removed. Do we officially have multiple views now? I still don't think the core is ready for this. Andre' PGP.sig Description: Signierter Teil der Nachricht
Re: Warning Question
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 the same with my macro Stefan patch. That's it. Maybe all cursors should be regirtered in a central place, or something like that. It is not trivial in any case. JMarc
Re: Warning Question
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 held by // other bufferviews. It will probably be easier to do that in a more // automated way in CursorSlice code. (JMarc 26/09/2001) #endif This is from Text2.cpp, around line 1220. Since we do now have multiple views, either there is a bug here or else the warning can be removed. Do we officially have multiple views now? I still don't think the core is ready for this. What exactly is not not ready? Abdel.
Re: Warning Question
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 no infra structure in place for all that, Stefan right? I had trouble with exactly the same with my macro Stefan patch. That's it. Maybe all cursors should be regirtered in a central place, or something like that. That's about the only method it will work. It is not trivial in any case. Indeed. Andre'
Re: Warning Question
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 be updated (more or less manually, or trivially set to the paragraph begin or something similar). With multiple views every edit gets kind of global because some other cursor can be inside the edited inset. I guess there is no infra structure in place for all that, right? I had trouble with exactly the same with my macro patch. Stefan Am 22.05.2007 um 00:35 schrieb 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 // other bufferviews. It will probably be easier to do that in a more // automated way in CursorSlice code. (JMarc 26/09/2001) #endif This is from Text2.cpp, around line 1220. Since we do now have multiple views, either there is a bug here or else the warning can be removed. Do we officially have multiple views now? I still don't think the core is ready for this. Andre' PGP.sig Description: Signierter Teil der Nachricht
Re: Warning Question
> "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 the same with my macro Stefan> patch. That's it. Maybe all cursors should be regirtered in a central place, or something like that. It is not trivial in any case. JMarc
Re: Warning Question
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 held by // other bufferviews. It will probably be easier to do that in a more // automated way in CursorSlice code. (JMarc 26/09/2001) #endif This is from Text2.cpp, around line 1220. Since we do now have multiple views, either there is a bug here or else the warning can be removed. Do we officially have multiple views now? I still don't think the core is ready for this. What exactly is not not ready? Abdel.
Re: Warning Question
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 no infra structure in place for all that, > Stefan> right? I had trouble with exactly the same with my macro > Stefan> patch. > > That's it. Maybe all cursors should be regirtered in a central place, > or something like that. That's about the only method it will work. > It is not trivial in any case. Indeed. Andre'
Re: Warning Question
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 like this: in window 1 Some text and a double space somewhere ^(cursor between the two spaces) In window 2 the same paragraph Some text and a double space somewhere ^(cursor at end) Move the cursor in window 1, dEPM triggers, and the cursor is not valid anymore in window 2. JMarc
Re: Warning Question
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 // other bufferviews. It will probably be easier to do that in a more // automated way in CursorSlice code. (JMarc 26/09/2001) #endif This is from Text2.cpp, around line 1220. Since we do now have multiple views, either there is a bug here or else the warning can be removed. Do we officially have multiple views now? I still don't think the core is ready for this. Andre'
Re: Warning Question
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? I still don't think the core is ready for this. I'm pretty sure the 1.5.beta3 announcement said we did. rh -- == Richard G Heck, Jr Professor of Philosophy Brown University http://frege.brown.edu/heck/ == Get my public key from http://sks.keyserver.penguin.de Hash: 0x1DE91F1E66FFBDEC Learn how to sign your email using Thunderbird and GnuPG at: http://dudu.dyn.2-h.org/nist/gpg-enigmail-howto
Re: Warning Question
> "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 like this: in window 1 Some text and a double space somewhere ^(cursor between the two spaces) In window 2 the same paragraph Some text and a double space somewhere ^(cursor at end) Move the cursor in window 1, dEPM triggers, and the cursor is not valid anymore in window 2. JMarc
Re: Warning Question
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 > // other bufferviews. It will probably be easier to do that in a more > // automated way in CursorSlice code. (JMarc 26/09/2001) > #endif > This is from Text2.cpp, around line 1220. Since we do now have multiple > views, either there is a bug here or else the warning can be removed. Do we officially have multiple views now? I still don't think the core is ready for this. Andre'
Re: Warning Question
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? I still don't think the core > is ready for this. > I'm pretty sure the 1.5.beta3 announcement said we did. rh -- == Richard G Heck, Jr Professor of Philosophy Brown University http://frege.brown.edu/heck/ == Get my public key from http://sks.keyserver.penguin.de Hash: 0x1DE91F1E66FFBDEC Learn how to sign your email using Thunderbird and GnuPG at: http://dudu.dyn.2-h.org/nist/gpg-enigmail-howto