2008/11/19 Tony Mechelynck <[EMAIL PROTECTED]>:

> On 18/11/08 22:29, Dominique Pelle wrote:
> [...]
>> But I can simplify the way to reproduce it. It happens whenever
>> I do a visual selection in between:
>> - selecting text in clipboard with the mouse
>> - and pasting with middle click.
>>
>> Example:
>>
>> 1/ start vim with valgrind:   valgrind 2>  valgrind.log  vim -u NONE
>> 2/ select some text with mouse outside vim (one line is enough)
>> 3/ enter INSERT mode in vim and type some text:   iThis is a test<Esc>
>> 4/ visual select line typed in 3/  with:   V
>> 5/ click middle mouse to paste text selected in 2/
>>
>> Observe errors in valgrind.log right after middle mouse click in step 5/
>>
>> I see this with Vim-7.2.42 (normal or huge, GTK2) on Ubuntu-8.10
>> as well as Vim-7.1.314 (GTK2-GNOME) on Ubuntu-8.10
>>
>> I tried on 2 other machines:
>>
>> - vim-7.2.42 (huge, GTK2 GUI) on  openSUSE 10.3 :  no bug
>>    observed, valgrind does not complain either (I tried several times)
>>
>> - vim-7.2.42 (huge, GTK2 GUI) on Ubuntu-7.04 : no apparent bug
>>    but valgrind reports errors as soon as I paste text in step 5/
> [...]
>
> What do you have 'clipboard' set to? (The default is "autoselect", which
> will make Vim try to get ownership of the X11 selection at step 4).
>
>
> Best regards,
> Tony.


'clipboard was set to default, since I run "vim -u NONE", which is...

clipboard=autoselect,exclude:cons\|linux

But if I do...  set clipboard=
... then bug no longer happens.

But more interestingly, I just found that it only happen with locale
being set to eo_XX.UTF-8. It always works fine at least with locale
being C or en_US.UTF-8 or fr_FR.UTF-8 for example.  But as soon
as I set locale to eo_XX.UTF-8, then I see the problem all the time.
I tried several times to make sure it was really the case.  Now I
know why I'm the only one who could reproduce it.

Maybe it's related to this....

http://groups.google.com/group/linux.debian.bugs.dist/browse_thread/thread/b759a75978bc890b

The file /usr/share/X11/locale/locale.dir contains a comment which says....

# Esperato (eo) is not supported by the GNU C Library and neither the
# EO nor XX territories exist in ISO 3166.
# en_US.UTF-8/XLC_LOCALE:                       eo_EO.UTF-8
# en_US.UTF-8/XLC_LOCALE:                       eo_XX.UTF-8

Not sure why Esperanto (*Esperato* is a typo in the file by the
way) is not supported by GNU C lib.

I edited my file /usr/share/X11/locale/locale.dir as follows,
just uncommented the lines about Esperanto, and now
everything works fine in vim with eo_XX.UTF-8 locale

[EMAIL PROTECTED]:/usr/share/X11/locale$ diff -c locale.dir.orig locale.dir
*** locale.dir.orig     2008-11-19 08:03:48.000000000 +0100
--- locale.dir  2008-11-19 08:00:58.000000000 +0100
***************
*** 353,360 ****
  en_US.UTF-8/XLC_LOCALE                        en_ZW.UTF-8
  # Esperato (eo) is not supported by the GNU C Library and neither the
  # EO nor XX territories exist in ISO 3166.
! #en_US.UTF-8/XLC_LOCALE:                      eo_EO.UTF-8
! #en_US.UTF-8/XLC_LOCALE:                      eo_XX.UTF-8
  en_US.UTF-8/XLC_LOCALE                        es_AR.UTF-8
  en_US.UTF-8/XLC_LOCALE                        es_BO.UTF-8
  en_US.UTF-8/XLC_LOCALE                        es_CL.UTF-8
--- 353,360 ----
  en_US.UTF-8/XLC_LOCALE                        en_ZW.UTF-8
  # Esperato (eo) is not supported by the GNU C Library and neither the
  # EO nor XX territories exist in ISO 3166.
! en_US.UTF-8/XLC_LOCALE:                       eo_EO.UTF-8
! en_US.UTF-8/XLC_LOCALE:                       eo_XX.UTF-8
  en_US.UTF-8/XLC_LOCALE                        es_AR.UTF-8
  en_US.UTF-8/XLC_LOCALE                        es_BO.UTF-8
  en_US.UTF-8/XLC_LOCALE                        es_CL.UTF-8
***************
*** 846,853 ****
  en_US.UTF-8/XLC_LOCALE:                       en_ZW.UTF-8
  # Esperato (eo) is not supported by the GNU C Library and neither the
  # EO nor XX territories exist in ISO 3166.
! #en_US.UTF-8/XLC_LOCALE:                      eo_EO.UTF-8
! #en_US.UTF-8/XLC_LOCALE:                      eo_XX.UTF-8
  en_US.UTF-8/XLC_LOCALE:                       es_AR.UTF-8
  en_US.UTF-8/XLC_LOCALE:                       es_BO.UTF-8
  en_US.UTF-8/XLC_LOCALE:                       es_CL.UTF-8
--- 846,853 ----
  en_US.UTF-8/XLC_LOCALE:                       en_ZW.UTF-8
  # Esperato (eo) is not supported by the GNU C Library and neither the
  # EO nor XX territories exist in ISO 3166.
! en_US.UTF-8/XLC_LOCALE:                       eo_EO.UTF-8
! en_US.UTF-8/XLC_LOCALE:                       eo_XX.UTF-8
  en_US.UTF-8/XLC_LOCALE:                       es_AR.UTF-8
  en_US.UTF-8/XLC_LOCALE:                       es_BO.UTF-8
  en_US.UTF-8/XLC_LOCALE:                       es_CL.UTF-8


But why those lines were commented out in the first place
is not clear? I'll report that as bug in Ubuntu or Debian.
It's not vim's fault after all.  In any case, issue is now solved
for me.

-- Dominique

--~--~---------~--~----~------------~-------~--~----~
You received this message from the "vim_dev" maillist.
For more information, visit http://www.vim.org/maillist.php
-~----------~----~----~----~------~----~------~--~---

Raspunde prin e-mail lui