Yegappan wrote:

> The :bunload command unloads an unexpected buffer when
> an offset is used for the range.
> 
> For example, let us say we have four buffers (b1, b2, b3 and b4)
> in the buffer list and only b1 and b2 are loaded. The buffers b3
> and b4 are not loaded. The current buffer is b1. With this setup,
> if the following command is executed:
> 
> .+3bunload
> 
> The expectation is that buffer b4 will be unloaded. As b4 is not
> loaded, the command should not do anything. Instead of this
> behavior, buffer b2 is unloaded. Basically any buffer loaded
> just before the specified buffer is unloaded. I don't know whether
> this is intentional or not. This is also not documented.
> 
> A similar behavior is seen when a negative offset is used.
> 
> I came across this behavior while developing a test for this.

I would expect that the number is used as-is, thus it does not matter
which buffers are loaded or not.  That is consistent with other buffer
commands.  Would anyone want to go to the Nth loaded buffer?  That would
be quite unpredictable.

-- 
Latest survey shows that 3 out of 4 people make up 75% of the
world's population.

 /// Bram Moolenaar -- [email protected] -- 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 [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/vim_dev/202002081501.018F1EV0014522%40masaka.moolenaar.net.

Raspunde prin e-mail lui