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

Re: Problem with Cursor Position when Quitting Search/Replace

Expand Messages
  • Bram Moolenaar
    ... Thanks, I ll include it. Hmm, white space differs, but it s easy to include by hand. -- hundred-and-one symptoms of being an internet addict: 150. You
    Message 1 of 4 , Mar 7, 2012
    • 0 Attachment
      Christian Brabandt wrote:

      > On Mon, March 5, 2012 23:24, Lawman wrote:
      > > I often start at the top of a file with a command of the format
      > > :.,$s/XXX/YYY/gc
      > > to replace all occurances of XXX with YYY from the current position with
      > > confirmation of each replacement by hitting Y or N.
      > >
      > > Sometimes I hit an occurance of XXX which requires additional work.
      > > To do this I
      > > hit Q to Quit the search/replace operation. I will reissue the same
      > > command to
      > > restart the search/replace after performing the additional work.
      > >
      > > If I hit Q on the FIRST find of XXX, the cursor will stay at the point
      > > of the match.
      > > However, if I hit the Q after having hit Y or N ONE OR MORE TIMES, the
      > > cursor
      > > will jump back to the beginning of the line on which the match was just
      > > found.
      > >
      > > I often hit Q many times to perform additional work and dislike the having
      > > to
      > > reposition the cursor back to the point of the last occurance of XXX to
      > > perform
      > > my additional work.
      > >
      > > This only occurs with gvim.exe version 7.3.46 compiled Oct 27, 2010. It
      > > does
      > > NOT occur with vim.exe version 7.3.46 compiled Oct 27, 2010 when used in
      > > console mode.
      > >
      > > I am running Windows XP SP3 on a machine with 3GB of ram.
      > >
      > > Is this a problem with Vim program code or a problem with one of my _vimrc
      > > settings? The only difference between _vimrc and _gvimrc is that _gvimrc
      > > has a "set number" command (I find that line numbers take up too much
      > > room when limited to a 80-character screen width in console mode).
      >
      > Hm, looks like a bug. Attached patch fixes it.

      Thanks, I'll include it. Hmm, white space differs, but it's easy to
      include by hand.

      --
      hundred-and-one symptoms of being an internet addict:
      150. You find yourself counting emoticons to get to sleep.

      /// 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
    • Christian Brabandt
      ... I ll admit, sometimes I have a hard time, figuring out the correct indentation. What indentation settings are you using for developing vim? regards,
      Message 2 of 4 , Mar 7, 2012
      • 0 Attachment
        On Wed, March 7, 2012 14:58, Bram Moolenaar wrote:
        >
        > Christian Brabandt wrote:
        >
        >> On Mon, March 5, 2012 23:24, Lawman wrote:
        >> > I often start at the top of a file with a command of the format
        >> > :.,$s/XXX/YYY/gc
        >> > to replace all occurances of XXX with YYY from the current position
        >> with
        >> > confirmation of each replacement by hitting Y or N.
        >> >
        >> > Sometimes I hit an occurance of XXX which requires additional work.
        >> > To do this I
        >> > hit Q to Quit the search/replace operation. I will reissue the same
        >> > command to
        >> > restart the search/replace after performing the additional work.
        >> >
        >> > If I hit Q on the FIRST find of XXX, the cursor will stay at the point
        >> > of the match.
        >> > However, if I hit the Q after having hit Y or N ONE OR MORE TIMES, the
        >> > cursor
        >> > will jump back to the beginning of the line on which the match was
        >> just
        >> > found.
        >> >
        >> > I often hit Q many times to perform additional work and dislike the
        >> having
        >> > to
        >> > reposition the cursor back to the point of the last occurance of XXX
        >> to
        >> > perform
        >> > my additional work.
        >> >
        >> > This only occurs with gvim.exe version 7.3.46 compiled Oct 27, 2010.
        >> It
        >> > does
        >> > NOT occur with vim.exe version 7.3.46 compiled Oct 27, 2010 when used
        >> in
        >> > console mode.
        >> >
        >> > I am running Windows XP SP3 on a machine with 3GB of ram.
        >> >
        >> > Is this a problem with Vim program code or a problem with one of my
        >> _vimrc
        >> > settings? The only difference between _vimrc and _gvimrc is that
        >> _gvimrc
        >> > has a "set number" command (I find that line numbers take up too much
        >> > room when limited to a 80-character screen width in console mode).
        >>
        >> Hm, looks like a bug. Attached patch fixes it.
        >
        > Thanks, I'll include it. Hmm, white space differs, but it's easy to
        > include by hand.

        I'll admit, sometimes I have a hard time, figuring out the correct
        indentation. What indentation settings are you using for developing vim?

        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
      Your message has been successfully submitted and would be delivered to recipients shortly.