Pango text select with double click stops at underscore.

Bug #413360 reported by James
20
This bug affects 4 people
Affects Status Importance Assigned to Milestone
gedit
Fix Released
Wishlist
gedit (Ubuntu)
Fix Released
Low
Ubuntu Desktop Bugs

Bug Description

Description: Ubuntu 8.04.3 LTS
Release: 8.04

gedit:
  Installed: 2.22.3-0ubuntu2
  Candidate: 2.22.3-0ubuntu2
  Version table:
 *** 2.22.3-0ubuntu2 0
        500 http://au.archive.ubuntu.com hardy-updates/main Packages
        100 /var/lib/dpkg/status
     2.22.1-0ubuntu1 0
        500 http://au.archive.ubuntu.com hardy/main Packages

libpango1.0-0:
  Installed: 1.20.5-0ubuntu1.1
  Candidate: 1.20.5-0ubuntu1.1
  Version table:
 *** 1.20.5-0ubuntu1.1 0
        500 http://au.archive.ubuntu.com hardy-updates/main Packages
        500 http://security.ubuntu.com hardy-security/main Packages
        100 /var/lib/dpkg/status
     1.20.1-1 0
        500 http://au.archive.ubuntu.com hardy/main Packages

I'm not 100% sure this is a pango problem, but I think it is at the heart of it.

Using gedit, if a variable has an underscore, a double click to select that variable stops at the underscore. E.g.

int foo_bar;

If you double click in foo, only foo is selected. It would be most helpful if the whole variable was selected, as it is with other text editors I've used.

To use the underscore for variable names is pretty common, and I think much nicer than humpy text (FooBar).

Changed in gedit:
status: Unknown → Confirmed
Changed in ubuntu:
status: New → Confirmed
affects: ubuntu → gedit (Ubuntu)
Changed in gedit (Ubuntu):
status: Confirmed → Triaged
assignee: nobody → Ubuntu Desktop Bugs (desktop-bugs)
Changed in gedit (Ubuntu):
importance: Undecided → Low
Revision history for this message
James (jamessteward) wrote :

What would be really nice is;
1. single click positions the cursor.
2. double click text select delimited by an underscore or white space.
3. triple click text select delimited by white space.
4. quadruple click text select delimited by '\n'.

Revision history for this message
Derek_ (derek-name) wrote :

I have made a Gedit plugin that allows this to be configured:

http://code.google.com/p/gedit-click-config/

Revision history for this message
James (jamessteward) wrote : Re: [Bug 413360] Re: Pango text select with double click stops at underscore.

On Fri, 2010-01-01 at 17:08 +0000, Derek_ wrote:
> I have made a Gedit plugin that allows this to be configured:
>
> http://code.google.com/p/gedit-click-config/

This plugin kicks a$$. Thanks Derek.

I like this config:

single click: Geditword
double click: Gnome terminal default
triple click: Line+
quad click: Paragraph+
quint click: None.

This seems to operate in a nice logical way for me. I hope the plugin
makes it into Ubuntu's gedit-plugins package ;-)

On a side note the class browser plugin is also a must have, IMHO.
http://www.stambouliote.de/projects/gedit_plugins.html

JS.

Revision history for this message
Derek_ (derek-name) wrote :

Thanks, James. I've enjoyed using it just while writing it, and I'm still experimenting with different configurations for my own use.

I will be putting up a new version sometime soon that let's you associate configurations with code languages. For example, I currently have my quintuple-click set to select a Python function, but on any other kind of code I would want that to select something else.

Thanks for the plugin recommendation. I've been using a similar plugin called Tag Browser, but I just tried out Class Browser, and it does seem to be just a little better. Tag Browser doesn't show attributes in the tree, for one thing.

Derek

Revision history for this message
egarcia (egarcia) wrote :

Hi Derek!

Thanks for this useful plugin!

Revision history for this message
Hugh Warrington (x-launchpad-hughw-org) wrote :

I second that! Your plugin is fantastic Derek, many thanks.

Changed in gedit:
importance: Unknown → Wishlist
Revision history for this message
trusktr (trusktr) wrote :

thank you thank you thank you thank you!!! Nice plugin.

It took me a little while to get it right though because i had to learn regular expressions. :D

Also, i put the plugin in the /usr/lib/gedit-2/plugins/ folder so when i made changes, they'd work, but if i quit gedit and restart, none of the settings would be saved since ROOT privileges were required. So in order to set up the settings, i opened gedit as admin and set up my config so i could get underscores included with double click. Then, when opening the gedit as normal user the settings are there.

Perhaps add a feature to detect the need for root password so gnome can ask for the root password and save it for the session.

Revision history for this message
trusktr (trusktr) wrote :

Oh yeah, one more thing. This should be filed as a bug/request for Gedit, not Ubuntu. Ubuntu doesn't *make* Gedit. It's part of the Gnome desktop. ;)

Revision history for this message
trusktr (trusktr) wrote :

What i was mentioning above, a simple fix is to make the plugin store it's settings in gconf for the user.

Changed in gedit:
status: Confirmed → Fix Released
Revision history for this message
Launchpad Janitor (janitor) wrote :
Download full text (7.6 KiB)

This bug was fixed in the package gedit - 3.18.1-1ubuntu1

---------------
gedit (3.18.1-1ubuntu1) xenial; urgency=medium

  * Newer upstream version and merge on Debian, includes those changes
    - code snippets plugin improvements (lp: #1335613)
    - implements a minimap widget (lp: #1302451)
    - don't close infobar after print preview is dismissed (lp: #929554)
    - some segfault fixes (lp: #928420)
    - save files even when backups can't be created (lp: #867923)
    - let you edit binary files (lp: #848253, #575500)
    - count underscores are part of a word (lp: #615506, #413360)
    - don't display warnings when saving after foccusing out (lp: #589906)
    - use correct printing margins (lp: #331077)
    - ctrl-T opens new tabs (lp: #301942)
    - hide print preview tooltips when moving the cursor (lp: #234711)
    - include word wrap option in the statusbar popover (lp: #118522)
  * debian/control.in:
    - don't Build-Depends on gnome-icon-theme-symbolic it's deprecated
    - gedit replaces gedit-common (<< 3.18.1-1ubuntu1)
    - updated the requirements
  * debian/patches/06_lp_401692.patch:
    - dropped, the change is included upstream now
  * debian/rules:
    - create compatiblity desktop file for upgraders
  * Remaining other changes
  * debian/rules:
    - Build without --Bsymbolic-functions to fix issues
  * debian/patches/0001-Use-the-OSX-menubar-layout-for-XFCE-Unity-etc.patch:
    - add traditional menubar (GNOME bug #741904)
  * debian/patches/02_add_keywords.patch:
    - Add new keywords for unity and gnome-shell
  * debian/patches/05_menu_label.patch:
    - Don't display in menu as "gedit Text Editor"
  * debian/patches/07_use_del_instead_ctrl_del.patch:
    - Use Delete, not Ctrl+Delete, to delete files in file browser
      side panel to match our Nautilus behavior (LP: #1163287)

  [ Lars Uebernickel ]
  * New upstream version (lp: #1339371)
  * debian/patches/01_gedit-bugreport-location.patch,
    debian/patches/02_add_keywords.patch,
    debian/patches/05_menu_label.patch:
    - update for new desktop file name
  * debian/patches/03_no_gnu_gettext.patch,
    debian/patches/06_lp_401692.patch,
    debian/patches/07_use_del_instead_ctrl_del.patch,
    debian/patches/08_multiarch_fallback.patch:
    - refresh
  * debian/patches/disable-warnings.patch:
    - dropped - should be fewer deprecation warnings now
  * debian/patches/00git_state_property_type.patch,
    debian/patches/fix_snippets_encoding.patch,
    debian/patches/fix_snippets_python34.patch,
    debian/patches/fix_snippet_warning.patch,
    debian/patches/git_encoding_combo.patch,
    debian/patches/git_filebrowser_toolbar.patch,
    debian/patches/git_get_start_sig.patch,
    debian/patches/git_save_run_tool_order.patch,
    debian/patches/git-search-hide-when-hitting-Esc.patch,
    debian/patches/git-search-use-new-GtkSearchEntry-signals.patch,
    debian/patches/git_select_mispelled_word.patch,
    debian/patches/git_Show-preview-text-in-the-font-chooser.patch,
    debian/patches/git_store_dialog.patch,
    debian/patches/git_wrap_labels.patch:
    - dropped - applied upstream
  * debian/patches/git_zeitgeist_crash.patch:
    - dropped - moved to ge...

Read more...

Changed in gedit (Ubuntu):
status: Triaged → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.