Hi,
I tried doing it with the code below and for the example from the
distribution (pango/samples/break.rb) it worked: underscore
was then similar to an ordinary letter. I mean word_end for
underscore became true. But this doesn’t work when I’m trying
to double-click a word with an underscore - it always selects a
part to the left or to the right of it. Any help is appreciated.
module Pango
alias :super_break :break
module_function :super_break
def self.break s, analysis
#puts "intercepted"
r = super_break s, analysis
# TODO: fix for ruby 1.9
#puts s
chars = s.unpack("U*")
for i in 0...chars.length
c = chars[i]
#print c.chr
r[i].word_end = false if c == 95 # _
end
r
end
end
Thanks,
A.