[- vim_dev]
winterttr wrote:
> I think you can reproduce the case like this
>
> open a new vim :
>
> source the code below :
> ---------------------------code 1-----------------------------
> call bufnr( "PV_LISTBUF_8680477943" ,1 )
> call setbufvar( 2 , "&modifiable" , 0 )
> call setbufvar( 2 , "&swapfile" , 0 )
> call setbufvar( 2 , "&buftype" , "nofile" )
> call setbufvar( 2 , "&readonly" , 1 )
> call setbufvar( 2 , "&bufhidden" , "hide" )
> call setbufvar( 2 , "&buflisted" , 0 )
> -----------------------------------------------------------------
This won't work, since a new Vim doesn't have buffer 2.
What do you do to get buffer 2?
>
> and now , source these code :
> -----------------------code 2-----------------------------------
> echo getbufvar( 2 , "&modifiable")
> echo getbufvar( 2 , "&swapfile" )
> echo getbufvar( 2 , "&buftype" )
> echo getbufvar( 2 , "&readonly" )
> echo getbufvar( 2 , "&bufhidden" )
> echo getbufvar( 2 , "&buflisted" )
> ------------------------------------------------------------------
>
> My result is below ( the same as i set by code1 ) :
> -------------------------result 1---------------------------------
> 0
> 0
> nofile
> 1
> hide
> 0
> ---------------------------------------------------------------------
>
> The problem occur when i just want to show the buffer
> do this by :buffer 2
> then , source the code2 again
> At this time , my result is like this :
> -------------------------result 2 ----------------------------------
> 1
> 0
> 0
> 0
> -----------------------------------------------------------------------
>
> All my setting to the buffer 2 seems to be discarded.
Most likely because it got loaded or autocommands triggered.
>
> Is there anything wrong with my operation ?
>
> PS:
> version info : vi...@winxp
--
FATHER: You only killed the bride's father - that's all -
LAUNCELOT: Oh dear, I didn't really mean to...
FATHER: Didn't mean to? You put your sword right through his head!
LAUNCELOT: Gosh - Is he all right?
"Monty Python and the Holy Grail" PYTHON (MONTY) PICTURES LTD
/// Bram Moolenaar -- [email protected] -- 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_use" maillist.
For more information, visit http://www.vim.org/maillist.php
-~----------~----~----~----~------~----~------~--~---