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

fix press Enter key to goto diff lines of file when no opend working folder here #496

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

Conversation

watergear
Copy link

What to fix?
#491


Why it is failed?

Git root is failed to get after create new view window.
Because a new view window will be created by new_file() and later active_view() return the new view window without git root.


How to fix?

  1. backup git root
  2. create new view window
  3. set the backup git root into new view window settings

@watergear
Copy link
Author

Hi, @kemayo

I see you have merged #524. @vanrijn said it might help for #491 but it actually doesn't.

see my reply in #524

Thank you for your work. But the #496 can not be solved by this change. I pull your commit and test failed.

As my said at #496, active view is changed and the new view window can not get the file path. That means it is too late to get the git root path. At the moment, self.active_file_path() and window.folders()[0] are both None. It is no way to get git root path back again.

The solution is to get the git root path before creating new scratch view, and then store the git root path into new view.

I sincerely hope you can take the time to look at my problem and try to merge it.

Thanks
watergear

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.

1 participant