Skip to content
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

Add duplicate-file-open prevention ability #48

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

GavinRay97
Copy link

Note that this will not work properly if files are opened before the plugin is initialized as it cannot track them.

@sum01
Copy link
Collaborator

sum01 commented Feb 3, 2020

It's not a bad idea, but this won't work if a file is opened in a way other than using the filemanager.

People might be annoyed at this type of change without it being behind an option (although I personally don't care). It's minor, but someone might open 1 file side-by-side, which this doesn't allow for.

@@ -527,6 +527,9 @@ local function go_back_dir()
end
end

-- Store a reference to the last opened file
open_files ={}
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Make this local open_files = {} to avoid conflicts outside of the plugin

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants