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

patch for viminfo crashing

Expand Messages
  • Ron Aaron
    Sorry, Bram - I still encounter a number of crashes related to viminfo merge. Here is my patch (which solves the different problems I ve encountered so far).
    Message 1 of 4 , Apr 20, 2013
    • 0 Attachment
      Sorry, Bram - I still encounter a number of crashes related to viminfo merge.

      Here is my patch (which solves the different problems I've encountered so far).

      Best regards,
      Ron

      Index: src/ex_getln.c
      ==================================================================
      --- src/ex_getln.c
      +++ src/ex_getln.c
      @@ -6228,11 +6228,11 @@
      if (i >= 0)
      while (num_saved > 0
      && !(round == 2 && i >= viminfo_hisidx[type]))
      {
      p = round == 1 ? history[type][i].hisstr
      - : viminfo_history[type][i];
      + : (viminfo_history[type] ? viminfo_history[type][i] : NULL);
      if (p != NULL && (round == 2 || !history[type][i].viminfo))
      {
      --num_saved;
      fputc(hist_type2char(type, TRUE), fp);
      /* For the search history: put the separator in the
      @@ -6259,11 +6259,12 @@
      ++i;
      }
      }
      }
      for (i = 0; i < viminfo_hisidx[type]; ++i)
      - vim_free(viminfo_history[type][i]);
      + if (viminfo_history[type])
      + vim_free(viminfo_history[type][i]);
      vim_free(viminfo_history[type]);
      viminfo_history[type] = NULL;
      viminfo_hisidx[type] = 0;
      }
      }

      --
      --
      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
      ... Do you have an idea of when the crash happens? Does it depend on your viminfo setting perhaps? -- hundred-and-one symptoms of being an internet addict:
      Message 2 of 4 , Apr 21, 2013
      • 0 Attachment
        Ron Aaron wrote:

        > Sorry, Bram - I still encounter a number of crashes related to viminfo merge.
        >
        > Here is my patch (which solves the different problems I've encountered
        > so far).

        Do you have an idea of when the crash happens? Does it depend on your
        'viminfo' setting perhaps?


        --
        hundred-and-one symptoms of being an internet addict:
        201. When somebody asks you where you are, you tell them in which chat room.

        /// 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.
      • Ron Aaron
        ... I get the crash when I quit vim (if I had a viminfo file already), and also when switching projects (like sessions, with more information). My viminfo is
        Message 3 of 4 , Apr 21, 2013
        • 0 Attachment
          On 04/21/2013 02:07 PM, Bram Moolenaar wrote:
          > Do you have an idea of when the crash happens? Does it depend on your
          > 'viminfo' setting perhaps?


          I get the crash when I quit vim (if I had a viminfo file already), and
          also when switching 'projects' (like sessions, with more information).

          My viminfo is

          set viminfo=c,!,<1000,'1000


          --
          --
          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.
        • mattn
          ... viminfo setting perhaps? gvim -u NONE -N ... I could reproduce this. -- -- You received this message from the vim_dev maillist. Do not top-post! Type
          Message 4 of 4 , Apr 21, 2013
          • 0 Attachment
            > Do you have an idea of when the crash happens? Does it depend on your
            'viminfo' setting perhaps?

            gvim -u NONE -N
            :wviminfo new_viminfo_file.vim

            I could reproduce this.

            --
            --
            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.