After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 25290 - Small UI tweak to select-by-word (only select only letter at a time for non-word characters)
Small UI tweak to select-by-word (only select only letter at a time for non-w...
Status: RESOLVED FIXED
Product: vte
Classification: Core
Component: general
0.11.x
Other Linux
: Normal normal
: ---
Assigned To: Behdad Esfahbod
Nalin Dahyabhai
Depends on:
Blocks:
 
 
Reported: 2000-09-20 19:25 UTC by greg
Modified: 2006-07-11 00:51 UTC
See Also:
GNOME target: ---
GNOME version: 2.9/2.10



Description greg 2001-01-27 20:18:14 UTC
Package:  gnome-terminal
Severity: wishlist
Version:  1.2.1
Synopsis: want an option to do painting exactly like xterm does painting
Class:    change-request

Distribution: Red Hat Linux release 6.2 (Zoot)
System: Linux 2.2.14-5.0 i686 unknown
C library: glibc-2.1.3-15
C compiler: egcs-2.91.66
glib: 1.2.8
GTK+: 1.2.8
ORBit: ORBit 0.5.3
gnome-libs: gnome-libs 1.2.4
libxml: 1.8.9
gnome-print: gnome-print-0.20
gnome-core: gnome-core 1.2.1


Description:
I really dig that you can click on URLs in gnoem-terminal to open that
URL in a web browser and so I really want to use gnome-terminal, but the
problem with gnome-terminal is that like all other xterm clones I have
found, it doesn't paint like xterm paints. What I mean more specifically
is that the double-click-drag doesn't work exactly as it does in xterm.
In xterm I never click once with the left mouse button and then paint
text, I always double-click and then drag to paint text. This makes my
painting automatically go over entrie words right when I enter a new
word. Now gnome-terminal supports this feature, too, but the difference
is that when you first double click on a word, if that word has any
characters in it that aren't in the "select-by-word characters" list
that you can set in the Gernal tab of the preferences, then that
character doesn't get highlighted, even if I click on that character
directly. xterm treats those non-word characters as words themselves, so
you can double-click on them and they get highlighted and then continue
painting. So you might think that a possible solution would be to put
characters I want to highlight in a double-click in the select-by-word
characters list, but when I do that, they become part of the word that
gets highlighted and I really want then to be boundaries. Hopefully my
rambling makes sense. As an example, take the string:

$foo = "bar";

If you were to try to paint this line to paste it elsewhere you would
_have_ to do sigle-click-and-drag in gnome-terminal, but in xterm you
could double click on the $ and drag the whole line and it would work. I
_really_ like this behavior and think that gnome-terminal should at
least have an option to tell it to mimic this xterm behavior. Thank
you.




------- Bug moved to this database by debbugs-export@bugzilla.gnome.org 2001-01-27 15:18 -------
This bug was previously known as bug 25290 at http://bugs.gnome.org/
http://bugs.gnome.org/show_bug.cgi?id=25290
Originally filed under the gnome-core product and gnome-terminal component.

Unknown version 1.2.x in product gnome-core. Setting version to the default, "unspecified".
The original reporter (greg@bah.org) of this bug does not have an account here.
Reassigning to the exporter, debbugs-export@bugzilla.gnome.org.
Reassigning to the default owner of the component, gnome-core-maint@bugzilla.gnome.org.

Comment 1 Havoc Pennington 2002-02-14 02:56:31 UTC
libzvt issue
Comment 2 Havoc Pennington 2002-03-09 21:41:34 UTC
Perhaps the behavior should be synced with GtkTextView/GtkEntry,
whatever their behavior is.
Comment 3 Kjartan Maraas 2004-04-30 09:09:20 UTC
Moving to vte for comments. It seems to not behave like xterm either.
Comment 4 Elijah Newren 2004-10-30 22:21:37 UTC
Still relevant; retitiling slightly (it appears that the difference is that vte
selects all non-word characters between valid word characters at once, whereas
xterm only selects one non-word character at a time.  Both select sequences of
word characters all at once.)
Comment 5 Kjartan Maraas 2005-02-14 14:53:31 UTC
Marking this up. It's a bug as long as we diverge from xterm behaviour and we do
here. The stated goal of gnome-terminal since it's inception was to mimick xterm.
Comment 6 Kjartan Maraas 2005-02-14 17:04:55 UTC
One more thing; how did you test this? Did you just type the line after the
prompt or did you mean on a line all by itself? In the latter case I get the
same behaviour except one strange thing, it selects one char beyond the closing
semi-colon. That is, it selects one space extra when I select up to and
including the semi-colon.

If I type it after the prompt I get different behaviour. Then it selects part of
the prompt when I double click on the leading dollar char.

In this case:

[kmaraas@localhost ~]$ $foo = "bar";

It will select the chars after localhost, ie ' ~]$ $'

in this case:

[kmaraas@localhost cvs]$ $foo = "bar";

it selects characters after 'cvs' ie. ']$ $'
Comment 7 Behdad Esfahbod 2006-07-11 00:51:55 UTC
2006-07-10  Behdad Esfahbod  <behdad@gnome.org>

        Bug 121904 – copy-paste of empty line
        Bug 25290 – Small UI tweak to select-by-word (only select only letter
        at a time for non-word characters)
        Bug 339986 – Patch to select localized strings exactly

        * src/vte-private.h:
        * src/vte.c (_vte_terminal_set_default_attributes),
        (_vte_terminal_insert_char), (vte_terminal_is_word_char),
        (vte_same_class), (vte_terminal_get_text_range_maybe_wrapped),
        (vte_terminal_extend_selection):
        * src/vteseq.c (vte_sequence_handler_screen_alignment_test):
        Fix a bunch of selection-related issues.  We now recognize explicitly
        put space at the end of lines, and copy/paste it.  The other change is
        that non-wordchar characters are not grouped together.  Also fixes the
        fallback on Unicode properties that I added two commits ago.