[Bug 13661] New: Edit Control Missing CUA Behavior for Ctrl-Home & Ctrl-End

wine-bugs at winehq.org wine-bugs at winehq.org
Tue Jun 3 15:33:53 CDT 2008


http://bugs.winehq.org/show_bug.cgi?id=13661

           Summary: Edit Control Missing CUA Behavior for Ctrl-Home & Ctrl-
                    End
           Product: Wine
           Version: unspecified
          Platform: All
        OS/Version: All
            Status: UNCONFIRMED
          Severity: normal
          Priority: P2
         Component: user32
        AssignedTo: wine-bugs at winehq.org
        ReportedBy: bsmith at sudleyplace.com


The CUA behavior for Ctrl-Home and Ctrl-End is to move the cursor to the
start/end of the buffer -- this fix implements that behavior in edit.c.

Please someone create a patch to edit.c from the following code:

* In the declarations section, insert the text
--------------------------------------------------
static void EDIT_MoveBufferHome_ML(EDITSTATE *es);
static void EDIT_MoveBufferEnd_ML(EDITSTATE *es);
--------------------------------------------------

After the definition of (say) EDIT_MoveUp_ML, insert the text
--------------------------------------------------
/*********************************************************************
 *
 *  EDIT_MoveBufferHome_ML
 *
 *  Only for multi line controls
 *  Move the caret to the beginning of the buffer.
 *
 */
static void EDIT_MoveBufferHome_ML(EDITSTATE *es)
{
    EDIT_EM_SetSel(es, 0, 0, FALSE);
    EDIT_EM_ScrollCaret(es);
}


/*********************************************************************
 *
 *  EDIT_MoveBufferEnd_ML
 *
 *  Only for multi line controls
 *  Move the caret to the end of the buffer.
 *
 */
static void EDIT_MoveBufferEnd_ML(EDITSTATE *es)
{
    INT e = get_text_length(es);
    EDIT_EM_SetSel(es, e, e, TRUE);
    EDIT_EM_ScrollCaret(es);
}
--------------------------------------------------

* After the line
--------------------------------------------------
case VK_HOME:
--------------------------------------------------

insert the text
--------------------------------------------------
if ((es->style & ES_MULTILINE) && control)
     EDIT_MoveBufferHome_ML(es);
else
--------------------------------------------------

* After the line
--------------------------------------------------
case VK_END:
--------------------------------------------------

insert the text
--------------------------------------------------
if ((es->style & ES_MULTILINE) && control)
    EDIT_MoveBufferEnd_ML(es);
else
--------------------------------------------------


-- 
Configure bugmail: http://bugs.winehq.org/userprefs.cgi?tab=email
Do not reply to this email, post in Bugzilla using the
above URL to reply.
------- You are receiving this mail because: -------
You are watching all bug changes.



More information about the wine-bugs mailing list