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

bug report operating on rectangular area

Expand Messages
  • Jens Paulus
    Hi developers, here I send another bug report. Suppose there is a text like this one where a, b, c and d represent marks. axxb xxxx xxxx cxxd Doing `ad `d
    Message 1 of 5 , Dec 30, 2004
    • 0 Attachment
      Hi developers,

      here I send another bug report. Suppose there is a text like this one
      where a, b, c and d represent marks.

      axxb
      xxxx
      xxxx
      cxxd

      Doing `ad<C-V>`d correctly deletes the rectangular text area. But
      `bd<C-V>`d does not include the character of the d mark. The same is
      when yanking an area with `cy<C-V>`a and `cy<C-V>`b instead of deleting.
      This is not consistent. A vertical area consisting of one column should
      be treated accordingly and include the first and last character.

      Best regards

      Jens
    • Bill McCarthy
      ... You don t say what you re using. In both 6.3.53 and 7.0aa Alpha (no version, but current as of 11pm CST (GMT-6), the 1st example deletes the entire block.
      Message 2 of 5 , Dec 30, 2004
      • 0 Attachment
        On Thu 30-Dec-04 3:05pm -0600, Jens Paulus wrote:

        > here I send another bug report. Suppose there is a text like this one
        > where a, b, c and d represent marks.

        > axxb
        > xxxx
        > xxxx
        > cxxd

        > Doing `ad<C-V>`d correctly deletes the rectangular text area. But
        > `bd<C-V>`d does not include the character of the d mark.

        You don't say what you're using. In both 6.3.53 and
        7.0aa Alpha (no version, but current as of 11pm CST
        (GMT-6), the 1st example deletes the entire block. The
        2nd example deletes the entire column with the D mark.

        I tried :set selection=exclusive

        My results were somewhat opposite of your results. The
        1st example deleted all but the column with the D mark.
        The second example deleted the entire column with the D
        mark.

        When you see something that doesn't work as expected,
        in usually a good idea to try again with default
        settings. Something like:

        gvim -u NONE -N

        --
        Best regards,
        Bill
      • Jens Paulus
        Hi Bill, ... alright, maybe my description was wrong. Try the commands `ay `c and `ad `c and you should see that the character at mark c is not
        Message 3 of 5 , Dec 31, 2004
        • 0 Attachment
          Hi Bill,

          On Fri, Dec 31, 2004 at 01:34:46 -0600, Bill McCarthy wrote:
          > > here I send another bug report. Suppose there is a text like this one
          > > where a, b, c and d represent marks.
          >
          > > axxb
          > > xxxx
          > > xxxx
          > > cxxd
          >
          > > Doing `ad<C-V>`d correctly deletes the rectangular text area. But
          > > `bd<C-V>`d does not include the character of the d mark.
          >
          > You don't say what you're using. In both 6.3.53 and
          > 7.0aa Alpha (no version, but current as of 11pm CST
          > (GMT-6), the 1st example deletes the entire block. The
          > 2nd example deletes the entire column with the D mark.
          >
          > I tried :set selection=exclusive
          >
          > My results were somewhat opposite of your results. The
          > 1st example deleted all but the column with the D mark.
          > The second example deleted the entire column with the D
          > mark.
          >
          > When you see something that doesn't work as expected,
          > in usually a good idea to try again with default
          > settings. Something like:
          >
          > gvim -u NONE -N

          alright, maybe my description was wrong. Try the commands `ay<C-V>`c and
          `ad<C-V>`c and you should see that the character at mark c is not
          included. The same is when doing it from mark c to mark a but the
          character at mark d is included when yanking or deleting the last column
          this way.

          axxb
          xxxx
          xxxx
          cxxd

          The version information is as follows.

          VIM - Vi IMproved 6.3, 2004 June 7, compiled Jun 17 2004 19:53:10
          Included patches: 1-6

          This also happens when started without initialization file.
          When replying on this please send me a carbon copy.

          Best regards

          Jens
        • Bram Moolenaar
          ... I can reproduce this one. I ll fix it. -- hundred-and-one symptoms of being an internet addict: 200. You really believe in the concept of a paperless
          Message 4 of 5 , Jan 1, 2005
          • 0 Attachment
            Jens Paulus wrote:

            > alright, maybe my description was wrong. Try the commands `ay<C-V>`c and
            > `ad<C-V>`c and you should see that the character at mark c is not
            > included.

            I can reproduce this one. I'll fix it.

            --
            hundred-and-one symptoms of being an internet addict:
            200. You really believe in the concept of a "paperless" office.

            /// Bram Moolenaar -- Bram@... -- http://www.Moolenaar.net \\\
            /// Sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
            \\\ Project leader for A-A-P -- http://www.A-A-P.org ///
            \\\ Buy LOTR 3 and help AIDS victims -- http://ICCF.nl/lotr.html ///
          • Bill McCarthy
            ... I m surprised that Bram sees a problem. I tried this from 6.3.53 and don t see the problem. When I paste the yank, I see the whole first column. When I
            Message 5 of 5 , Jan 2, 2005
            • 0 Attachment
              On Fri 31-Dec-04 2:47pm -0600, Jens Paulus wrote:

              > alright, maybe my description was wrong. Try the commands `ay<C-V>`c and
              > `ad<C-V>`c and you should see that the character at mark c is not
              > included.

              I'm surprised that Bram sees a problem. I tried this
              from 6.3.53 and don't see the problem. When I paste
              the yank, I see the whole first column. When I try
              delete, the whole first column is deleted. This is
              what I expect.

              Although I prefer the default sel=inclusive when
              working with blocks, I get too much bad behavior in
              Windows when the EOL can't included.

              For example, reading news where the subjects are all at
              top and repeated with the full stories below, I use
              'Alt-V' to get me to the stories and 'n' to get back to
              the index. My mappings for Alt-V are as follows:

              =======================================================
              " Search for visually selected text and position to top
              vnoremap / y/<C-R>"<CR>zt

              " Mark full line and do above
              nmap <M-v> 0v$/
              =======================================================

              The problem is the inclusive grabs the EOL and the
              search string becomes: text^M
              which can't be found :-(

              I've set up a "toggle" for 'sel' to easily switch
              modes:

              nmap <M-F3> :if &sel == 'inclusive'
              \ \| set sel=exclusive
              \ \| else
              \ \| set sel=inclusive
              \ \| endif
              \ \| set sel?<CR>

              --
              Best regards,
              Bill
            Your message has been successfully submitted and would be delivered to recipients shortly.