On 2011-04-30, Sung Pae wrote:
> On Sat, Apr 30, 2011 at 12:37 PM, Gary Johnson wrote:
> >
> > Copying and pasting seems to be working fine now. 嚥�I don't
> > understand what problem this patch is supposed to fix. 嚥�If I knew
> > what to look for, I would apply and test it.
> 
> Some clarification then:
> 
> On a vim compiled with X and xterm_clipboard, either
> 
>  * Copy an explicit linewise selection (via triple-click in your browser
>    let's say) into the X PRIMARY or CLIPBOARD, then paste it into a vim
>    buffer using "*p or "+p, while in the middle of an existing line.
> 
>  * Do a linewise yank with "+y. Then either quit vim, or duplicate the
>    selection with a clipboard manager (e.g. with parcellite, simply
>    click on the string you just yanked in the pull down menu). Try
>    pasting the line again with "+p
> 
> You should notice that when pasting a linewise selection that has not
> originated from vim, or that has been duplicated by another program, it
> will be pasted in MCHAR mode (pasted inline) as opposed to MLINE mode
> (pasted on next/prev line).

It may well be that there is something I'm not understanding, but
this patch doesn't seem to have any effect.  I thought the purpose
of the patch was to make certain line-wise copies paste line-wise.
For me, they still paste character-wise.

I applied the patch to Vim 7.3.154 and built Vim, then ran the
following tests.  This was all done on a system running Fedora 11.

Test 1

    *   Start Firefox (3.5.3).
    *   Go to vim.sf.net.
    *   Triple-click the Vim 7.3 release announcement.
    *   Start vim in a GNOME Terminal:

            $ ./vim -N -u NONE

    *   Put text in vim buffer:

            :r !ls -l

    *   Move the cursor to the middle of a line in the middle of the
        screen and type

            "*p

    *   The result is the line copied from Firefox inserted
        _in-line_ in that line of ls output.

    *   Executing "+p yields the same results.

Test 2

    *   Using that same Vim instance, select three lines of text by
        typing

            Vjj"+y

    *   Vim displays "3 lines yanked" in the status line.

    *   Exit Vim:

            :q!

    *   Start vim as before and again read ls into the buffer.

    *   Move the cursor to the middle of a line in the middle of the
        screen and type

            "+p

    *   As before, the three lines are inserted _in-line_ at the
        cursor position.

Here is the output of "./vim --version".

    VIM - Vi IMproved 7.3 (2010 Aug 15, compiled May  2 2011 09:37:36)
    Included patches: 1-154
    Compiled by [email protected]
    Normal version with GTK2 GUI.  Features included (+) or not (-):
    -arabic +autocmd +balloon_eval +browse +builtin_terms +byte_offset +cindent 
    +clientserver +clipboard +cmdline_compl +cmdline_hist +cmdline_info 
+comments 
    -conceal +cryptv +cscope +cursorbind +cursorshape +dialog_con_gui +diff 
    +digraphs +dnd -ebcdic -emacs_tags +eval +ex_extra +extra_search -farsi 
    +file_in_path +find_in_path +float +folding -footer +fork() +gettext 
    -hangul_input +iconv +insert_expand +jumplist -keymap -langmap +libcall 
    +linebreak +lispindent +listcmds +localmap -lua +menu +mksession 
+modify_fname 
    +mouse +mouseshape -mouse_dec +mouse_gpm -mouse_jsbterm -mouse_netterm 
    -mouse_sysmouse +mouse_xterm +multi_byte +multi_lang -mzscheme 
+netbeans_intg 
    -osfiletype +path_extra -perl +persistent_undo +postscript +printer 
-profile 
    -python -python3 +quickfix +reltime -rightleft -ruby +scrollbind +signs 
    +smartindent -sniff +startuptime +statusline -sun_workshop +syntax 
+tag_binary 
    +tag_old_static -tag_any_white -tcl +terminfo +termresponse +textobjects 
+title
     +toolbar +user_commands +vertsplit +virtualedit +visual +visualextra 
+viminfo 
    +vreplace +wildignore +wildmenu +windows +writebackup +X11 -xfontset +xim 
    +xsmp_interact +xterm_clipboard -xterm_save 
       system vimrc file: "$VIM/vimrc"
         user vimrc file: "$HOME/.vimrc"
          user exrc file: "$HOME/.exrc"
      system gvimrc file: "$VIM/gvimrc"
        user gvimrc file: "$HOME/.gvimrc"
        system menu file: "$VIMRUNTIME/menu.vim"
      fall-back for $VIM: "/home/garyjohn/src/vim-hg/share/vim"
    Compilation: gcc -c -I. -Iproto -DHAVE_CONFIG_H -DFEAT_GUI_GTK  
-I/usr/include/gtk-2.0 -I/usr/lib/gtk-2.0/include -I/usr/include/atk-1.0 
-I/usr/include/cairo -I/usr/include/pango-1.0 -I/usr/include/glib-2.0 
-I/usr/lib/glib-2.0/include -I/usr/include/pixman-1 -I/usr/include/freetype2 
-I/usr/include/libpng12     -g -O2 -D_FORTIFY_SOURCE=1      
    Linking: gcc   -L/usr/local/lib -Wl,--as-needed -o vim   -lgtk-x11-2.0 
-lgdk-x11-2.0 -latk-1.0 -lgio-2.0 -lpangoft2-1.0 -lgdk_pixbuf-2.0 
-lpangocairo-1.0 -lcairo -lpango-1.0 -lfreetype -lfontconfig -lgobject-2.0 
-lgmodule-2.0 -lglib-2.0   -lSM -lICE -lXpm -lXt -lX11 -lXdmcp -lSM -lICE -lm 
-ltinfo -lelf -lnsl  -lselinux -lacl -lattr -lgpm           

Regards,
Gary

-- 
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

Raspunde prin e-mail lui