scroll position of list with selected file is not correctly restored in commit dialog after refresh
What steps will reproduce the problem?
- Open dialog "Commit" of a repository where such a large number of files is changed that the list does not fit completely into its viewport (or reduce height of dialog "Commit"), showing a vertical scroll bar
- Scroll a bit down, but not to the bottom, and select an arbitrary file from the list but not the last one in the view.
- Press F5 to refresh.
- Observe how the selected file is shown at a different position and the scroll bar moved.
What is the expected output? What do you see instead?
After the refresh, the list is expected to be at the same scroll position, i.e. the scroll bar should not jump and the first list item shown should be the same as before.
Instead the view is scrolled. For very long lists of changed files, the selected file will be at the bottom of view after refresh.
If no file is selected, everything will work fine and the view is correctly restored.
The screen cast shows this behavior. Part I shows the correct behavior without any selected file. Part II shows the unexpected behavior in case a file is selected in the list.
The unexpected behavior will be especially annoying if conflicts are resolved from dialog "Commit". After a file is resolved (e.g. by TortoiseGitMerge) the list automatically refreshes. Since, in order to resolve conflicts, a file has been selected previously, it is scrolled to the bottom of the view.
What version of TortoiseGit and Git are you using? On what operating system?
- TortoiseGit 184.108.40.206
- git version 2.35.1.windows.2
- Windows 10 Build 19043.1766
Please provide any additional information below.