Jean-Marc Lasgouttes wrote:
"Abdelrazak" == Abdelrazak Younes <[EMAIL PROTECTED]> writes:
Abdelrazak> Juergen Spitzmueller wrote:
Juergen Spitzmueller wrote:
No, but I wonder why this isn't the case on Linux? Here, endpos is
correct AFAICS.
With stdlib-debug enabled, I can reproduce it on Linux as well.
Below is the debug output. It crashes exactly here:
paragraph.h (260): value_type getChar(pos_type pos) const { return
text_[pos]; }
Has anyone an idea?
Abdelrazak> Yes, the paragraph breaking needs to be redone after the
Abdelrazak> empty space is deleted.
Abdelrazak> This is pretty bad but this dEPM code is very bad to start
Abdelrazak> with.
Abdel, I have a question: in the old times, dEPM just returned true
when rebreaking/updating was needed,
In the old 1.3 time?
In 1.4 or at least in the early 1.5svn days (before I touched it), the
paragraph rebreaking and CoordCache updating were done in any case in
setCursor() for the whole screen. The 'changed' boolean returned by dEPM
is used to indicate that there is need for a redraw afterwards.
The problem here is that the dEPM do touch the contents and a real
metrics update is needed before the completion of the cursorDown() method.
In the past, the brute force was used and the metrics were updated in
any case. Now, we only update if needed.
I say that this is bad because this situation is due to non clean
separation between the model and the view. I've cleaned up setCursor()
to not rely on screen information. Unfortunately cursorDown() uses
x2pos() which by definition relies on the screen info.
An alternative way to solve that issue would have been to call a full
updateMetrics() immediately after the dEPM returns true.
and this bool was propagated
upwards until the update machinery did its job. How come we cannot
rely on this anymore?
We never really relied on that, see above.
Actually, I missed the bug report itself. What was the code patch that
caused the crash?
x2pos() used a non updated rows information immediately after the dEPM
has changed the paragraph contents.
Abdel.