system() break clipboard text.

2013-02-28 Fir de Conversatie Yukihiro Nakadaira
Ubuntu-12.10
Vim-7.3.843 gtk2 version

Steps to reproduce:
  1. locale and encoding is utf-8.
  2. Insert non-latin1 text (for example U+FF41).
  3. Yank the text to clipboard (v+y).
  4. Execute system command.  :call system('ls') or :!ls
  5. Put the text from clipboard (+p).
  Then, broken text is inserted.

This behavior seems introduced by 7.3.011 and 7.2.221.

7.3.011: X11 clipboard doesn't work in Athena/Motif GUI. First selection
after a shell command doesn't work.
7.2.221: X cut_buffer0 text is used as-is, it may be in the wrong encoding.

-- 
Yukihiro Nakadaira - yukihiro.nakada...@gmail.com

-- 
-- 
You received this message from the vim_dev maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

--- 
You received this message because you are subscribed to the Google Groups 
vim_dev group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to vim_dev+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.




Typo in doc/index.txt

2013-02-28 Fir de Conversatie Yukihiro Nakadaira
There is some typos.

diff -r ad7bbe9ea65b runtime/doc/index.txt
--- a/runtime/doc/index.txtTue Feb 26 22:54:11 2013 +0100
+++ b/runtime/doc/index.txtThu Feb 28 19:36:01 2013 +0900
@@ -1134,7 +1134,7 @@
 |:cgetbuffer|:cgetb[uffer]get errors from buffer
 |:cgetexpr|:cgete[xpr]get errors from expr
 |:cgetfile|:cg[etfile]read file with error messages
-|:changes|:cha[nges]print the change list
+|:changes|:changesprint the change list
 |:chdir|:chd[ir]change directory
 |:checkpath|:che[ckpath]list included files
 |:checktime|:checkt[ime]check timestamp of loaded buffers
@@ -1383,7 +1383,7 @@
 |:promptrepl|:promptr[epl]open GUI dialog for search/replace
 |:perldo|:perld[o]execute Perl command for each line
 |:pop|:po[p]jump to older entry in tag stack
-|:popup|:pop[up]popup a menu by name
+|:popup|:popu[p]popup a menu by name
 |:ppop|:pp[op]:pop in preview window
 |:preserve|:pre[serve]write all text to swap file
 |:previous|:prev[ious]go to previous file in argument list
@@ -1469,7 +1469,7 @@
 |:slast|:sla[st]split window and go to last file in the
 argument list
 |:smagic|:sm[agic]:substitute with 'magic'
-|:smap|:sma[p]like :map but for Select mode
+|:smap|:smaplike :map but for Select mode
 |:smapclear|:smapc[lear]remove all mappings for Select mode
 |:smenu|:sme[nu]add menu for Select mode
 |:snext|:sn[ext]split window and go to next file in the


-- 
Yukihiro Nakadaira - yukihiro.nakada...@gmail.com

-- 
-- 
You received this message from the vim_dev maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

--- 
You received this message because you are subscribed to the Google Groups 
vim_dev group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to vim_dev+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.




options.txt: Sorry, no help for ('patchmode'

2013-02-28 Fir de Conversatie Marvin Renich
[vim 7.3.547 from Debian wheezy]
I just noticed that in options.txt under the help for 'backupdir', the
link to 'patchmode' doesn't work.  Putting a space between the open
parenthesis and the 'patchmode' fixes the problem.  I assume that this
is a consequence of 'isk' for help files containing most printable
characters.  The solution is probably just to put a space there, or
reword so that the link is not adjacent to the paren.

...Marvin

-- 
-- 
You received this message from the vim_dev maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

--- 
You received this message because you are subscribed to the Google Groups 
vim_dev group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to vim_dev+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.




Re: Sometimes there is no popup when balloonexpr uses synID and synIDattr

2013-02-28 Fir de Conversatie Lech Lorens
On 28 February 2013 06:19, Ben Fritz fritzophre...@gmail.com wrote:
 Ugh, I can't reproduce it at home with the example config on Windows Vista.

 There has to be something else interfering. I hope it's not some video card 
 thing or something. I'll try it on a few more computers at work I suppose.

Confirmed on Windows 7 64 bit.
For me the tooltips did not show at all after hovering over a piece of
text until I moved the mouse pointer by a pixel or two.

-- 
Cheers,
Lech

-- 
-- 
You received this message from the vim_dev maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

--- 
You received this message because you are subscribed to the Google Groups 
vim_dev group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to vim_dev+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.




Re: Patch 7.3.834

2013-02-28 Fir de Conversatie Ken Takata
Hi,

2013/02/26 Tue 21:41:51 UTC+9 Bram Moolenaar wrote:

 Patch 7.3.834
 Problem:Ruby 2.0 has a few API changes.
 Solution:   Add handling of Ruby 2.0. (Yasuhiro Matsumoto)
 Files:src/if_ruby.c

I couldn't build with Ruby 2.0 when using MinGW x64 or MSVC10.
Attached patch fixes this problem.  Makefiles are also changed
to detect RUBY_PLATFORM and RUBY_INSTALL_NAME for x64.

Regards,
Ken Takata.

-- 
-- 
You received this message from the vim_dev maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

--- 
You received this message because you are subscribed to the Google Groups 
vim_dev group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to vim_dev+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


# HG changeset patch
# Parent 275464eb3830ca97b43f29c6a0e0cf41afd936fc

diff --git a/src/Make_cyg.mak b/src/Make_cyg.mak
--- a/src/Make_cyg.mak
+++ b/src/Make_cyg.mak
@@ -234,18 +234,26 @@
 ifneq ($(wildcard $(RUBY)/lib/ruby/$(RUBY_VER_LONG)/i386-mingw32),)
 RUBY_PLATFORM = i386-mingw32
 else
+ifneq ($(wildcard $(RUBY)/lib/ruby/$(RUBY_VER_LONG)/x64-mingw32),)
+RUBY_PLATFORM = x64-mingw32
+else
 RUBY_PLATFORM = i386-mswin32
 endif
 endif
 endif
+endif
 
 ifndef RUBY_INSTALL_NAME
 ifeq ($(RUBY_VER), 16)
 RUBY_INSTALL_NAME = mswin32-ruby$(RUBY_API_VER)
 else
+ifeq ($(ARCH),x86-64)
+RUBY_INSTALL_NAME = x64-msvcrt-ruby$(RUBY_API_VER)
+else
 RUBY_INSTALL_NAME = msvcrt-ruby$(RUBY_API_VER)
 endif
 endif
+endif
 
 ifeq (19, $(word 1,$(sort 19 $(RUBY_VER
 RUBY_19_OR_LATER = 1
diff --git a/src/Make_ming.mak b/src/Make_ming.mak
--- a/src/Make_ming.mak
+++ b/src/Make_ming.mak
@@ -297,18 +297,26 @@
 ifneq ($(wildcard $(RUBY)/lib/ruby/$(RUBY_VER_LONG)/i386-mingw32),)
 RUBY_PLATFORM = i386-mingw32
 else
+ifneq ($(wildcard $(RUBY)/lib/ruby/$(RUBY_VER_LONG)/x64-mingw32),)
+RUBY_PLATFORM = x64-mingw32
+else
 RUBY_PLATFORM = i386-mswin32
 endif
 endif
 endif
+endif
 
 ifndef RUBY_INSTALL_NAME
 ifeq ($(RUBY_VER), 16)
 RUBY_INSTALL_NAME = mswin32-ruby$(RUBY_API_VER)
 else
+ifeq ($(ARCH),x86-64)
+RUBY_INSTALL_NAME = x64-msvcrt-ruby$(RUBY_API_VER)
+else
 RUBY_INSTALL_NAME = msvcrt-ruby$(RUBY_API_VER)
 endif
 endif
+endif
 
 ifeq (19, $(word 1,$(sort 19 $(RUBY_VER
 RUBY_19_OR_LATER = 1
diff --git a/src/if_ruby.c b/src/if_ruby.c
--- a/src/if_ruby.c
+++ b/src/if_ruby.c
@@ -39,6 +39,9 @@
  */
 # define rb_cFalseClass		(*dll_rb_cFalseClass)
 # define rb_cFixnum		(*dll_rb_cFixnum)
+# if defined(DYNAMIC_RUBY_VER)  DYNAMIC_RUBY_VER = 20
+#  define rb_cFloat		(*dll_rb_cFloat)
+# endif
 # define rb_cNilClass		(*dll_rb_cNilClass)
 # define rb_cSymbol		(*dll_rb_cSymbol)
 # define rb_cTrueClass		(*dll_rb_cTrueClass)
@@ -249,6 +252,9 @@
 static VALUE (*dll_rb_assoc_new) (VALUE, VALUE);
 VALUE *dll_rb_cFalseClass;
 VALUE *dll_rb_cFixnum;
+#if defined(DYNAMIC_RUBY_VER)  DYNAMIC_RUBY_VER = 20
+VALUE *dll_rb_cFloat;
+#endif
 VALUE *dll_rb_cNilClass;
 static VALUE *dll_rb_cObject;
 VALUE *dll_rb_cSymbol;
@@ -352,7 +358,7 @@
 {
 return dll_rb_float_new(d);
 }
-unsigned long rb_num2ulong(VALUE x)
+VALUE rb_num2ulong(VALUE x)
 {
 return (long)RSHIFT((SIGNED_VALUE)(x),1);
 }
@@ -373,6 +379,9 @@
 {rb_assoc_new, (RUBY_PROC*)dll_rb_assoc_new},
 {rb_cFalseClass, (RUBY_PROC*)dll_rb_cFalseClass},
 {rb_cFixnum, (RUBY_PROC*)dll_rb_cFixnum},
+#if defined(DYNAMIC_RUBY_VER)  DYNAMIC_RUBY_VER = 20
+{rb_cFloat, (RUBY_PROC*)dll_rb_cFloat},
+#endif
 {rb_cNilClass, (RUBY_PROC*)dll_rb_cNilClass},
 {rb_cObject, (RUBY_PROC*)dll_rb_cObject},
 {rb_cSymbol, (RUBY_PROC*)dll_rb_cSymbol},


Re: Patch 7.3.834

2013-02-28 Fir de Conversatie Yasuhiro MATSUMOTO
thank you

On 2/28/13, Ken Takata ken...@csc.jp wrote:
 Hi,

 2013/02/26 Tue 21:41:51 UTC+9 Bram Moolenaar wrote:

 Patch 7.3.834
 Problem:Ruby 2.0 has a few API changes.
 Solution:   Add handling of Ruby 2.0. (Yasuhiro Matsumoto)
 Files:   src/if_ruby.c

 I couldn't build with Ruby 2.0 when using MinGW x64 or MSVC10.
 Attached patch fixes this problem.  Makefiles are also changed
 to detect RUBY_PLATFORM and RUBY_INSTALL_NAME for x64.

 Regards,
 Ken Takata.

 --
 --
 You received this message from the vim_dev maillist.
 Do not top-post! Type your reply below the text you are replying to.
 For more information, visit http://www.vim.org/maillist.php

 ---
 You received this message because you are subscribed to the Google Groups
 vim_dev group.
 To unsubscribe from this group and stop receiving emails from it, send an
 email to vim_dev+unsubscr...@googlegroups.com.
 For more options, visit https://groups.google.com/groups/opt_out.





-- 
- Yasuhiro Matsumoto

-- 
-- 
You received this message from the vim_dev maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

--- 
You received this message because you are subscribed to the Google Groups 
vim_dev group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to vim_dev+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.




Re: system() break clipboard text.

2013-02-28 Fir de Conversatie Bram Moolenaar

Yukihiro Nakadaira wrote:

 Ubuntu-12.10
 Vim-7.3.843 gtk2 version
 
 Steps to reproduce:
   1. locale and encoding is utf-8.
   2. Insert non-latin1 text (for example U+FF41).
   3. Yank the text to clipboard (v+y).
   4. Execute system command.  :call system('ls') or :!ls
   5. Put the text from clipboard (+p).
   Then, broken text is inserted.
 
 This behavior seems introduced by 7.3.011 and 7.2.221.
 
 7.3.011: X11 clipboard doesn't work in Athena/Motif GUI. First selection
 after a shell command doesn't work.
 7.2.221: X cut_buffer0 text is used as-is, it may be in the wrong encoding.

I can reproduce it.  Strange.

-- 
A)bort, R)etry, P)lease don't bother me again

 /// Bram Moolenaar -- b...@moolenaar.net -- http://www.Moolenaar.net   \\\
///sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
\\\  an exciting new programming language -- http://www.Zimbu.org///
 \\\help me help AIDS victims -- http://ICCF-Holland.org///

-- 
-- 
You received this message from the vim_dev maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

--- 
You received this message because you are subscribed to the Google Groups 
vim_dev group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to vim_dev+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.




Re: Typo in doc/index.txt

2013-02-28 Fir de Conversatie Bram Moolenaar

Yukihiro Nakadaira wrote:

 There is some typos.

Thanks, I'll include them.


-- 
A)bort, R)etry, D)o it right this time

 /// Bram Moolenaar -- b...@moolenaar.net -- http://www.Moolenaar.net   \\\
///sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
\\\  an exciting new programming language -- http://www.Zimbu.org///
 \\\help me help AIDS victims -- http://ICCF-Holland.org///

-- 
-- 
You received this message from the vim_dev maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

--- 
You received this message because you are subscribed to the Google Groups 
vim_dev group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to vim_dev+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.




Re: Patch 7.3.834

2013-02-28 Fir de Conversatie Bram Moolenaar

Ken Takata wrote:

 Hi,
 
 2013/02/26 Tue 21:41:51 UTC+9 Bram Moolenaar wrote:
 
  Patch 7.3.834
  Problem:Ruby 2.0 has a few API changes.
  Solution:   Add handling of Ruby 2.0. (Yasuhiro Matsumoto)
  Files:  src/if_ruby.c
 
 I couldn't build with Ruby 2.0 when using MinGW x64 or MSVC10.
 Attached patch fixes this problem.  Makefiles are also changed
 to detect RUBY_PLATFORM and RUBY_INSTALL_NAME for x64.

Thanks, I'll include it soon.

-- 
login: yes
password: I don't know, please tell me
password is incorrect
login: yes
password: incorrect

 /// Bram Moolenaar -- b...@moolenaar.net -- http://www.Moolenaar.net   \\\
///sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
\\\  an exciting new programming language -- http://www.Zimbu.org///
 \\\help me help AIDS victims -- http://ICCF-Holland.org///

-- 
-- 
You received this message from the vim_dev maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

--- 
You received this message because you are subscribed to the Google Groups 
vim_dev group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to vim_dev+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.




Re: options.txt: Sorry, no help for ('patchmode'

2013-02-28 Fir de Conversatie Bram Moolenaar

Marvin Renich wrote:

 [vim 7.3.547 from Debian wheezy]
 I just noticed that in options.txt under the help for 'backupdir', the
 link to 'patchmode' doesn't work.  Putting a space between the open
 parenthesis and the 'patchmode' fixes the problem.  I assume that this
 is a consequence of 'isk' for help files containing most printable
 characters.  The solution is probably just to put a space there, or
 reword so that the link is not adjacent to the paren.

Right, the ( is included in the tag name.
Simple solution is to insert the space.  I found two more places where
this is needed.

-- 
hundred-and-one symptoms of being an internet addict:
3. Your bookmark takes 15 minutes to scroll from top to bottom.

 /// Bram Moolenaar -- b...@moolenaar.net -- http://www.Moolenaar.net   \\\
///sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
\\\  an exciting new programming language -- http://www.Zimbu.org///
 \\\help me help AIDS victims -- http://ICCF-Holland.org///

-- 
-- 
You received this message from the vim_dev maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

--- 
You received this message because you are subscribed to the Google Groups 
vim_dev group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to vim_dev+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.




Re: [PATCH] syntax: runtime/syntax/csdl.vim and runtime/synmenu.vim

2013-02-28 Fir de Conversatie Bram Moolenaar

Jacek Artymiak wrote:

 Correct. *.csdl is the filename extension we use for CSDL files.

OK, that's easy to add.

-- 
hundred-and-one symptoms of being an internet addict:
4. Your eyeglasses have a web site burned in on them.

 /// Bram Moolenaar -- b...@moolenaar.net -- http://www.Moolenaar.net   \\\
///sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
\\\  an exciting new programming language -- http://www.Zimbu.org///
 \\\help me help AIDS victims -- http://ICCF-Holland.org///

-- 
-- 
You received this message from the vim_dev maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

--- 
You received this message because you are subscribed to the Google Groups 
vim_dev group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to vim_dev+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.




minor doc fixes

2013-02-28 Fir de Conversatie Dominique Pellé
Hi

Attached patch contains minor doc fixes.

Regards
Dominique

-- 
-- 
You received this message from the vim_dev maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

--- 
You received this message because you are subscribed to the Google Groups 
vim_dev group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to vim_dev+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.




doc-fixes.patch
Description: Binary data


Re: replace character does not work correctly

2013-02-28 Fir de Conversatie Bram Moolenaar

Yasuhiro Matsumoto wrote:

 When type 'ra' with linewised lines, characters will be replaced. But
 if the characters are multi-byte, some characters are remaining as
 original.  Below is a patch. Please check and include.
 
 https://gist.github.com/mattn/5054510
 
 diff -r 8b86b69546a9 src/ops.c
 --- a/src/ops.c   Wed Feb 20 21:26:00 2013 +0100
 +++ b/src/ops.c   Thu Feb 28 14:41:31 2013 +0900
 @@ -2194,7 +2194,9 @@
   {
   /* This is slow, but it handles replacing a single-byte
* with a multi-byte and the other way around. */
 - oap-end.col += (*mb_char2len)(c) - (*mb_char2len)(n);
 +
 + if (curwin-w_cursor.lnum == oap-end.lnum)
 + oap-end.col += (*mb_char2len)(c) - (*mb_char2len)(n);
   n = State;
   State = REPLACE;
   ins_char(c);


Thanks.  How can the problem be reproduced?  Does this require two lines
with multi-byte characters and then using ra with a count?

-- 
Everybody wants to go to heaven, but nobody wants to die.

 /// Bram Moolenaar -- b...@moolenaar.net -- http://www.Moolenaar.net   \\\
///sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
\\\  an exciting new programming language -- http://www.Zimbu.org///
 \\\help me help AIDS victims -- http://ICCF-Holland.org///

-- 
-- 
You received this message from the vim_dev maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

--- 
You received this message because you are subscribed to the Google Groups 
vim_dev group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to vim_dev+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.




Re: replace character does not work correctly

2013-02-28 Fir de Conversatie Yasuhiro MATSUMOTO
Sorry I forgot to mention about the two or more lines is needed to reproduce.

On 3/1/13, Bram Moolenaar b...@moolenaar.net wrote:

 Yasuhiro Matsumoto wrote:

 When type 'ra' with linewised lines, characters will be replaced. But
 if the characters are multi-byte, some characters are remaining as
 original.  Below is a patch. Please check and include.

 https://gist.github.com/mattn/5054510

 diff -r 8b86b69546a9 src/ops.c
 --- a/src/ops.c  Wed Feb 20 21:26:00 2013 +0100
 +++ b/src/ops.c  Thu Feb 28 14:41:31 2013 +0900
 @@ -2194,7 +2194,9 @@
  {
  /* This is slow, but it handles replacing a single-byte
   * with a multi-byte and the other way around. */
 -oap-end.col += (*mb_char2len)(c) - (*mb_char2len)(n);
 +
 +if (curwin-w_cursor.lnum == oap-end.lnum)
 +oap-end.col += (*mb_char2len)(c) - (*mb_char2len)(n);
  n = State;
  State = REPLACE;
  ins_char(c);


 Thanks.  How can the problem be reproduced?  Does this require two lines
 with multi-byte characters and then using ra with a count?

 --
 Everybody wants to go to heaven, but nobody wants to die.

  /// Bram Moolenaar -- b...@moolenaar.net -- http://www.Moolenaar.net   \\\
 ///sponsor Vim, vote for features -- http://www.Vim.org/sponsor/
 \\\
 \\\  an exciting new programming language -- http://www.Zimbu.org
 ///
  \\\help me help AIDS victims -- http://ICCF-Holland.org///



-- 
- Yasuhiro Matsumoto

-- 
-- 
You received this message from the vim_dev maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

--- 
You received this message because you are subscribed to the Google Groups 
vim_dev group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to vim_dev+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.




Re: system() break clipboard text.

2013-02-28 Fir de Conversatie John Little
It happens for me (on Kubuntu 12.10, 7.3.843).
xclip -o reports  

Error: target STRING not available

and other apps (I tried konsole, kate, firefox, LibreOffice) paste nothing.

Regards, John Little


-- 
-- 
You received this message from the vim_dev maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

--- 
You received this message because you are subscribed to the Google Groups 
vim_dev group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to vim_dev+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.




Re: system() break clipboard text.

2013-02-28 Fir de Conversatie Christian Brabandt
Hi John!

On Do, 28 Feb 2013, John Little wrote:

 It happens for me (on Kubuntu 12.10, 7.3.843).
 xclip -o reports  
 
 Error: target STRING not available
 
 and other apps (I tried konsole, kate, firefox, LibreOffice) paste nothing.

Interestingly, when using terminal vim, it returns some kind of utf 
representation of the original buffer for the clipboard. E.g. I put 
U+FF41 in the clipboard, call system('true') and :display + returns 
\uff41

This patch fixes it for me:
diff --git a/src/ui.c b/src/ui.c
--- a/src/ui.c
+++ b/src/ui.c
@@ -2119,7 +2119,11 @@
text_prop.encoding = *type;
text_prop.format = *format;
text_prop.nitems = len;
-   status = XmbTextPropertyToTextList(X_DISPLAY, text_prop,
+   if (*type == utf8_atom)
+   status = Xutf8TextPropertyToTextList(X_DISPLAY, text_prop,
+text_list, n_text);
+   else
+   status = XmbTextPropertyToTextList(X_DISPLAY, text_prop,
 text_list, n_text);
if (status != Success || n_text  1)
{


In the gui, it seems, I get always garbage, since the for some reason I 
think nothing is stored into the clipboard and therefore Vim tries to 
restore the info from the CUT_BUFFER0, which can only hold latin1 
encoded data and it breaks here. I tried uncommenting 
clip_mch_lose_selection() in gui_gtk_x11.c and this seems to work, but I 
am not really sure (could be, that this relies on some clipboard manager 
to work) this is right.

regards,
Christian
-- 
20% aller Autounfälle ging von alkoholisierten Autofahrern aus.
Das bedeutet: In 80% der Unfälle war kein Alkohol im Spiele.
Was lehrt uns das: Alkoholisierte Autofahrer sind die besseren Fahrer.

-- 
-- 
You received this message from the vim_dev maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

--- 
You received this message because you are subscribed to the Google Groups 
vim_dev group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to vim_dev+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.