Closed thecontinium closed 3 years ago
I suspect I am missing the full picture here because I'm not sure what the _index is appended at the end ?n. It seems you can have more than one defx buffer for the same name ?
Yes. Because you can create multiple buffer name defxs by -new
option.
Is there a way to get the above embellished name to that given in the -buffer-name option ? or a defx function that can tell me whether the defx buffer is showing for a given buffer-name ?
No. Because it is internal feature. It is not documented and may be changed in the later version.
You should get the name by bufname()
instead.
ok - cheers
If you need to check the buffer, you should check defx#get_context()
in defx window or b:defx
variable.
ah! - that will help; thanks
Hi
When I open defx I am using the
-buffer-name={buffer-name}
option and then use that buffer-name to identify whether the buffer is open usingbufwinnr
I see that in view.py you embellish the buffer name with:
I suspect I am missing the full picture here because I'm not sure what the _index is appended at the end ? It seems you can have more than one defx buffer for the same name ?
So I can try and "construct" this name in the same way but I am not sure what the index is appended at the end.
Is there a way to get the above embellished name to that given in the -buffer-name option ? or a defx function that can tell me whether the defx buffer is showing for a given buffer-name ?
Thanks in advance.