Subject: Patch: bug #1123 - assertion when toggling cursor blink
From: Chris Chamberlin (chricycle@yahoo.com)
Date: Tue Oct 16 2001 - 12:13:45 CDT
Hello,
Here's a patch for bug #1123 - "Disabling cursor blink at wrong time
causes assertion error". It fixes the assertion, and also a minor bug
where toggling the "cursor blink" would move the display to the cursor
position if it was offscreen.
Comments? This is my first AbiWord patch, so if I'm way off please be
nice. :)
chris
Index: abi/src/text/fmt/xp/fv_View.cpp
===================================================================
RCS file: /cvsroot/abi/src/text/fmt/xp/fv_View.cpp,v
retrieving revision 1.507
diff -u -r1.507 fv_View.cpp
--- abi/src/text/fmt/xp/fv_View.cpp 2001/10/04 05:54:45 1.507
+++ abi/src/text/fmt/xp/fv_View.cpp 2001/10/12 20:29:05
@@ -8320,15 +8320,19 @@
pView->m_bCursorBlink = b;
- // if currently blinking, turn it off
- if ( pView->m_bCursorBlink == false && pView->m_pAutoCursorTimer )
- pView->m_pAutoCursorTimer->stop();
-
- // this is an attempt for force the cursors to draw, don't know if
it actually helps
- if ( !pView->m_bCursorBlink && pView->m_bCursorIsOn )
+ if ( pView->m_bCursorBlink ) {
+ // start the cursor blinking
+ pView->_eraseInsertionPoint();
pView->_drawInsertionPoint();
-
- pView->_updateInsertionPoint();
+ }
+ else {
+ // stop blinking and make sure the cursor is drawn
+ if ( pView->m_pAutoCursorTimer )
+ pView->m_pAutoCursorTimer->stop();
+
+ if ( !pView->m_bCursorIsOn )
+ pView->_drawInsertionPoint();
+ }
}
#ifdef BIDI_ENABLED
if (
pPrefs->getPrefsValueBool((XML_Char*)AP_PREF_KEY_DefaultDirectionRtl,
&b) && b != pView->m_bDefaultDirectionRtl)
__________________________________________________
Do You Yahoo!?
Make a great connection at Yahoo! Personals.
http://personals.yahoo.com
This archive was generated by hypermail 2b25 : Tue Oct 16 2001 - 12:13:51 CDT