New submission from Terry J. Reedy <tjre...@udel.edu>:

In text editors, right click commonly brings up a context menu, often including 
Cut, Copy, Paste, and Delete, with inapplicable entries grayed out.  There are 
at least 2 'standard' behaviors (at least on Windows) with respect to the 
cursor and selections. 

0 (Examples: Windows Notepad and Firefox entry box).  The cursor stays where it 
is and a selection stays selected, even if one has scrolled the cursor and 
possible selection off the screen with mousewheel or scrollbar. Paste inserts 
at the possibly hidden cursor, deleting any possibly hidden selection.  The 
view jumps back to the cursor after Paste but not after Copy and Close (Esc).

1 (Examples: Windows Notepad++ and Libre Office).  The cursor jumps to the spot 
of the click, the same as with a left click.  Any selection, possibly not 
visible, is unselected, the same as with a left click.  Exception: a right 
click within an exception leaves the selection and cursor (at one of the ends) 
alone.

IDLE follows a bit of each pattern and neither.  Right click always moves the 
cursor, even within a selection, but never clears a selection.  I believe that 
this is an accident of history.  Originally, context menus only had 'Go to 
file/line' in Shell and grep output and 'Set/Clear Breakpoint' in editors.  
There was no reason to touch a selection even if the cursor was moved.  
Cut/Copy/Paste were added in 2012 because they are standard.

To really be standard, right click should consistently act like left click and 
unselect.  This prevents accidental deletion.  This would also be consistent 
with making 'Go to line' act the same.

Also, right click within a selection should not move the cursor.

----------
assignee: terry.reedy
components: IDLE
messages: 363577
nosy: terry.reedy
priority: normal
severity: normal
stage: test needed
status: open
title: IDLE right click should unselect
type: behavior
versions: Python 3.7, Python 3.8, Python 3.9

_______________________________________
Python tracker <rep...@bugs.python.org>
<https://bugs.python.org/issue39885>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to