tallforasmurf / PPQT

A post-processing tool for PGDP written in Python, PyQt4, and Qt
GNU General Public License v3.0
4 stars 2 forks source link

partial replace #112

Closed bibimbop closed 11 years ago

bibimbop commented 11 years ago

I have the following lines:

turpitude de leur métier. Dans un autre endroit (<i>De</i>
<i>octo ad Dulcit. quæst.</i>), il dit la même chose presque

I search for

</i>\n<i>

and replace with:

\n

The text found is correctly highlighted, however replace will only remove the . on the second line is still there, highlighted.

tallforasmurf commented 11 years ago

It's even worse than that; try it with abc def replacing c\nd with \n -- text rendering of the remaining d gets confused, a sign that something invalid has been put in the edit data.

tallforasmurf commented 11 years ago

OK, good news, the problem is not in the inserted text. The document contents are correctly updated with the replacement newline. What's borked is the display, following replacement of text at the end of a line with a newline. You can see this as follows:

  • perform either of the replacements above (</i>\n<i> or c\nd)
  • observe the display is incorrect
  • make any tiny adjustment of the document scroll bar or page up or down or do anything that makes the document panel be repainted -- voila, no problem.

So I need to figure out how to make the edit panel repaint itself after a replace...

tallforasmurf commented 11 years ago

Commit 2e61872