diff: update the cursor position when right-clicking

Emulate a left-click when the user has nothing selected and is invoking
the context menu via right-click.  This has the effect of moving the
cursor to the current position, which is the most intuitive thing to do.

If something is selected then this does nothing so that the selection is
preserved.

Reported-by: Phillip Whelan <madjesta@gmail.com>
Helped-by: Uri Okrent <uokrent@gmail.com>
Signed-off-by: David Aguilar <davvid@gmail.com>