git-scope icon indicating copy to clipboard operation
git-scope copied to clipboard

Double click on file opens with cursor at the top of the file

Open hoxi opened this issue 2 years ago • 5 comments

Minor improvement: When double-clicking on a file in any of the created scopes, the file is opened with the cursor placed at the top of the file even if the file was already open in a tab. Would be good if the plugin could switch to the tab if it is already open and with that preserve the location of the cursor.

hoxi avatar Jun 29 '23 19:06 hoxi

Not sure what you mean. Do you mean the current selected file in the tree view?

comod avatar Jun 29 '23 19:06 comod

If I already have a file 'foo.c' open in a tab (but the tab is right now not in focus), then I also have the cursor at some place already in the file (say in the middle of the file). If I switch to this file/tab with for example "Ctrl->Tab", this tab will be set in focus, and the cursor will be at the previous position in the middle of the file. But if I also have the same file 'foo.c' in a Git Scope, and double click on "foo.c" in the Git Scope window, the same tab will be come into focus but with the cursor reset to the top of the file. I would like that the tab opened with the cursor in the middle of the file (since that was it's last state).

hoxi avatar Jun 29 '23 20:06 hoxi

Got it

comod avatar Jun 29 '23 20:06 comod

Yea, this is quite inconvenient because I mostly use the Git Scope view for navigating between files. I think this used to work in some previous version, so it would be great to see this fixed.

ml-mave avatar Oct 06 '23 07:10 ml-mave

Related bug: The Git Scope view scroll position goes to top when double-clicking to another file if the file wasn't in a tab already. Edit: Someone opened a separate issue about this: https://github.com/comod/git-scope/issues/11

ml-mave avatar Oct 06 '23 07:10 ml-mave