View Issue Details

IDProjectCategoryView StatusLast Update
0015325LazarusIDEpublic2010-05-18 13:35
ReporterStephanoAssigned ToMartin Friebe 
PrioritynormalSeverityminorReproducibilityalways
Status closedResolutionfixed 
Product Version0.9.29 (SVN)Product Build 
Target Version0.9.30Fixed in Version0.9.29 (SVN) 
Summary0015325: Source editor: Right click deselects text
DescriptionIf the "right mouse includes caret move" setting in the environment/editor/mouse options is set, then right clicking selected text will deselect it.

Hence, copying a block of text with the mouse is no longer possible.

OS: Ubuntu 9.10
TagsNo tags attached.
Fixed in Revision23862
LazTarget0.9.30
Widgetset
Attached Files

Activities

Martin Friebe

2009-12-12 15:22

manager   ~0032997

Indeed, I see the problem.

Any idea how to fix this? (In terms of how it should behave, not how to fix the source-code).

Previous versions of SynEdit did set the caret inside the selection, which wasn't right either. With text being selected, the caret must be at either end of the selection. This is and was enforced in every other situation.

So if the caret moves, then a none-persistent selection must be cleared, this is correct behaviour. (yet inconvenient in this case)

Maybe the caret should only be moved, if there is no selection (or if the selection is persistent)?

Please let me know if you have any ideas on this.

---

As a workaround (until a decision on the behaviour is made) you can add an entry to the advanced mouse options:
- Choose the selection-node (2nd entry in the context tree)
- add right click as pop-up menu, but do not move the caret.

If you click on un-selected text the caret will still move

Stephano

2009-12-12 19:17

developer   ~0033001

IMHO, if and only if text is selected and right click is within the selection, then the caret must not move even if the "right mouse includes caret move" is set.

I am not sure about persistent selections as I have never used this feature.

Stephano

2010-03-06 22:56

developer   ~0034994

Any chance this bug will be fixed?

Martin Friebe

2010-03-07 11:59

manager   ~0035007

Don't worry, the bug is still on my list. I simply did not have any time during the last few months...

Martin Friebe

2010-03-07 12:05

manager   ~0035008

I checked the old behaviour was to not move the caret at all (with right mouse), if a selection existed. This applied to both: clicks over and clicks outside the selected text area.
This has been restored as follows.
"Move Caret" for a mouse button is ignored if:
- A non persistent selection exists
- And the mouseclick is set to open the context menu (never mind to which button this action is bound)

Stephano

2010-03-07 21:11

developer   ~0035019

Right clicking the selected text works fine now.

However, when the right click is outside the highlighted text, shouldn't the text be deselected and the caret moved? In other words, why would you right click outside the selection unless you wanted to move the caret?

Martin Friebe

2010-05-14 23:31

manager   ~0037600

The popup menu contains "copy", in order to copy the current selection you can open the context menu anywhere, even outside the selection

Martin Friebe

2010-05-15 01:05

manager   ~0037601

Changed my mind: look under advanced mouse settings / double click "popup menu" / see "move caret when selection exists" drop-down

Stephano

2010-05-15 11:22

developer   ~0037606

Cool!

The descriptions in the dropdown list could be more explicit such as:

If a selection exists, move caret:
- Never
- Always
- Only when click is outside selection OR Depending on click position/location

Mattias Gaertner

2010-05-15 11:38

manager   ~0037610

Options should have shorter Captions than that. For explanations use Hints.

Issue History

Date Modified Username Field Change
2009-12-12 10:30 Stephano New Issue
2009-12-12 10:30 Stephano Widgetset => GTK 2
2009-12-12 15:22 Martin Friebe LazTarget => -
2009-12-12 15:22 Martin Friebe Note Added: 0032997
2009-12-12 15:22 Martin Friebe Assigned To => Martin Friebe
2009-12-12 15:22 Martin Friebe Status new => acknowledged
2009-12-12 19:17 Stephano Note Added: 0033001
2010-03-06 22:56 Stephano Note Added: 0034994
2010-03-07 11:59 Martin Friebe Note Added: 0035007
2010-03-07 12:05 Martin Friebe Fixed in Revision => 23862
2010-03-07 12:05 Martin Friebe LazTarget - => 0.9.30
2010-03-07 12:05 Martin Friebe Widgetset GTK 2 =>
2010-03-07 12:05 Martin Friebe Status acknowledged => resolved
2010-03-07 12:05 Martin Friebe Fixed in Version => 0.9.29 (SVN)
2010-03-07 12:05 Martin Friebe Resolution open => fixed
2010-03-07 12:05 Martin Friebe Note Added: 0035008
2010-03-07 12:06 Martin Friebe Target Version => 0.9.30
2010-03-07 21:11 Stephano Note Added: 0035019
2010-05-14 23:31 Martin Friebe Note Added: 0037600
2010-05-15 01:05 Martin Friebe Note Added: 0037601
2010-05-15 11:22 Stephano Note Added: 0037606
2010-05-15 11:38 Mattias Gaertner Note Added: 0037610
2010-05-18 13:35 Stephano Status resolved => closed