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

[patch] gv sometimes reselect wrong region

Expand Messages
  • Christian Brabandt
    Bram, certain normal mode commands change the visual selection type. E.g. R or S (because internally, Vim changes the visual mode to V so that the
    Message 1 of 4 , Mar 9, 2013
    • 0 Attachment
      Bram,
      certain normal mode commands change the visual selection type. E.g. 'R'
      or 'S' (because internally, Vim changes the visual mode to 'V' so that
      the command operates linewise. Unfortunately, this breaks 'gv'.

      For example, take this mail, visually block select the first column,
      press R, ESC to quit insert mode, u to undo the deletion and now try to
      reselect the save region using 'gv'. You'll notice, it will select the
      same range of lines, but line wise not block wise. This is especially
      annoying, if you by accident hit 'R' instead of 'r' and you must
      reselect the area instead of simply using 'gv'

      Attached patch fixes this.

      regards,
      Christian
      --

      --
      --
      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+unsubscribe@....
      For more options, visit https://groups.google.com/groups/opt_out.
    • Bram Moolenaar
      ... Thanks. Since you describe an example, could you turn that into a test? -- hundred-and-one symptoms of being an internet addict: 35. Your husband tells
      Message 2 of 4 , Mar 9, 2013
      • 0 Attachment
        Christian Brabandt wrote:

        > certain normal mode commands change the visual selection type. E.g. 'R'
        > or 'S' (because internally, Vim changes the visual mode to 'V' so that
        > the command operates linewise. Unfortunately, this breaks 'gv'.
        >
        > For example, take this mail, visually block select the first column,
        > press R, ESC to quit insert mode, u to undo the deletion and now try to
        > reselect the save region using 'gv'. You'll notice, it will select the
        > same range of lines, but line wise not block wise. This is especially
        > annoying, if you by accident hit 'R' instead of 'r' and you must
        > reselect the area instead of simply using 'gv'
        >
        > Attached patch fixes this.

        Thanks. Since you describe an example, could you turn that into a test?

        --
        hundred-and-one symptoms of being an internet addict:
        35. Your husband tells you he's had the beard for 2 months.

        /// Bram Moolenaar -- Bram@... -- 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+unsubscribe@....
        For more options, visit https://groups.google.com/groups/opt_out.
      • Christian Brabandt
        Hi Bram! ... Here we go. regards, Christian -- Die schlimmste Krankheit ist die Gleichgültigkeit. Na und? -- -- You received this message from the vim_dev
        Message 3 of 4 , Mar 10, 2013
        • 0 Attachment
          Hi Bram!

          On Sa, 09 Mär 2013, Bram Moolenaar wrote:

          >
          > Christian Brabandt wrote:
          >
          > > certain normal mode commands change the visual selection type. E.g. 'R'
          > > or 'S' (because internally, Vim changes the visual mode to 'V' so that
          > > the command operates linewise. Unfortunately, this breaks 'gv'.
          > >
          > > For example, take this mail, visually block select the first column,
          > > press R, ESC to quit insert mode, u to undo the deletion and now try to
          > > reselect the save region using 'gv'. You'll notice, it will select the
          > > same range of lines, but line wise not block wise. This is especially
          > > annoying, if you by accident hit 'R' instead of 'r' and you must
          > > reselect the area instead of simply using 'gv'
          > >
          > > Attached patch fixes this.
          >
          > Thanks. Since you describe an example, could you turn that into a test?

          Here we go.

          regards,
          Christian
          --
          Die schlimmste Krankheit ist die Gleichgültigkeit. Na und?

          --
          --
          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+unsubscribe@....
          For more options, visit https://groups.google.com/groups/opt_out.
        • Bram Moolenaar
          ... Thanks! -- A day without sunshine is like, well, night. /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net /// sponsor Vim,
          Message 4 of 4 , Mar 10, 2013
          • 0 Attachment
            Christian Brabandt wrote:

            > > > certain normal mode commands change the visual selection type. E.g. 'R'
            > > > or 'S' (because internally, Vim changes the visual mode to 'V' so that
            > > > the command operates linewise. Unfortunately, this breaks 'gv'.
            > > >
            > > > For example, take this mail, visually block select the first column,
            > > > press R, ESC to quit insert mode, u to undo the deletion and now try to
            > > > reselect the save region using 'gv'. You'll notice, it will select the
            > > > same range of lines, but line wise not block wise. This is especially
            > > > annoying, if you by accident hit 'R' instead of 'r' and you must
            > > > reselect the area instead of simply using 'gv'
            > > >
            > > > Attached patch fixes this.
            > >
            > > Thanks. Since you describe an example, could you turn that into a test?
            >
            > Here we go.

            Thanks!

            --
            A day without sunshine is like, well, night.

            /// Bram Moolenaar -- Bram@... -- 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+unsubscribe@....
            For more options, visit https://groups.google.com/groups/opt_out.
          Your message has been successfully submitted and would be delivered to recipients shortly.