This Trac instance is not used for development anymore!

We migrated our development workflow to git and Gitea.
To test the future redirection, replace trac by ariadne in the page URL.

Changeset 10011 for ps


Ignore:
Timestamp:
08/16/11 03:01:39 (13 years ago)
Author:
kennethalong
Message:

Fixes #898

File:
1 edited

Legend:

Unmodified
Added
Removed
  • ps/trunk/source/gui/CInput.cpp

    r9658 r10011  
    790790        {
    791791            CStrW *pCaption = (CStrW*)m_Settings["caption"].m_pSetting;
     792
     793            if (pCaption->length() == 0)
     794                break;
     795
    792796            m_iBufferPos = m_iBufferPos_Tail = GetMouseHoveringTextPosition();
     797
     798
     799            if (m_iBufferPos >= pCaption->length())
     800                m_iBufferPos = m_iBufferPos_Tail = pCaption->length() - 1;
     801
    793802
    794803            // See if we are clicking over whitespace
     
    831840                            break;
    832841                    }
     842
     843                    if (m_iBufferPos_Tail == pCaption->length())
     844                        break;
     845
    833846                    // now go to the right until we hit whitespace or punctuation
    834847                    while (++m_iBufferPos_Tail < (int)pCaption->length())
     
    846859                            break;
    847860                    }
     861
     862                    if (m_iBufferPos_Tail == pCaption->length())
     863                        break;
    848864
    849865                    // Don't include the leading whitespace
Note: See TracChangeset for help on using the changeset viewer.