Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Loading…

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

Open
alloy opened this Issue · 0 comments

1 participant

Eloy Durán
Eloy Durán
Owner

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
Something went wrong with that request. Please try again.