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

Behavior of renaming a file open tab other than the current one is incorrect. #28

Open
alloy opened this issue Jun 28, 2011 · 0 comments

Comments

@alloy
Copy link
Owner

alloy commented Jun 28, 2011

The current behavior isn't fully correct because opening the renamed file will happen in the current window/view/tab (whatever the right name is in a vim context), instead of the one that had the old file open.

Example:

  • Open two files, in this example foo.txt and bar.txt.
  • Select the tab that holds foo.txt.
  • Rename bar.txt to baz.txt

The expected result:

  • There are still two tabs open
  • One for foo.txt and one for the new named file baz.txt
  • Also it would probably be best that the tab selection doesn't change, i.e. foo.txt is still the current tab, however that's of less importance right now.

Actual result:

  • The tab that showed bar.txt is closed
  • The current tab no longer shows foo.txt but the newly named baz.txt
  • Obviously this is because we simply do :edit new/file/path, which will do so in the current window/view/tab.

So the question is, is there a way to open a file in a specific window/view/tab without changing the current shown selection?

Otherwise we probably have to check if the file that is going to be renamed is opened in a window/view/tab, switch selection to it, and only then open the newly named file. Is there a way to do this with or besides -[MMAppController openFiles:withArguments:]?

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

No branches or pull requests

1 participant