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

internal error with Vim-7.2.411 (E315: ml_get: invalid lnum: 3)

Expand Messages
  • Dominique PellĂ©
    Hi I can reproduce internal error E315 with Vim-7.2.411 on Linux: $ yes | head foo.txt $ chmod a-w foo.txt $ vim -u NONE -c au FileChangedRO * :%d -c norm
    Message 1 of 2 , Apr 29, 2010
    • 0 Attachment
      Hi

      I can reproduce internal error E315 with Vim-7.2.411 on Linux:

      $ yes | head > foo.txt
      $ chmod a-w foo.txt
      $ vim -u NONE -c 'au FileChangedRO * :%d' -c 'norm 3GD' foo.txt

      Error detected while processing command line:W10: Warning: Changing a
      readonly file
      E315: ml_get: invalid lnum: 3

      I realize that we're not meant to change the file in the
      FileChangedRO autocommand (and Vim warns about it: W10).
      However, I don't think it should cause an internal error.

      -- Dominique

      --
      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
    • Bram Moolenaar
      ... Thanks for reporting this. We should not get ml_get errors. I wonder what would be the best way to handle this. Perhaps it s just a matter of correcting
      Message 2 of 2 , May 2, 2010
      • 0 Attachment
        Dominique Pelle wrote:

        > I can reproduce internal error E315 with Vim-7.2.411 on Linux:
        >
        > $ yes | head > foo.txt
        > $ chmod a-w foo.txt
        > $ vim -u NONE -c 'au FileChangedRO * :%d' -c 'norm 3GD' foo.txt
        >
        > Error detected while processing command line:W10: Warning: Changing a
        > readonly file
        > E315: ml_get: invalid lnum: 3
        >
        > I realize that we're not meant to change the file in the
        > FileChangedRO autocommand (and Vim warns about it: W10).
        > However, I don't think it should cause an internal error.

        Thanks for reporting this. We should not get ml_get errors.
        I wonder what would be the best way to handle this.
        Perhaps it's just a matter of correcting the cursor position?

        --
        The process for understanding customers primarily involves sitting around with
        other marketing people and talking about what you would to if you were dumb
        enough to be a customer.
        (Scott Adams - The Dilbert principle)

        /// Bram Moolenaar -- Bram@... -- http://www.Moolenaar.net \\\
        /// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
        \\\ download, build and distribute -- http://www.A-A-P.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
      Your message has been successfully submitted and would be delivered to recipients shortly.