#732388 vim-gnome: getbufvar(NR, '') vs. getbufvar(bufname(NR), '')

Package:
vim
Source:
vim
Description:
Vi IMproved - enhanced vi editor
Submitter:
"Ph. Marek"
Date:
2019-11-04 01:54:05 UTC
Severity:
normal
#732388#5
Date:
2013-12-17 14:43:03 UTC
From:
To:
I'm not sure how that happened or whether I can reproduce it, but I just got
the state that
   echo getbufvar(NR, '')
gives a different result to
   echo getbufvar(bufname(NR), '')

The first only returns
   {}
while the second says
   {'ycm_changedtick': {'file_ready_to_parse': -1}, 'balloondict': {},
'infodict': {}}
(which is the expected result).


Don't know why that happens; the filename includes a "+", but that's not
sufficient to trigger the issue.


Setting new variables via
   let b:foo={}
makes them pop up in the longer variant, but not in the shorter.
--- real paths of main Vim binaries ---
/usr/bin/vi is /usr/bin/vim.gnome
/usr/bin/vim is /usr/bin/vim.gnome
/usr/bin/gvim is /usr/bin/vim.gnome

#732388#10
Date:
2013-12-17 14:49:45 UTC
From:
To:
Another point:

    echo bufname(7)

returns an empty string, which explains why getbufvar() then works - ''
means the current buffer, AFAIK.

Don't know where the disconnect between number and name is, though -
":ls" works as expected.