GNOME Bugzilla – Bug 25290
Small UI tweak to select-by-word (only select only letter at a time for non-word characters)
Last modified: 2006-07-11 00:51:55 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.
libzvt issue
Perhaps the behavior should be synced with GtkTextView/GtkEntry, whatever their behavior is.
Moving to vte for comments. It seems to not behave like xterm either.
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.)
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.
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. ']$ $'
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.