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

Bug: wrong merge of :wviminfo

Expand Messages
  • mMontu
    Hi, I think this is a known bug that wasn t caught on the regression tests, as mentioned in
    Message 1 of 5 , Jul 2, 2014
    • 0 Attachment
      Hi,

      I think this is a known bug that wasn't caught on the regression tests, as mentioned in http://stackoverflow.com/questions/18662065/cant-reset-global-mark-in-vim

      This is how to reproduce it:

      $ mv .viminfo{,.old}
      $ vim -N -u NONE -U NONE
      :h
      mA
      :marks
      -> mark A present
      :qall
      $ vim -N -u NONE -U NONE
      :marks
      -> mark A present
      :delmark A
      :marks
      -> mark A gone
      :wviminfo
      :marks
      -> mark A present
      :delmark A
      :marks
      -> mark A gone
      :wviminfo!
      :marks
      -> mark A gone

      This occurs in Vim 7.4 with included patches: 1-347.

      --
      --
      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/d/optout.
    • Bram Moolenaar
      ... So, what is the problem? Check the help for :wviminfo for what it s expected to do, it s not obvious. -- BLACK KNIGHT: Come on you pansy! [hah] [parry
      Message 2 of 5 , Jul 2, 2014
      • 0 Attachment
        Montu wrote:

        > I think this is a known bug that wasn't caught on the regression
        > tests, as mentioned in
        > http://stackoverflow.com/questions/18662065/cant-reset-global-mark-in-vim
        >
        > This is how to reproduce it:
        >
        > $ mv .viminfo{,.old}
        > $ vim -N -u NONE -U NONE
        > :h
        > mA
        > :marks
        > -> mark A present
        > :qall
        > $ vim -N -u NONE -U NONE
        > :marks
        > -> mark A present
        > :delmark A
        > :marks
        > -> mark A gone
        > :wviminfo
        > :marks
        > -> mark A present
        > :delmark A
        > :marks
        > -> mark A gone
        > :wviminfo!
        > :marks
        > -> mark A gone
        >
        > This occurs in Vim 7.4 with included patches: 1-347.

        So, what is the problem? Check the help for :wviminfo for what it's
        expected to do, it's not obvious.

        --
        BLACK KNIGHT: Come on you pansy!
        [hah] [parry thrust]
        [ARTHUR chops the BLACK KNIGHT's right arm off]
        ARTHUR: Victory is mine! [kneeling]
        We thank thee Lord, that in thy merc-
        [Black Knight kicks Arthur in the head while he is praying]
        The Quest for the Holy Grail (Monty Python)

        /// 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/d/optout.
      • mMontu
        ... I m sorry if I wasn t clear. I was expecting that when I used `delmark` the mark would disappear, but it is coming back after restarting Vim, i.e: $ mv
        Message 3 of 5 , Jul 2, 2014
        • 0 Attachment
          > So, what is the problem? Check the help for :wviminfo for what it's
          >
          > expected to do, it's not obvious.

          I'm sorry if I wasn't clear. I was expecting that when I used `delmark` the mark would disappear, but it is coming back after restarting Vim, i.e:

          $ mv .viminfo{,.old}
          $ vim -N -u NONE -U NONE
          :h
          mA
          :marks
          -> mark A present
          :qall
          $ vim -N -u NONE -U NONE
          :marks
          -> mark A present
          :delmark A
          :marks
          -> mark A gone
          :q
          $ vim -N -u NONE -U NONE
          :marks
          -> mark A present -> expected it has been deleted

          This happens when there is a single instance of Vim running, so I understood that it is the same question on the referenced link, where Christian Brabandt wrote:

          "I think, some of the latest 7.3 patches changed how writing the viminfo file happened and how old data was being merged, which might have caused a regression.

          In any case, explicitly writing the viminfo file (using :wviminfo) should work, if not, please write a detailled description of what you did and what you expect to the developers list (vim_dev@...)."

          --
          --
          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/d/optout.
        • Bram Moolenaar
          ... When you exit Vim the existing viminfo will be merged with your current state. Thus if the viminfo contains an A mark and your current Vim doesn t, the A
          Message 4 of 5 , Jul 2, 2014
          • 0 Attachment
            Marc Montu wrote:

            > > So, what is the problem? Check the help for :wviminfo for what it's
            > >
            > > expected to do, it's not obvious.
            >
            > I'm sorry if I wasn't clear. I was expecting that when I used
            > `delmark` the mark would disappear, but it is coming back after
            > restarting Vim, i.e:
            >
            > $ mv .viminfo{,.old}
            > $ vim -N -u NONE -U NONE
            > :h
            > mA
            > :marks
            > -> mark A present
            > :qall
            > $ vim -N -u NONE -U NONE
            > :marks
            > -> mark A present
            > :delmark A
            > :marks
            > -> mark A gone
            > :q
            > $ vim -N -u NONE -U NONE
            > :marks
            > -> mark A present -> expected it has been deleted
            >
            > This happens when there is a single instance of Vim running, so I
            > understood that it is the same question on the referenced link, where
            > Christian Brabandt wrote:
            >
            > "I think, some of the latest 7.3 patches changed how writing the
            > viminfo file happened and how old data was being merged, which might
            > have caused a regression.
            >
            > In any case, explicitly writing the viminfo file (using :wviminfo)
            > should work, if not, please write a detailled description of what you
            > did and what you expect to the developers list
            > (vim_dev@...)."

            When you exit Vim the existing viminfo will be merged with your current
            state. Thus if the viminfo contains an A mark and your current Vim
            doesn't, the A mark in the viminfo file is kept. This is intentional.
            There is not much use in deleting the A mark in the viminfo file, and
            keeping the last action would require storing a timestamp, which gets
            too complicated.


            --
            Advice to worms: Sleep late.

            /// 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/d/optout.
          • mMontu
            Ok, thank you very much! -- -- You received this message from the vim_dev maillist. Do not top-post! Type your reply below the text you are replying to. For
            Message 5 of 5 , Jul 2, 2014
            • 0 Attachment
              Ok, thank you very much!

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