New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Sublime opens new tab for same file #2158
Comments
This is also possible to replicate on Windows without any symlinks by using the
The good news is that >>> files = [view.file_name() for view in sublime.active_window().views()[-2:]]; print(files); import os; os.path.samefile(*files)
['C:\\Windows\\win.ini', 'W:\\win.ini']
True |
Please bump this up to a top priority, I usually work with several different clones of the same file Opening the file via SHIFT+P and then cloning opens one set of linked tabs Note: I found this issue via "files open to multiple tabs due to case in path" 37136 |
@MarkGoldberg, until Sublime Text Core does not fixes it, and as keith-hall reported that Edit, I just missed that titoBouzout seems to already created one package fixing it: |
To prevent corruption I may suggest to set |
I think I'm having the same issue in sublime 3 for windows (3176). I'm working with a project on a 'subst' drive. However when I disabled the subst, and reinstalled sublime, and removed the project, the issue still persisted. What I noticed is that the original file had uppercase drive letter in the path, and the duplicate had lowercase drive latter. I was able to fix the issue by changing the drive letter case in the workspace file and reopening all files. However, the fix only laster for maybe couple weeks. This is very strange. The duplicated tab always flickers when I save the original, and sometimes the chnages I make are not saved. Been using sublime for a long time and this is such an unfortunate thing. Only started happening recently for me. Is there any news on this issue? I can provide more detailed information and help fix this. |
regarding case sensitivity on Windows, this was fixed in build 3180 |
@keith-hall Ah, yes, thank you. It's right there in the change logs. I forgot there are dev builds. |
Hey, nice work! Does your plug-in still work? I tried to install it but couldn't get it to work. |
@Cerberus-tm It does, Im using ST3 tho |
Nice plugin, but |
I have to agree lol, I could understand why one may desire to open multiple instances of the same file without sharing a buffer, but allowing that by default its a recipe for disaster.... which is only noticed when you reach data loss, go figure |
@titoBouzout : By default sublime does not open new view for same file! Algorithm is next:
|
Summary
The result is really bizarre if path has more symlinks
Expected behavior
When file is opened from command line the current path should be used. And not new tab should be opened. Just line other editors do:
Actual behavior
File name is expanded to physical path.
The symlinks are called to shorten paths but Sublime Text make them back very very very very very very very ugly long
Yes, to track same file and do not open same file twice or more times you can expand the path but please save it internally. When displaying show please the path the file is opened from.
Environment
Please fix this behavior. It makes me hurt.
The text was updated successfully, but these errors were encountered: