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@winehq.org ReportedBy: bsmith@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 --------------------------------------------------