Re: Lyx Crash on text - ERT with paragraphs with leading blanks..

2007-05-13 Thread Bo Peng
1. lyx-code 2. enter a 123456 (there are four leading spaces) 3. change environment to standard 4. select a and 1 5. cut a, 12345 are removed. It is pretty easy to avoid the crash by adding something like right = min(right, par[pit].size() + 1) after line 304 of

Re: Lyx Crash on text - ERT with paragraphs with leading blanks..

2007-05-13 Thread Edwin Leuven
Bo Peng wrote: Isn't every crash a critical bug? i would say that it depends on the probability of it happening. some critical bugs are p=0 critical for me personally... Why nobody is interested? i don't think people are uninterested, but either busy with other stuff or unfamiliar with

Re: Lyx Crash on text - ERT with paragraphs with leading blanks..

2007-05-13 Thread Dov Feldstern
Bo Peng wrote: 1. lyx-code 2. enter a 123456 (there are four leading spaces) 3. change environment to standard 4. select a and 1 5. cut a, 12345 are removed. It is pretty easy to avoid the crash by adding something like right = min(right, par[pit].size() + 1) after line 304 of

Re: Lyx Crash on text - ERT with paragraphs with leading blanks..

2007-05-13 Thread Bo Peng
The complicated part is: what did the user *mean* by doing this? Can you think of a realistic case in which the user would want to do what you're describing (namely, switch from LyX-Code to standard text) --- and if so, what does the user mean by it? And how would the user want the spaces to be

Re: Lyx Crash on text - ERT with paragraphs with leading blanks..

2007-05-13 Thread Dov Feldstern
Bo Peng wrote: The complicated part is: what did the user *mean* by doing this? Can you think of a realistic case in which the user would want to do what you're describing (namely, switch from LyX-Code to standard text) --- and if so, what does the user mean by it? And how would the user want

Re: Lyx Crash on text - ERT with paragraphs with leading blanks..

2007-05-13 Thread Bo Peng
I will submit a patch to prevent such a crash with a FIXME in its comment. A bugzilla entry will also be created. Hi, Jose, See http://bugzilla.lyx.org/show_bug.cgi?id=3600 . Can I submit the following patch before a proper solution is implemented? My understand is that a proper solution will

Re: Lyx Crash on text - ERT with paragraphs with leading blanks..

2007-05-13 Thread Bo Peng
Can you not select the LyX-Code directly, and inset-program listing? That would at least be clearer on the conceptual level, because you're going from verbatim to verbatim... Actually, if I go from lyx-code to listings directly, this problem will not happen. I removed the lyx-code environment a

Re: Lyx Crash on text - ERT with paragraphs with leading blanks..

2007-05-13 Thread Dov Feldstern
Bo Peng wrote: I will submit a patch to prevent such a crash with a FIXME in its comment. A bugzilla entry will also be created. Hi, Jose, See http://bugzilla.lyx.org/show_bug.cgi?id=3600 . Bo, can I add a comment to bugzilla pointing to this thread? I feel that often there are discussions

Re: Lyx Crash on text - ERT with paragraphs with leading blanks..

2007-05-13 Thread Jean-Marc Lasgouttes
Dov == Dov Feldstern [EMAIL PROTECTED] writes: Dov The complicated part is: what did the user *mean* by doing this? Dov Can you think of a realistic case in which the user would want to Dov do what you're describing (namely, switch from LyX-Code to Dov standard text) The user should be able to

Re: Lyx Crash on text - ERT with paragraphs with leading blanks..

2007-05-13 Thread José Matos
On Sunday 13 May 2007 21:20:51 Bo Peng wrote: Hi, Jose, See http://bugzilla.lyx.org/show_bug.cgi?id=3600 . Can I submit the following patch before a proper solution is implemented? My understand is that a proper solution will be difficult, but avoiding such a crash for now is necessary.

Re: Lyx Crash on text -> ERT with paragraphs with leading blanks..

2007-05-13 Thread Bo Peng
1. lyx-code 2. enter a 123456 (there are four leading spaces) 3. change environment to standard 4. select a and 1 5. cut a, 12345 are removed. It is pretty easy to avoid the crash by adding something like right = min(right, par[pit].size() + 1) after line 304 of

Re: Lyx Crash on text -> ERT with paragraphs with leading blanks..

2007-05-13 Thread Edwin Leuven
Bo Peng wrote: Isn't every crash a critical bug? i would say that it depends on the probability of it happening. some "critical" bugs are p=0 critical for me personally... Why nobody is interested? i don't think people are uninterested, but either busy with other stuff or unfamiliar with

Re: Lyx Crash on text -> ERT with paragraphs with leading blanks..

2007-05-13 Thread Dov Feldstern
Bo Peng wrote: 1. lyx-code 2. enter a 123456 (there are four leading spaces) 3. change environment to standard 4. select a and 1 5. cut a, 12345 are removed. It is pretty easy to avoid the crash by adding something like right = min(right, par[pit].size() + 1) after line 304 of

Re: Lyx Crash on text -> ERT with paragraphs with leading blanks..

2007-05-13 Thread Bo Peng
The complicated part is: what did the user *mean* by doing this? Can you think of a realistic case in which the user would want to do what you're describing (namely, switch from LyX-Code to standard text) --- and if so, what does the user mean by it? And how would the user want the spaces to be

Re: Lyx Crash on text -> ERT with paragraphs with leading blanks..

2007-05-13 Thread Dov Feldstern
Bo Peng wrote: The complicated part is: what did the user *mean* by doing this? Can you think of a realistic case in which the user would want to do what you're describing (namely, switch from LyX-Code to standard text) --- and if so, what does the user mean by it? And how would the user want

Re: Lyx Crash on text -> ERT with paragraphs with leading blanks..

2007-05-13 Thread Bo Peng
I will submit a patch to prevent such a crash with a FIXME in its comment. A bugzilla entry will also be created. Hi, Jose, See http://bugzilla.lyx.org/show_bug.cgi?id=3600 . Can I submit the following patch before a proper solution is implemented? My understand is that a proper solution will

Re: Lyx Crash on text -> ERT with paragraphs with leading blanks..

2007-05-13 Thread Bo Peng
Can you not select the LyX-Code directly, and inset->program listing? That would at least be clearer on the conceptual level, because you're going from verbatim to verbatim... Actually, if I go from lyx-code to listings directly, this problem will not happen. I removed the lyx-code environment

Re: Lyx Crash on text -> ERT with paragraphs with leading blanks..

2007-05-13 Thread Dov Feldstern
Bo Peng wrote: I will submit a patch to prevent such a crash with a FIXME in its comment. A bugzilla entry will also be created. Hi, Jose, See http://bugzilla.lyx.org/show_bug.cgi?id=3600 . Bo, can I add a comment to bugzilla pointing to this thread? I feel that often there are discussions

Re: Lyx Crash on text -> ERT with paragraphs with leading blanks..

2007-05-13 Thread Jean-Marc Lasgouttes
> "Dov" == Dov Feldstern <[EMAIL PROTECTED]> writes: Dov> The complicated part is: what did the user *mean* by doing this? Dov> Can you think of a realistic case in which the user would want to Dov> do what you're describing (namely, switch from LyX-Code to Dov> standard text) The user

Re: Lyx Crash on text -> ERT with paragraphs with leading blanks..

2007-05-13 Thread José Matos
On Sunday 13 May 2007 21:20:51 Bo Peng wrote: > Hi, Jose, > > See http://bugzilla.lyx.org/show_bug.cgi?id=3600 . > > Can I submit the following patch before a proper solution is > implemented? My understand is that a proper solution will be > difficult, but avoiding such a crash for now is

Lyx Crash on text - ERT with paragraphs with leading blanks..

2007-05-09 Thread Bo Peng
1. create a lyx file 2. layout LyX-code 3. enter something with leading blanks. a b 4. select, change layout to standard, the leading blanks of b are not removed. 5. select all, insert ERT. crash. Assertion triggered in int lyx::Paragraph::Pimpl::eraseChars(lyx::pos_type, lyx::pos_type, bool)

Re: Lyx Crash on text - ERT with paragraphs with leading blanks..

2007-05-09 Thread Bo Peng
On 5/9/07, Bo Peng [EMAIL PROTECTED] wrote: 1. create a lyx file 2. layout LyX-code 3. enter something with leading blanks. a b 4. select, change layout to standard, the leading blanks of b are not removed. 5. select all, insert ERT. crash. The problem is that after step 4, the paragraph is

Lyx Crash on text -> ERT with paragraphs with leading blanks..

2007-05-09 Thread Bo Peng
1. create a lyx file 2. layout LyX-code 3. enter something with leading blanks. a b 4. select, change layout to standard, the leading blanks of b are not removed. 5. select all, insert ERT. crash. Assertion triggered in int lyx::Paragraph::Pimpl::eraseChars(lyx::pos_type, lyx::pos_type, bool)

Re: Lyx Crash on text -> ERT with paragraphs with leading blanks..

2007-05-09 Thread Bo Peng
On 5/9/07, Bo Peng <[EMAIL PROTECTED]> wrote: 1. create a lyx file 2. layout LyX-code 3. enter something with leading blanks. a b 4. select, change layout to standard, the leading blanks of b are not removed. 5. select all, insert ERT. crash. The problem is that after step 4, the paragraph