Wrong tab gets selected when tab names overflow on the tab bar


Here is a pretty bad bug that has been in mRemoteNG a long time and has caused me to execute commands on hosts I wasn't expecting to:

When the tab bar has sufficient tabs on it that they overflow (i.e. requiring the use of left/right arrow buttons), then selecting the partially visible tab on the right will actually select the next one along (i.e. the one to the right of it).

For example:
Duplicate a PuTTY session so you have enough numbered tabs that they can't all be displayed at once.

Really Long Named Tab 1
Really Long Named Tab 2
Really Long Named Tab 3
Really Long Named Tab 4
Really Long Named Tab 5
Really Long Named Tab 6
Really Long Named Tab 7

Now, lets say your tab bar is currently scrolled all the way to the left, and the names of tabs 1 through 4 are fully visible, and the name of the 5th tab is only partially visible. You will find that if you try to select tab 5 by clicking on it, it is actually tab 6 that will be selected.

Tab 5 will be automatically scrolled into view so that the full name is visible, and tab 5 is selected/active.

Tab 6 is selected/active.


Windows 7 x64


Riley McArdle



Fix versions

Affects versions