GNOME Bugzilla – Bug 309860
select whitespace with double click
Last modified: 2006-01-10 03:14:12 UTC
Every GUI based text editor I've ever used allows one to double click to select the whitespace (spaces, tabs) indentation before and between words. This is quite helpful when writing in a language that whitespace is important such as python. It is also helpful when trying to line up indentation in other programming languages. Nedit, on unix, or Textpad on Windows implement this behavior, for example. Please consider this enhancement in a future version of gedit. It is this one small missing feature that keeps me from using the otherwise nice gedit more often.
Yep, good idea. I like this suggestion and I verified that emacs behaves in the same way that you suggest. However I think this should be implmented directly in GtkTextView so that all the programs using it (gedit included) have this behavior. Reassigning to GTK+.
Created attachment 48856 [details] [review] proposed patch The patch implements the proposed behavior. Since extend_selection cannot return FALSE anymore, I removed the return value and modified the only caller (selection_motion_event_handler) which took the return value into consideration.
OK, thanks for your time.
2005-07-11 Matthias Clasen <mclasen@redhat.com> * gtk/gtktextview.c (extend_selection): Make double-clicking between words select whitespace. (#309860, Mike Miller, patch by Paolo Borelli)
Shouldn't GtkTextView and GtkEntry behave consistently here?
Thanks again. Which version of gtk? gnome? can I expect this mini-feature to come thru? :)
gtk+-2.8 which will be used with gnome-2.12. Since I'm already spamming here, I'll note that Matthias also fixed GtkEntry.
Sorry for the delay, but I've noticed two idiosyncracies with the implementation. Should I report in another bug? 1) If one double-clicks and selects the whitespace on a line that begins with a special character (like a double quote (python doc string), or less than bracket (html)) the selection includes that special character .... it shouldn't. 2) After selection, hitting the tab key keeps the selection (doesn't lose it after the keypress) and additionally it moves only the text after the special characters!!! (very, very strange) ;)
Please file a new bug for these new issues