bugGNU TeXmacs - Bugs: bug #28445, Shift+Click should select

 
 

You are not allowed to post comments on this tracker with your current authentication level.

bug #28445: Shift+Click should select

Submitted by:  Victor Porton <porton>
Submitted on:  Wed 30 Dec 2009 05:39:24 PM UTC  
 
Category: EditorPriority: 4 - Bit lower
Item Group: WishlistStatus: Fixed
Privacy: PublicAssigned to: Miguel de Benito <mdbenito>
Originator Name: Victor PortonOpen/Closed: Closed
Release: 1.0.7.2Release: None
Fixed Release: NoneFixed Release: svn 8139
Keywords: 

(Jump to the original submission Jump to the original submission)

Sat 18 Jan 2014 03:20:12 PM UTC, comment #9:

(Finally) Fixed bogus behaviour in rev 8139 => closed.

The issue related to double clicking should be filed as a new tracker item.

Miguel de Benito <mdbenito>
Project MemberIn charge of this item.
Thu 13 Sep 2012 07:36:20 AM UTC, comment #8:

Thanks to the appalling lack of punctuality of the parisian public transportation system, I've had the time to fix the issue with shift+click & drag.

More to come in my next commute?

Miguel de Benito <mdbenito>
Project MemberIn charge of this item.
Tue 11 Sep 2012 09:33:34 PM UTC, comment #7:

Hi, thanks for the testing. I'll try to find some time for this in the near future.

Miguel de Benito <mdbenito>
Project MemberIn charge of this item.
Tue 11 Sep 2012 02:38:31 PM UTC, comment #6:

Also, if I click in a paragraph, and then use the mouse wheel to scroll to another page, then click in another paragraph and then shift-click into the following paragraph, the selection point is taken as the first click on a previous page.

Sam Liddicott <samjam>
Project Member
Tue 11 Sep 2012 02:37:28 PM UTC, comment #5:

I found out how the select word expands - it is if the 2nd click is a double click OR follows on so closely from the 1st click that it still is handled as a double click. If the click counts as a new position since the last click then the double-click-ness should probably be ignored.

Sam Liddicott <samjam>
Project Member
Tue 11 Sep 2012 02:29:33 PM UTC, comment #4:

Very nice! Thanks.

But not quite right...

Click, Shift-click works very well

but:

Click, Shift-click-drag will move the start selection point to the point of the shift-click instead of leaving it at the point of the click

If click is part-way through a word, sometimes the shift-click (if done in a hurry) will cause the first selection point to move to the start of the word. A subsequent shift-click (not in a hurry) will cause it to move back to the original place. I've not found out how to do this deliberately

Sam Liddicott <samjam>
Project Member
Sun 09 Sep 2012 07:17:20 AM UTC, comment #3:

Done.

A note about implementation: I chose to enlarge or shrink the selection in the last direction it grew when in doubt. Many editors seem to compute the shortest distance from the click point to one of the limits of the selection and use that direction for the change of size. However, I'm not sure this would always work (what about tables, etc?) and the current implementation was simple and still useful enough.

Something that remains to be done in this context is multiple selection. But this needs much more work and should go into a separate tracker item.

Miguel de Benito <mdbenito>
Project MemberIn charge of this item.
Thu 09 Aug 2012 09:37:02 AM UTC, comment #2:

It might be better to use a separate routine
'mouse_adjust_selection' for this.
Also, be careful with the mouse grab handling:
you should guarantee that a grabbed mouse is always
correctly ungrabbed; otherwise, the X11 version may freeze.
This should include the case when the modifier status changes
between a mouse button press and release.

Joris van der Hoeven <vdhoeven>
Project Administrator
Wed 08 Aug 2012 11:20:40 AM UTC, comment #1:

I find this feature very useful so I've implemented this in the attached patch as a "proof of concept", but I'd like to have some comments from Joris before committing anything:

  • Is using mouse_drag() ok?: Attaching modifiers to mouse_drag() was simple but could have a different interpretation than that which I gave to it, so it might be better to modify mouse_select().

There are at least two ways of deciding how a selection should grow when the user shift+clicks at some point in the document:

  • Grow/shrink in the last direction it did (I find this to have more consistent behavior and implemented it).
  • Compute which of the selection's endpoints is closest and use this to decide what to do. This seems to be what is done in most text editors/widgets.

(file #26335)

Miguel de Benito <mdbenito>
Project MemberIn charge of this item.
Wed 30 Dec 2009 05:39:24 PM UTC, original submission:

Shift + left mouse click should extend the selection to the point where clicked. So most programs behave, so should TeXmacs also.

Victor Porton <porton>

 

Attached Files
file #26335:  bug_28445.patch added by mdbenito (4KiB - application/octet-stream)

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -unavailable- added by samjam (Posted a comment)
  • -unavailable- added by vdhoeven (Posted a comment)
  • -unavailable- added by mdbenito (Updated the item)
  • -unavailable- added by porton (Submitted the item)
  •  

    Do you think this task is very important?
    If so, you can click here to add your encouragement to it.
    This task has 0 encouragements so far.

    Only logged-in users can vote.

     

    Please enter the title of George Orwell's famous dystopian book (it's a date):

     

     

    Follow 15 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Sat 18 Jan 2014 03:20:12 PM UTCmdbenitoStatusIn Progress=>Fixed
      Open/ClosedOpen=>Closed
      Fixed Releasesvn 5700=>svn 8139
    Thu 13 Sep 2012 07:36:20 AM UTCmdbenitoFixed Releasesvn 5680=>svn 5700
    Tue 11 Sep 2012 09:33:34 PM UTCmdbenitoStatusFixed=>In Progress
      Open/ClosedClosed=>Open
    Sun 09 Sep 2012 07:17:20 AM UTCmdbenitoStatusNeed Info=>Fixed
      Open/ClosedOpen=>Closed
      Fixed Release=>svn 5680
    Wed 08 Aug 2012 11:28:42 AM UTCmdbenitoStatusConfirmed=>Need Info
    Wed 08 Aug 2012 11:20:40 AM UTCmdbenitoAttached File-=>Added bug_28445.patch, #26335
      Priority5 - Normal=>4 - Bit lower
      Originator Name=>Victor Porton
    Mon 05 Mar 2012 03:10:10 PM UTCmdbenitoStatusNone=>Confirmed
      Assigned toNone=>mdbenito

    Back to the top


    Powered by Savane 3.1-cleanup1