Register forum user name Search FAQ

Gammon Forum

Notice: Any messages purporting to come from this site telling you that your password has expired, or that you need to verify your details, confirm your email, resolve issues, making threats, or asking for money, are spam. We do not email users with any such messages. If you have lost your password you can obtain a new one by using the password reset link.

Due to spam on this forum, all posts now need moderator approval.

 Entire forum ➜ MUSHclient ➜ Suggestions ➜ Triple click: select paragraph?

Triple click: select paragraph?

It is now over 60 days since the last post. This thread is closed.     Refresh page


Posted by Worstje   Netherlands  (899 posts)  Bio
Date Sat 02 Aug 2008 05:51 AM (UTC)
Message
Would it be possible to make a tripleclick select the entire paragraph, in the way that webbrowsers do it too? I regularly need to copy a certain post or message of someone which is rather long, and a simple tripleclick could speed such things up. I don't think it would clash with any existing functionality already in MUSHclient.
Top

Posted by Worstje   Netherlands  (899 posts)  Bio
Date Reply #1 on Sat 02 Aug 2008 06:14 AM (UTC)
Message
Oh, and as an addendum... it would be nice that if the third click were to be held down, and not released, and dragged up/down, the selection would be expandable in units of entire paragraphs. Again, like a webbrowser would do it.
Top

Posted by Nick Gammon   Australia  (23,173 posts)  Bio   Forum Administrator
Date Reply #2 on Sat 02 Aug 2008 06:33 AM (UTC)
Message
The triple-click is a bit of a fudge, I think. I get a ON_WM_LBUTTONDOWN message and a ON_WM_LBUTTONDBLCLK (from Windows) but not a LBUTTONTRIPLECLICK.

To make that work, I would have to:

* do nothing on a double click

* when I got a single-click, check if a double click had recently preceded it

* if I got a double-click and then no click within a certain time, process the original double click

It's all a bit of a mess.

Maybe easier if we had something like Ctrl+Alt+double-click selects a paragraph.

Mind you, how to you define "a paragraph"?

At present, if you shift + double-click it selects the current "line", which is something that can span multiple lines on the screen. That is, effectively a paragraph. Put another way, Shift+double-click selects to the next newline, and the previous newline, which may be a dozen visible lines.

If you want to select a paragraph that is defined in a different way than "to the next newline" you would need a method of knowing when we reached the end of it.

For example:


You are standing within the expanse of the famous Darkhaven Square.  A
stone statue of occupies the square's center, surrounded by gardens of
shrubbery which enhance the air of serenity and peace here in the center
of the city.  The main road lead away in the cardinal directions, while
to the northeast and northwest are forested paths.  The spires of a
cathedral can be seen rising to the northwest.
Exits: north east south west up northeast northwest.


Does the paragraph (in this case lots of individual lines) end at "... rising to the northwest." or "... south west up northeast northwest.". And whatever your answer is, how do we know that, as a programmatic rule?



- Nick Gammon

www.gammon.com.au, www.mushclient.com
Top

Posted by Worstje   Netherlands  (899 posts)  Bio
Date Reply #3 on Sun 03 Aug 2008 02:11 AM (UTC)
Message
Right, shift+doubleclick has my tripleclick functionality... except that it is less intuitive and less useful. It doesn't allow to drag down on the third click and select other paragraphs.

It gets really annoying when copy-pasting something in your buffer, and finding you lack the first few characters or even first line, and/or the last few characters or last line because you didn't pixel-perfectly select the proper lines. Then you end up scrolling back, finding it, manually re-copy-pasting and fixing your original copy-paste. :(

For as far your question goes on 'other than a newline', I'm not sure. Newlines would work fine for me.

Implementation doesn't seem too difficult from what I read here: http://blogs.msdn.com/oldnewthing/archive/2004/10/18/243925.aspx. Maybe it can give you some insights on how to make it easier to implement?

On a sidenote... time after time, I find out MUSH tends to have some functionality I'm looking for, but uses some strange kind of shift/ctrl/alt combination that I honestly don't think about trying. Are those documented anywhere? (besides that, triple click would still be preferred. :P)
Top

Posted by Nick Gammon   Australia  (23,173 posts)  Bio   Forum Administrator
Date Reply #4 on Sun 03 Aug 2008 03:05 AM (UTC)
Message
Ah no, I can't find that documented anywhere, strangely enough.

Apart from here: http://www.gammon.com.au/forum/?id=7540

and here: http://www.gammon.com.au/forum/?id=6592


Well actually, I found the official documentation. :)

In tips.txt, this line:

SHIFT + double-click to select an entire paragraph in the output window.



- Nick Gammon

www.gammon.com.au, www.mushclient.com
Top

The dates and times for posts above are shown in Universal Co-ordinated Time (UTC).

To show them in your local time you can join the forum, and then set the 'time correction' field in your profile to the number of hours difference between your location and UTC time.


15,242 views.

It is now over 60 days since the last post. This thread is closed.     Refresh page

Go to topic:           Search the forum


[Go to top] top

Information and images on this site are licensed under the Creative Commons Attribution 3.0 Australia License unless stated otherwise.