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

Re: yanking linewise

Expand Messages
  • 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 1 of 25 , Jul 3, 2003
    • 0 Attachment
      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 2 of 25 , Jul 3, 2003
      • 0 Attachment
        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 3 of 25 , Jul 3, 2003
        • 0 Attachment
          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 4 of 25 , Jul 3, 2003
          • 0 Attachment
            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 5 of 25 , Jul 3, 2003
            • 0 Attachment
              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 6 of 25 , Jul 3, 2003
              • 0 Attachment
                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 7 of 25 , Jul 4, 2003
                • 0 Attachment
                  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 8 of 25 , Jul 4, 2003
                  • 0 Attachment
                    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.