Thursday, November 3, 2016

Re: Can I count on buffer numbers never being re-used within a session?

Brett Stahlman wrote:

> I realize that in the current implementation, they are not re-used,
> but I need to know whether I can depend on this in future versions of
> Vim.
>
> According to documentation on :ls...
>
> "Each buffer has a unique number. That number will not change,
> thus you can always go to a specific buffer with ":buffer N""
>
> The rationale makes me wonder whether the guarantee is valid only for
> the lifetime of the buffer. Does the guarantee hold even if the buffer
> is eventually bwiped? (Again, I realize it does now, but I'm asking
> about design intent, so perhaps this is something only Bram can answer
> definitively...)

Buffer numbers are not re-used. Except that the last number can be
re-used if the buffer was empty.

--
Scientists decoded the first message from an alien civilization:
SIMPLY SEND 6 TIMES 10 TO THE 50 ATOMS OF HYDROGEN TO THE STAR
SYSTEM AT THE TOP OF THE LIST, CROSS OFF THAT STAR SYSTEM, THEN PUT
YOUR STAR SYSTEM AT THE BOTTOM OF THE LIST AND SEND IT TO 100 OTHER
STAR SYSTEMS. WITHIN ONE TENTH GALACTIC ROTATION YOU WILL RECEIVE
ENOUGH HYDROGREN TO POWER YOUR CIVILIZATION UNTIL ENTROPY REACHES ITS
MAXIMUM! IT REALLY WORKS!

/// Bram Moolenaar -- Bram@Moolenaar.net -- 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_use" 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_use" group.
To unsubscribe from this group and stop receiving emails from it, send an email to vim_use+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

No comments: