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

When searching for a single digit gn/gN visually selects too much

Expand Messages
  • Ryan Carney
    I think I may have found a bug, I have list the steps to reproduce it. 1. open a new buffer :tabe or :e test 2. put two single digits on different lines 3.
    Message 1 of 2 , Oct 2, 2013
    • 0 Attachment
      I think I may have found a bug, I have list the steps to reproduce it.

      1. open a new buffer :tabe or :e test
      2. put two single digits on different lines
      3. search using the regex '\d' (without quotes)
      4. put your cursor before or on the first digit then press gn

      I've tested this on vim 7.4 and 7.3.

      What happens on my end is both numbers, anything (newlins and characters) in between the two numbers are visually selected.

      What I think should happen is just the first number should be visually selected.

      --
      --
      You received this message from the "vim_use" 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_use" group.
      To unsubscribe from this group and stop receiving emails from it, send an email to vim_use+unsubscribe@....
      For more options, visit https://groups.google.com/groups/opt_out.
    • Paul
      ... I think you were testing this with two two-digit numbers, eg: 12 34 When I do gn on a longer number, the cursor jumps forward two digits at a time with gn,
      Message 2 of 2 , Oct 2, 2013
      • 0 Attachment
        On Wednesday, 02 October, 2013 at 09:54:40 BST, Ryan Carney wrote:
        >I think I may have found a bug, I have list the steps to reproduce it.
        >
        >1. open a new buffer :tabe or :e test
        >2. put two single digits on different lines
        >3. search using the regex '\d' (without quotes)
        >4. put your cursor before or on the first digit then press gn
        >
        >I've tested this on vim 7.4 and 7.3.
        >
        >What happens on my end is both numbers, anything (newlins and characters) in between the two numbers are visually selected.
        >
        >What I think should happen is just the first number should be visually selected.

        I think you were testing this with two two-digit numbers, eg:

        12
        34

        When I do gn on a longer number, the cursor jumps forward two digits at a time with gn, whereas with just n, it jumps forward only one digit.

        --
        --
        You received this message from the "vim_use" 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_use" group.
        To unsubscribe from this group and stop receiving emails from it, send an email to vim_use+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.