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

windows and buffers confused about eachother

Expand Messages
  • Eric Arnold
    What does it mean when ... returns, say, 20, and ... also returns 20, while ... says 2 a file1 line 47 20 %a + file2
    Message 1 of 1 , Apr 30, 2005
    • 0 Attachment
      What does it mean when

      :echo bufnr("file1")

      returns, say, 20, and

      :echo bufnr("file2")

      also returns 20, while
      :ls!
      says

      2 a "file1" line 47
      20 %a + "file2" line 169

      that "file1" is 2, and "file2" is 20? The rest of the function calls
      also seem to be confused about it, i.e. bufwinnr("file1") and
      bufwinnr("file2") both return the same window # 2. Only typing

      echo bufname("%")

      from each window yields the right answer. Aren't buffer numbers supposed to
      be unique?

      I have a script which uses async background events to keep hopping from
      a user's window to it's own window, where it does an update, then hops
      back to the user's window until the next cycle. It seems to be
      confusing something ( in addition to me ).
    Your message has been successfully submitted and would be delivered to recipients shortly.