You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Seems like any solution for this is going to need to use readlink -f FILENAME (on Linux) to handle this case correctly. Consider the following:
gvim ../foo
cd ..
gvim foo
Here we have two different names given to gvim, but for the same file. Using readlink -f to get the canonical path will ensure the equality test is accurate. Granted $SUBJECT is about two different files and I'm describing two references to the same file, but I believe it still applies and simplifies how the fix should work.
It appears from testing that vim's fnamemodify function does yield the canonical path when given the :p option. So that makes a good platform-agnostic solution here.
jflorian
pushed a commit
to jflorian/vim-autoswap
that referenced
this issue
May 23, 2019
This resolves issue gioele#18, at least for Linux. The window matching (via
wmctrl) had the following problems:
- it was not case sensitive, yet Linux file systems generally are
- it matched only the base name, ignoring the path which led to false
matches
Signed-off-by: John Florian <[email protected]>
I tried working around this with
set titlestring=%{expand(\"%:p:h\")}
in my vimrc, but this did not solve the issue.The text was updated successfully, but these errors were encountered: