Loading ...
Sorry, an error occurred while loading the content.
 

Re: yanking linewise

Expand Messages
  • Ben Fowler
    ... I have discovered that the Vim version can be run in a terminal with the command % src/build/Vim.app/Contents/MacOS/Vim -u NONE -U NONE My :ver is VIM -
    Message 1 of 25 , Jul 2, 2003
      At 4:10 pm +0100 2003-07-02, Ben Fowler wrote:
      >At 10:59 am -0400 2003-07-02, Benji Fisher wrote:
      >>Ben Fowler wrote:
      >>>At 9:07 am -0400 2003-07-02, Benji Fisher wrote:
      >>>
      >>>>That would be me. Unfortunately, I do not know enough to help. It does seem
      >>>>to be related to the Mac's clipboard.
      >>
      >>>Or you could post instructions on how to create the bugged version.
      >>
      >> See the instructions at http://macvim.swdev.org/OSX/#Developers . I recently posted all the necessary files and patches.
      >>
      >
      >O.K. I was following the bit where it said:
      >
      >You can compile a Terminal version of Vim pretty much the same as for any other version of UNIX

      I have discovered that the Vim version can be run in a terminal with the command

      % src/build/Vim.app/Contents/MacOS/Vim -u NONE -U NONE

      My :ver is
      VIM - Vi IMproved 6.2 (2003 Jun 1, compiled 06/22/03 23:54:21)
      MacOS X (unix) version
      Included patches: 1-14
      Big version with Carbon GUI. Features included (+) or not (-):
      +arabic +autocmd -balloon_eval +browse ++builtin_terms +byte_offset +cindent -clientserver +clipboard +cmdline_compl +cmdline_hist
      +cmdline_info +comments +cryptv -cscope +dialog_con_gui +diff +digraphs -dnd -ebcdic +emacs_tags +eval +ex_extra +extra_search
      +farsi +file_in_path +find_in_path +folding -footer +fork() -gettext -hangul_input -iconv +insert_expand +jumplist +keymap
      +langmap -libcall +linebreak +lispindent +listcmds +localmap +menu +mksession +modify_fname +mouse -mouseshape -mouse_dec
      -mouse_gpm -mouse_jsbterm -mouse_netterm -mouse_xterm +multi_byte +multi_lang -netbeans_intg -osfiletype +path_extra -perl
      +postscript +printer -python +quickfix +rightleft -ruby +scrollbind +signs +smartindent -sniff +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
      -xterm_clipboard -xterm_save
      system vimrc file: "$VIM/vimrc"
      user vimrc file: "~/.vimrc"
      user exrc file: "~/.exrc"
      system gvimrc file: "$VIM/gvimrc"
      user gvimrc file: "~/.gvimrc"
      system menu file: "$VIMRUNTIME/menu.vim"

      which is probably a lot closer to what you were expecting

      When I try to reproduce the bug with the commands:
      :set cb=unnamed^M:set clipboard=unnamed^MiAlpha^MBeta^MGammak0yjllp

      It still works for me!

      I will try with one of the supplied makefiles.

      Ben.
      --
      Privileged/Confidential Information may be contained in this message.
      If you are not the addressee indicated in this message (or responsible
      for delivery of the message to such person), you may not copy or deliver
      this message to anyone. In such case, you should destroy this message
      and kindly notify the sender by reply email. Please advise immediately
      if you or your employer do not consent to Internet email messages of this
      kind. Opinions, conclusions and other information in this message that
      do not relate to the official business of ewitness Limited shall be
      understood as neither given nor endorsed by it.

      eWitness Limited, Alpha House, Redvers Close, Lawnswood Business Park, Leeds, LS16 6QY
      Telephone: 0113 2951112 Fax: 0113 2951114
    • Benji Fisher
      ... Yes, that is one of the items on the FAQ at http://macvim.swdev.org/OSX/#FAQ . ... [snip] ... Yes, it seems to work properly when run in a terminal. So
      Message 2 of 25 , Jul 2, 2003
        Ben Fowler wrote:
        > At 4:10 pm +0100 2003-07-02, Ben Fowler wrote:
        >
        > I have discovered that the Vim version can be run in a terminal with the command
        >
        > % src/build/Vim.app/Contents/MacOS/Vim -u NONE -U NONE

        Yes, that is one of the items on the FAQ at http://macvim.swdev.org/OSX/#FAQ .

        > My :ver is
        > VIM - Vi IMproved 6.2 (2003 Jun 1, compiled 06/22/03 23:54:21)
        > MacOS X (unix) version
        [snip]

        > When I try to reproduce the bug with the commands:
        > :set cb=unnamed^M:set clipboard=unnamed^MiAlpha^MBeta^MGammak0yjllp
        >
        > It still works for me!
        >
        > I will try with one of the supplied makefiles.

        Yes, it seems to work properly when run in a terminal. So the bug only
        shows up when using the Carbon version with the GUI active and 'clipboard' set
        to "unnamed". Try the experiment with vim running in a Terminal window, then try

        :gui

        and test again. For me, the bug reappears.

        --Benji Fisher
      • Ben Fowler
        ... O.K. I have seen this happen when running the gui version compiled by me. I will spend afew minutes on this now ... Ben -- Privileged/Confidential
        Message 3 of 25 , Jul 3, 2003
          At 2:16 pm -0400 2003-07-02, Benji Fisher wrote:
          >Ben Fowler wrote:
          >>At 4:10 pm +0100 2003-07-02, Ben Fowler wrote:
          >[ ... ]
          > Yes, it seems to work properly when run in a terminal. So the bug only shows up when using the Carbon version with the GUI active and 'clipboard' set to "unnamed".

          O.K. I have seen this happen when running the gui version compiled by me.

          I will spend afew minutes on this now ...

          Ben
          --
          Privileged/Confidential Information may be contained in this message.
          If you are not the addressee indicated in this message (or responsible
          for delivery of the message to such person), you may not copy or deliver
          this message to anyone. In such case, you should destroy this message
          and kindly notify the sender by reply email. Please advise immediately
          if you or your employer do not consent to Internet email messages of this
          kind. Opinions, conclusions and other information in this message that
          do not relate to the official business of ewitness Limited shall be
          understood as neither given nor endorsed by it.

          eWitness Limited, Alpha House, Redvers Close, Lawnswood Business Park, Leeds, LS16 6QY
          Telephone: 0113 2951112 Fax: 0113 2951114
        • Ben Fowler
          ... FWIW, using the ex command :put does not have the problem. The problem seems to be inside do_put( ); Ben -- Privileged/Confidential Information may be
          Message 4 of 25 , Jul 3, 2003
            At 5:54 pm +0100 2003-07-03, Ben Fowler wrote:
            >At 2:16 pm -0400 2003-07-02, Benji Fisher wrote:
            >>Ben Fowler wrote:
            >>>At 4:10 pm +0100 2003-07-02, Ben Fowler wrote:
            >>[ ... ]
            >> Yes, it seems to work properly when run in a terminal. So the bug only shows up when using the Carbon version with the GUI active and 'clipboard' set to "unnamed".
            >
            >O.K. I have seen this happen when running the gui version compiled by me.
            >
            >I will spend afew minutes on this now ...

            FWIW, using the ex command :put does not have the problem.
            The problem seems to be inside do_put( );

            Ben
            --
            Privileged/Confidential Information may be contained in this message.
            If you are not the addressee indicated in this message (or responsible
            for delivery of the message to such person), you may not copy or deliver
            this message to anyone. In such case, you should destroy this message
            and kindly notify the sender by reply email. Please advise immediately
            if you or your employer do not consent to Internet email messages of this
            kind. Opinions, conclusions and other information in this message that
            do not relate to the official business of ewitness Limited shall be
            understood as neither given nor endorsed by it.

            eWitness Limited, Alpha House, Redvers Close, Lawnswood Business Park, Leeds, LS16 6QY
            Telephone: 0113 2951112 Fax: 0113 2951114
          • Ben Fowler
            ... When y_type has the value 0 (MCHAR) and not 1 (MLINE). Ben -- Privileged/Confidential Information may be contained in this message. If you are not the
            Message 5 of 25 , Jul 3, 2003
              At 6:42 pm +0100 2003-07-03, Ben Fowler wrote:
              >At 5:54 pm +0100 2003-07-03, Ben Fowler wrote:
              >>At 2:16 pm -0400 2003-07-02, Benji Fisher wrote:
              >>>Ben Fowler wrote:
              >>>>At 4:10 pm +0100 2003-07-02, Ben Fowler wrote:
              >>>[ ... ]
              >>> Yes, it seems to work properly when run in a terminal. So the bug only shows up when using the Carbon version with the GUI active and 'clipboard' set to "unnamed".
              >>
              >>O.K. I have seen this happen when running the gui version compiled by me.
              >>
              >>I will spend afew minutes on this now ...
              >
              >FWIW, using the ex command :put does not have the problem.
              >The problem seems to be inside do_put( );

              When y_type has the value 0 (MCHAR) and not 1 (MLINE).

              Ben
              --
              Privileged/Confidential Information may be contained in this message.
              If you are not the addressee indicated in this message (or responsible
              for delivery of the message to such person), you may not copy or deliver
              this message to anyone. In such case, you should destroy this message
              and kindly notify the sender by reply email. Please advise immediately
              if you or your employer do not consent to Internet email messages of this
              kind. Opinions, conclusions and other information in this message that
              do not relate to the official business of ewitness Limited shall be
              understood as neither given nor endorsed by it.

              eWitness Limited, Alpha House, Redvers Close, Lawnswood Business Park, Leeds, LS16 6QY
              Telephone: 0113 2951112 Fax: 0113 2951114
            • Bram Moolenaar
              ... Does do_put() contain Mac GUI specific code? Don t think so. A shot in the dark: Did you try compiling without optimizing? I know that gcc 3.1 with
              Message 6 of 25 , Jul 3, 2003
                Ben Fowler wrote:

                > At 5:54 pm +0100 2003-07-03, Ben Fowler wrote:
                > >At 2:16 pm -0400 2003-07-02, Benji Fisher wrote:
                > >>Ben Fowler wrote:
                > >>>At 4:10 pm +0100 2003-07-02, Ben Fowler wrote:
                > >>[ ... ]
                > >> Yes, it seems to work properly when run in a terminal. So the bug
                > >> only shows up when using the Carbon version with the GUI active and
                > >> 'clipboard' set to "unnamed".
                > >
                > >O.K. I have seen this happen when running the gui version compiled by me.
                > >
                > >I will spend afew minutes on this now ...
                >
                > FWIW, using the ex command :put does not have the problem.
                > The problem seems to be inside do_put( );

                Does do_put() contain Mac GUI specific code? Don't think so.

                A shot in the dark: Did you try compiling without optimizing? I know
                that gcc 3.1 with optimizing causes obscure problems sometimes.

                --
                LAUNCELOT leaps into SHOT with a mighty cry and runs the GUARD through and
                hacks him to the floor. Blood. Swashbuckling music (perhaps).
                LAUNCELOT races through into the castle screaming.
                SECOND SENTRY: Hey!
                "Monty Python and the Holy Grail" PYTHON (MONTY) PICTURES LTD

                /// Bram Moolenaar -- Bram@... -- http://www.Moolenaar.net \\\
                /// Creator of Vim - Vi IMproved -- http://www.Vim.org \\\
                \\\ Project leader for A-A-P -- http://www.A-A-P.org ///
                \\\ Help AIDS victims, buy here: http://ICCF-Holland.org/click1.html ///
              • Ben Fowler
                ... Most grateful for your comments. The dirty deed (y_current- y_type changing from MLINE to MCHAR) happens in ops.c on line 864. (Typos excepted, I am not
                Message 7 of 25 , Jul 3, 2003
                  At 8:54 pm +0200 2003-07-03, Bram Moolenaar wrote:
                  >Ben Fowler wrote:
                  >
                  > > FWIW, using the ex command :put does not have the problem.
                  >> The problem seems to be inside do_put( );
                  >
                  >Does do_put() contain Mac GUI specific code? Don't think so.
                  >
                  >A shot in the dark: Did you try compiling without optimizing? I know
                  >that gcc 3.1 with optimizing causes obscure problems sometimes.

                  Most grateful for your comments.

                  The 'dirty deed' (y_current->y_type changing from MLINE to MCHAR) happens
                  in ops.c on line 864. (Typos excepted, I am not at my OS X machine).

                  I will try what you suggest.

                  It is not do_put( ) containing gui specific code, but the global data
                  causing it to misbahave, I think.

                  Ben
                  --
                  Privileged/Confidential Information may be contained in this message.
                  If you are not the addressee indicated in this message (or responsible
                  for delivery of the message to such person), you may not copy or deliver
                  this message to anyone. In such case, you should destroy this message
                  and kindly notify the sender by reply email. Please advise immediately
                  if you or your employer do not consent to Internet email messages of this
                  kind. Opinions, conclusions and other information in this message that
                  do not relate to the official business of ewitness Limited shall be
                  understood as neither given nor endorsed by it.

                  eWitness Limited, Alpha House, Redvers Close, Lawnswood Business Park, Leeds, LS16 6QY
                  Telephone: 0113 2951112 Fax: 0113 2951114
                • Ben Fowler
                  ... A sample gcc command used during compilation is: /usr/bin/gcc3 -c -F/Volumes/Ben/SF/vim/src/build -I/Volumes/Ben/SF/vim/src/build/include -Iproto
                  Message 8 of 25 , Jul 3, 2003
                    At 9:25 pm +0100 2003-07-03, Ben Fowler wrote:
                    >At 8:54 pm +0200 2003-07-03, Bram Moolenaar wrote:
                    >>Ben Fowler wrote:
                    >>
                    >> > FWIW, using the ex command :put does not have the problem.
                    >>> The problem seems to be inside do_put( );
                    >>
                    >>Does do_put() contain Mac GUI specific code? Don't think so.
                    >>
                    >>A shot in the dark: Did you try compiling without optimizing? I know
                    >>that gcc 3.1 with optimizing causes obscure problems sometimes.
                    >
                    >Most grateful for your comments.
                    >
                    >The 'dirty deed' (y_current->y_type changing from MLINE to MCHAR) happens
                    >in ops.c on line 864. (Typos excepted, I am not at my OS X machine).
                    >
                    >I will try what you suggest.
                    >
                    >It is not do_put( ) containing gui specific code, but the global data
                    >causing it to misbahave, I think.

                    A sample gcc command used during compilation is:

                    /usr/bin/gcc3 -c -F/Volumes/Ben/SF/vim/src/build -I/Volumes/Ben/SF/vim/src/build/include -Iproto -I/Developer/Headers/FlatCarbon -arch ppc -fno-common -fpascal-strings -O0 -Wmost -Wno-four-char-constants -Wno-unknown-pragmas -pipe "-fmessage-length=0" -mdynamic-no-pic -g -precomp-trustfile /Volumes/Ben/SF/vim/src/build/os_mac.build/vim.build/TrustedPrecomps.txt -Wp,-header-mapfile,/Volumes/Ben/SF/vim/src/build/os_mac.build/vim.build/Vim.hmap "-DMACOS_X_UNIX" ops.c -o /Volumes/Ben/SF/vim/src/build/os_mac.build/vim.build/Objects-normal/ppc/ops.o

                    I think that this specifies no optimisation, and nothing out of the ordinary.

                    After :set cb=unnamed, a yank (Y) operation yanks into y_regs[ 0 ], but do-put (ops.c line 3061)
                    reads from y_regs[ 37 ] . Curiously, the y_array for that register contains "Beta" as expected
                    (following the given recipe for evincing the defect), but its y_type is wrong.

                    I expect that there is a simple explanation, but for me it time to shutdown the Mac till
                    tomorrow.

                    Ben.
                    --
                    Privileged/Confidential Information may be contained in this message.
                    If you are not the addressee indicated in this message (or responsible
                    for delivery of the message to such person), you may not copy or deliver
                    this message to anyone. In such case, you should destroy this message
                    and kindly notify the sender by reply email. Please advise immediately
                    if you or your employer do not consent to Internet email messages of this
                    kind. Opinions, conclusions and other information in this message that
                    do not relate to the official business of ewitness Limited shall be
                    understood as neither given nor endorsed by it.

                    eWitness Limited, Alpha House, Redvers Close, Lawnswood Business Park, Leeds, LS16 6QY
                    Telephone: 0113 2951112 Fax: 0113 2951114
                  • Ben Fowler
                    ... I wonder whether the problem is on line 3736 of type = (strchr(*textOfClip, r ) != NULL) ? MLINE : MCHAR; and that r character needs to be the current
                    Message 9 of 25 , Jul 4, 2003
                      At 9:25 pm +0100 2003-07-03, Ben Fowler wrote:
                      >At 8:54 pm +0200 2003-07-03, Bram Moolenaar wrote:
                      >>Ben Fowler wrote:
                      >>
                      >> > FWIW, using the ex command :put does not have the problem.
                      >>> The problem seems to be inside do_put( );
                      >>
                      > >Does do_put() contain Mac GUI specific code? Don't think so.

                      I wonder whether the problem is on line 3736 of

                      type = (strchr(*textOfClip, '\r') != NULL) ? MLINE : MCHAR;

                      and that \r character needs to be the current EOL for the file being edited.

                      Ben
                      --
                      Privileged/Confidential Information may be contained in this message.
                      If you are not the addressee indicated in this message (or responsible
                      for delivery of the message to such person), you may not copy or deliver
                      this message to anyone. In such case, you should destroy this message
                      and kindly notify the sender by reply email. Please advise immediately
                      if you or your employer do not consent to Internet email messages of this
                      kind. Opinions, conclusions and other information in this message that
                      do not relate to the official business of ewitness Limited shall be
                      understood as neither given nor endorsed by it.

                      eWitness Limited, Alpha House, Redvers Close, Lawnswood Business Park, Leeds, LS16 6QY
                      Telephone: 0113 2951112 Fax: 0113 2951114
                    • Ben Fowler
                      ... Certainly if I swap it for a n, the problem goes away. I suspect that when the gui is mot active, using the * register does not go through the system
                      Message 10 of 25 , Jul 4, 2003
                        At 5:57 pm +0100 2003-07-04, Ben Fowler wrote:
                        >At 9:25 pm +0100 2003-07-03, Ben Fowler wrote:
                        >>At 8:54 pm +0200 2003-07-03, Bram Moolenaar wrote:
                        >>>Ben Fowler wrote:
                        >>>
                        >>> > FWIW, using the ex command :put does not have the problem.
                        >>>> The problem seems to be inside do_put( );
                        >>>
                        >> >Does do_put() contain Mac GUI specific code? Don't think so.
                        >
                        >I wonder whether the problem is on line 3736 of gui_mac.c
                        >
                        > type = (strchr(*textOfClip, '\r') != NULL) ? MLINE : MCHAR;
                        >
                        >and that \r character needs to be the current EOL for the file being edited.

                        Certainly if I swap it for a \n, the problem goes away.

                        I suspect that when the gui is mot active, using the * register does not go
                        through the system clipboard, which is why this only turns up when using
                        the gui, when this is the procedure for the * register.

                        Certainly if am using the same Carbonised binary in a terminal, yanking
                        to the * register does not affect the system clipboard, or any clipboard
                        within Terminal.app .

                        Are these features or bugs?

                        Is there anyone here who knows the code well enough to provide a fix. I suspect
                        that each instance of a literal '\r' in the gui code will need to be examined.

                        Ben
                        --
                        Privileged/Confidential Information may be contained in this message.
                        If you are not the addressee indicated in this message (or responsible
                        for delivery of the message to such person), you may not copy or deliver
                        this message to anyone. In such case, you should destroy this message
                        and kindly notify the sender by reply email. Please advise immediately
                        if you or your employer do not consent to Internet email messages of this
                        kind. Opinions, conclusions and other information in this message that
                        do not relate to the official business of ewitness Limited shall be
                        understood as neither given nor endorsed by it.

                        eWitness Limited, Alpha House, Redvers Close, Lawnswood Business Park, Leeds, LS16 6QY
                        Telephone: 0113 2951112 Fax: 0113 2951114
                      Your message has been successfully submitted and would be delivered to recipients shortly.