lxterminal: selchars not taken into account

LXTerminal is the standard terminal emulator of LXDE - http://wiki.lxde.org/en/LXTerminal
Locked
f0x1
Posts: 3
Joined: Sat Oct 12, 2019 1:25 pm

lxterminal: selchars not taken into account

Post by f0x1 »

I recently moved from LXTerminal V0.2.0 to V0.3.2, and I noticed that a non-standard choice of "selchars" (the expression which specifies the set of characters that make up a "word" from a double-click) is apparently not any more taken into account as it was in the older version. This expression can be changed by the "Preferences/Advanced" tab, and is listed as "selchars" in the configuration file. My preference is letter (upper- or lowercase), digits, underscore or minus sign, reported as "-A-Za-z0-9_" in the configuration file; but the double-click always accepts into the selection also the dot, the slash, and a few other characters, as if the personal choice would not replace some default. Did anybody already notice this problem ?
drooly
Posts: 791
Joined: Mon Apr 08, 2013 6:45 am

Re: lxterminal: selchars not taken into account

Post by drooly »

f0x1 wrote:I recently moved from LXTerminal V0.2.0 to V0.3.2, and I noticed that a non-standard choice of "selchars" (the expression which specifies the set of characters that make up a "word" from a double-click) is apparently not any more taken into account as it was in the older version. This expression can be changed by the "Preferences/Advanced" tab, and is listed as "selchars" in the configuration file. My preference is letter (upper- or lowercase), digits, underscore or minus sign, reported as "-A-Za-z0-9_" in the configuration file; but the double-click always accepts into the selection also the dot, the slash, and a few other characters, as if the personal choice would not replace some default. Did anybody already notice this problem ?
Can you give an example text to test this with, with explanations.
f0x1
Posts: 3
Joined: Sat Oct 12, 2019 1:25 pm

Re: lxterminal: selchars not taken into account

Post by f0x1 »

Sure, here is an example of the contents of my LXterminal:

Code: Select all

Error : /home/francois/.xbindkeysrc not found or reading not allowed.
please, create one with 'xbindkeys --defaults > /home/francois/.xbindkeysrc'.
or, if you want scheme configuration style,
with 'xbindkeys --defaults-guile > /home/francois/.xbindkeysrc.scm'.
and my file ~/.config/lxterminal/lxterminal.conf contains the line:

Code: Select all

selchars=-A-Za-z0-9_
which, as explained in my original post, means: minus or alphabetic or digit or underscore. In LXterminal version 0.2, a double-click on any of the letters xbindkeysrc on the first line selects the word xbindkeysrc, but with version 0.3, the whole text /home/francois/.xbindkeysrc becomes selected.

By the way, I have another wish concerning LXterminal: in an opened LXterminal having several tabs, a middle-button click in one of the tab buttons closes the tab − this happens when unfortunately the pointer is a bit too high when pasting some text into a terminal. I could not find any possibility of removing this action of closing a tab: it's possible to remove the close tab button (the corresponding parameter is hideclosebutton, but not the middle-button click...
f0x1
Posts: 3
Joined: Sat Oct 12, 2019 1:25 pm

Re: lxterminal: selchars not taken into account

Post by f0x1 »

In fact, the problem seems to be related with gtk3, I've found the following comment on github ( https://github.com/lxde/lxterminal/comm ... d9638439d0 ):

New distro like Debian Buster already use gtk3 instead of gtk2. So that
the vte_terminal_set_word_chars function doesnʼt work anymore.

Here is a patch to add vte_terminal_set_word_char_exceptions function to
support word-wise selection under gtk3.

And about closing a tab by a middle-button click, it seems to be a hard-coded feature, which could be rather easy to fix...
Locked