1) Open or create a file with logical lines longer than the width of the
window.
2) Enable visual-line-mode and pc-selection-mode (order doesn't matter).
3) Press the <home> and/or <end> keys with point on one of these long
lines.

Expected: Point moves to the beginning/end of the current visual line.
Observed: Point moves to the beginning/end of the current logical line.

I've attached two (mutually exclusive) patches against the trunk.  I've never submitted a patch to Emacs before, so please let me know which is more in line with the preferred way of doing things.

--PJ