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 --------------------------------------------------
http://bugs.winehq.org/show_bug.cgi?id=13661
--- Comment #1 from Austin English austinenglish@gmail.com 2008-06-03 16:21:13 --- Do you have a testcase showing this?
http://bugs.winehq.org/show_bug.cgi?id=13661
--- Comment #2 from Austin English austinenglish@gmail.com 2008-06-03 16:21:43 --- Created an attachment (id=13651) --> (http://bugs.winehq.org/attachment.cgi?id=13651) user32: edit.c patch
Here's the patch in git format
http://bugs.winehq.org/show_bug.cgi?id=13661
--- Comment #3 from Bob Smith bsmith@sudleyplace.com 2008-06-03 16:34:25 --- (In reply to comment #1)
Do you have a testcase showing this?
Are you saying that Ctrl-Home and Ctrl-End already move the caret to the start/end of the buffer in your Edit Controls?
http://bugs.winehq.org/show_bug.cgi?id=13661
--- Comment #4 from Bob Smith bsmith@sudleyplace.com 2008-06-03 16:36:04 --- (In reply to comment #2)
Created an attachment (id=13651)
--> (http://bugs.winehq.org/attachment.cgi?id=13651) [details]
user32: edit.c patch
Here's the patch in git format
(In reply to comment #2)
Created an attachment (id=13651)
--> (http://bugs.winehq.org/attachment.cgi?id=13651) [details]
user32: edit.c patch
Here's the patch in git format
Many thanks.
http://bugs.winehq.org/show_bug.cgi?id=13661
--- Comment #5 from Bob Smith bsmith@sudleyplace.com 2008-06-03 16:53:37 --- (In reply to comment #3)
(In reply to comment #1)
Do you have a testcase showing this?
Are you saying that Ctrl-Home and Ctrl-End already move the caret to the start/end of the buffer in your Edit Controls?
As I look back at my words, they came out too quickly and too harsh -- please accept my apologies.
I don't have a test case as I expected that any and all multiline Edit Controls would exhibit this behavior. That is, Ctrl-Home and Ctrl-End behave the same as Home and End, respectively.
http://bugs.winehq.org/show_bug.cgi?id=13661
--- Comment #6 from Austin English austinenglish@gmail.com 2008-06-03 17:50:38 --- (In reply to comment #5)
(In reply to comment #3)
(In reply to comment #1)
Do you have a testcase showing this?
Are you saying that Ctrl-Home and Ctrl-End already move the caret to the start/end of the buffer in your Edit Controls?
No, I'm asking for a testcase to test on windows/wine to verify the problem and test this patch.
As I look back at my words, they came out too quickly and too harsh -- please accept my apologies.
No worries :-).
I don't have a test case as I expected that any and all multiline Edit Controls would exhibit this behavior. That is, Ctrl-Home and Ctrl-End behave the same as Home and End, respectively.
If you could write a small testcase, preferably to be added to the wine testsuite, it would be a big help.
http://bugs.winehq.org/show_bug.cgi?id=13661
--- Comment #7 from Bob Smith bsmith@sudleyplace.com 2008-06-03 18:20:20 --- (In reply to comment #6)
If you could write a small testcase, preferably to be added to the wine testsuite, it would be a big help.
I'm unclear as to what form this test case would take as it involves user keyboard interaction, or should it send the required keystrokes to the control to simulate the actual vs. expected behavior?
http://bugs.winehq.org/show_bug.cgi?id=13661
--- Comment #8 from Austin English austinenglish@gmail.com 2008-06-03 19:02:50 --- (In reply to comment #7)
(In reply to comment #6)
If you could write a small testcase, preferably to be added to the wine testsuite, it would be a big help.
I'm unclear as to what form this test case would take as it involves user keyboard interaction, or should it send the required keystrokes to the control to simulate the actual vs. expected behavior?
An automated test would be preferred.
http://bugs.winehq.org/show_bug.cgi?id=13661
--- Comment #9 from Dmitry Timoshkov dmitry@codeweavers.com 2008-06-03 22:40:07 --- It's pretty hard to add an automated test for user interactions, besides it's pretty clear what the problem is, and what's more important the problems should be fixed long time ago: http://www.winehq.org/pipermail/wine-cvs/2008-April/042518.html http://www.winehq.org/pipermail/wine-cvs/2008-April/042519.html
http://bugs.winehq.org/show_bug.cgi?id=13661
Dmitry Timoshkov dmitry@codeweavers.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|UNCONFIRMED |RESOLVED Resolution| |FIXED
--- Comment #10 from Dmitry Timoshkov dmitry@codeweavers.com 2008-06-04 22:23:18 --- Marking as fixed. Feel free to reopen if it's still not working for you.
http://bugs.winehq.org/show_bug.cgi?id=13661
--- Comment #11 from Bob Smith bsmith@sudleyplace.com 2008-06-05 00:36:20 --- (In reply to comment #10)
Marking as fixed. Feel free to reopen if it's still not working for you.
That's great. However, why is it that when I search the bug list for things like
Ctrl home (27 hits, none relevant) Ctrl-home (0 hits) Ctrl+home (0 hits)
and other variations, I can't find the bug fix you mention?
My question is not where is this bug, but what search terms should I have used in the beginning to find it?
http://bugs.winehq.org/show_bug.cgi?id=13661
--- Comment #12 from Dmitry Timoshkov dmitry@codeweavers.com 2008-06-05 01:02:56 --- (In reply to comment #11)
My question is not where is this bug, but what search terms should I have used in the beginning to find it?
http://bugs.winehq.org/show_bug.cgi?id=12512
http://bugs.winehq.org/show_bug.cgi?id=13661
Dmitry Timoshkov dmitry@codeweavers.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Resolution|FIXED |DUPLICATE
--- Comment #13 from Dmitry Timoshkov dmitry@codeweavers.com 2008-06-05 01:04:50 --- After all this bug is a duplicate.
*** This bug has been marked as a duplicate of bug 12512 ***
http://bugs.winehq.org/show_bug.cgi?id=13661
Dmitry Timoshkov dmitry@codeweavers.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|RESOLVED |CLOSED
--- Comment #14 from Dmitry Timoshkov dmitry@codeweavers.com 2008-06-05 01:05:09 --- Closing dup.
http://bugs.winehq.org/show_bug.cgi?id=13661
--- Comment #15 from Bob Smith bsmith@sudleyplace.com 2008-06-05 02:21:01 --- (In reply to comment #12)
(In reply to comment #11)
My question is not where is this bug, but what search terms should I have used in the beginning to find it?
I'm trying to ask a question about the search capability of the bug list and you seem to want to answer a different question.
http://bugs.winehq.org/show_bug.cgi?id=13661
--- Comment #16 from Dmitry Timoshkov dmitry@codeweavers.com 2008-06-05 02:39:07 --- (In reply to comment #15)
I'm trying to ask a question about the search capability of the bug list and you seem to want to answer a different question.
By default the search in RESOLVED, VERIFIED, CLOSED bug lists is not selected, you have to turn it on manually. Does that answer your question?
http://bugs.winehq.org/show_bug.cgi?id=13661
--- Comment #17 from Bob Smith bsmith@sudleyplace.com 2008-06-06 11:22:54 --- (In reply to comment #16)
(In reply to comment #15)
I'm trying to ask a question about the search capability of the bug list and you seem to want to answer a different question.
By default the search in RESOLVED, VERIFIED, CLOSED bug lists is not selected, you have to turn it on manually. Does that answer your question?
Yes, thank you.
http://bugs.winehq.org/show_bug.cgi?id=13661
Austin English austinenglish@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Platform|All |Other OS/Version|All |other
--- Comment #18 from Austin English austinenglish@gmail.com 2012-02-23 15:08:54 CST --- Removing deprecated 'All' Platform/OS.