Vim identifies files by their full path, but displays them (e.g. on the
statusline) by a shorter path if possible. If you have several windows
on a single buffer, but with different "local current directories", it
may happen that Vim can shorten the name in one window but not in the
other. However it should display all statuslines relative to what is the
current directory now: if you change windows, and the LCDs are
different, statuslines may change.
Normally any single file is opened in only one buffer, regardless of in
how many windows (zero or more) it is displayed. If you type
:ls
Vim will tell you which buffers are opened; add an exclamation mark if
you want to see also the so-called "unlisted" buffers. No file should
appear more than once in the list, even under different paths; if it
does, it is probably a bug.
Different paths may exist if there are soft or hard links: in the case
of soft links, IIUC Vim will resolve them and store the path after
resolving all the soft links; if there are hard links (different
directory entries, possibly in different directories, pointing to a
single data area on disk) it is not always obvious which path has
priority, and I don't know what Vim does. Hard links are a
well-documented feature of Unix-like systems; on Windows they exist
also, at least on NTFS filesystems, but the feature is poorly documented
if at all. On Unix the . and .. directory entries are implemented as
hard links; OTOH on DOS these entries were present as an exception to
the fact that on FAT filesystems, different paths pointing to the same
data cluster were a case of "crossed paths" error usually leading to
data corruption.
Best regards,
Tony.
--
ARTHUR: You fight with the strength of many men, Sir knight.
I am Arthur, King of the Britons. [pause]
I seek the finest and the bravest knights in the land to join me
in my Court of Camelot. [pause]
You have proved yourself worthy; will you join me? [pause]
You make me sad. So be it. Come, Patsy.
BLACK KNIGHT: None shall pass.
The Quest for the Holy Grail (Monty
Python)