Deutsch English Français Italiano |
<101msg1$qof$1@dont-email.me> View for Bookmarking (what is this?) Look up another Usenet article |
Path: news.eternal-september.org!eternal-september.org!.POSTED!not-for-mail From: Eric Brunel <eric.brunel@pragmadev.invalid.com> Newsgroups: comp.lang.tcl Subject: Mouse "words" vs. keyboard "words" Date: Tue, 3 Jun 2025 13:14:41 -0000 (UTC) Organization: A noiseless patient Spider Lines: 31 Message-ID: <101msg1$qof$1@dont-email.me> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Injection-Date: Tue, 03 Jun 2025 15:14:41 +0200 (CEST) Injection-Info: dont-email.me; posting-host="1013460c0dc8bc7ab44281dacd5f62db"; logging-data="27407"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1+lskF+mKt814Im0s+Yda6Um5rOpCGRswI=" User-Agent: Pan/0.146 (Hic habitat felicitas; 8107378 git@gitlab.gnome.org:GNOME/pan.git) Cancel-Lock: sha1:uoK9XKbRN+14NWD1EztoHk6dWgw= Hello all, I noticed something with tk 9.0.1 that I find a little bit confusing. According to the man pages, in the text widgets, here is the behavior of some of the bindings related to words: - In the "Bindings" section, list item 2, it is specified that "Double- clicking with mouse button 1 selects the word under the mouse"; - In the same section, list item 9, it is specified that "Control-Left and Control-Right move the insertion cursor by words". So far so good. Now let's try: in a text widget, I type the text "foo.bar". If I double-click on "foo" or "bar", it selects the word "foo", or the word "bar", respectively. Now if I put my insertion point just after "bar" and press Control+Left, I would expect the insertion point to move at the beginning of "bar". But that's not what it does: it moves before "foo", as if the "." was part of the word, when it wasn't with the double-click. And same the other way: if my insertion point is before "foo" and I press Control+Right, the insertion point moves after "bar". I get caught every time I try to move my cursor by words with the keyboard, and it's kind of annoying. Also, I tested with tk 8.6 and it wasn't what it was doing, at least on Linux: Control+Left and Control+Right were identifying words the same way as the double-click does. Is the tk 9.0 behavior intentional? If it is, why are words when using the mouse different from the words when using the keyboard? Is there a rationale behind that? Cheers!