Le 10/10/2017 à 17:34, Pavel Sanda a écrit :
Hi JMarc,
this is more cosmetical issue, but there is another instance of old carret
being left painted on previous position, this time in connection with
selection.
1. load introduction manual
2. select the text via mouse; start selecting on top of the screen and continue
to the first paragraph
3. as you reach first line of the paragraph continue horizontally to the end of
the line
4. you should see the remainder of old caret position on top and bottom of the
line
The problem is that the hight of cursor depends on cursor
real_current_font value, and this value is not reset properly when using
mouse to select. So the size of the cursor is the size it had when
starting selection. This bug has probably been here forever, also it doe
snot cause caret droppings.
The attached patch cures the issue for the case of mouse selection.
However, the problem also exists when selecting with keyboard. I have to
understand how to fix it without analysing 50 code paths.
JMarc
diff --git a/src/Text3.cpp b/src/Text3.cpp
index f6930aa..5b6e438 100644
--- a/src/Text3.cpp
+++ b/src/Text3.cpp
@@ -1713,6 +1713,7 @@ void Text::dispatch(Cursor & cur, FuncRequest & cmd)
// reset the anchor.
bvcur.setCursor(cur);
bvcur.selection(true);
+ bvcur.setCurrentFont();
if (cur.top() == old) {
// We didn't move one iota, so no need to update the screen.
cur.screenUpdateFlags(Update::SinglePar | Update::FitCursor);