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

Re: bufnr(" ") fails (always return -1)

Expand Messages
  • Christian Brabandt
    ... I think this is intentionally and no bug. bufnr() is not expected to resolve those special variables. regards, Christian -- You received this message from
    Message 1 of 4 , Nov 1, 2011
    • 0 Attachment
      On Mon, October 31, 2011 8:16 pm, Дмитрий Франк wrote:
      > when executing autocommands, bufnr('<afile>') always return -1,
      > bufname('<afile>') returns empty, but expand('<afile>') works.
      >
      > Ugly workaround is to use bufnr(expand('<afile>'))

      I think this is intentionally and no bug.
      bufnr() is not expected to resolve those special variables.

      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
    • Дмитрий Франк
      ok, thanks 1 ÎÏÑÂÒÑ 2011 Ç. 21:22 ÐÏÌØÚÏ×ÁÔÅÌØ Christian Brabandt ... -- You received this message from the vim_dev maillist. Do not
      Message 2 of 4 , Nov 2, 2011
      • 0 Attachment
        ok, thanks

        1 ноября 2011 г. 21:22 пользователь Christian Brabandt <cblists@...> написал:
        On Mon, October 31, 2011 8:16 pm, Дмитрий Франк wrote:
        > when executing autocommands, bufnr('<afile>') always return -1,
        > bufname('<afile>') returns empty, but expand('<afile>') works.
        >
        > Ugly workaround is to use bufnr(expand('<afile>'))

        I think this is intentionally and no bug.
        bufnr() is not expected to resolve those special variables.

        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

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