[CLOSED, not related->Lazarus] Editor tabs label not synchronized with unit name lazarus / 9-Editor ---------------------------------------------------------------------- BrunoK · 2019-10-27 11:34 W10 / Lazarus trunk / Lazarus 2.0.6 Step to reproduce : 1 - Have 3 tabs open in the source editor 2 - Click and hold down on the third one. 3 - Move it, for example, after the first tab and release mouse. The tab titles do not all match the edited file but is correct in the status bar. Can anybody else reproduce ? ---------------------------------------------------------------------- Martin_fr · 2019-10-27 11:47 Works fine for me. Cannot reproduce ---------------------------------------------------------------------- BrunoK · 2019-10-27 15:47 Load project : lazarus_2_0_6\examples\bitbutton.lpi you get 2 tabs in the source editor (left to right) : bitbutton and bitbtnform. Now click on the bitbtnform tab and move it to the left of bitbutton unit. You'l have 2 tabs with  (left to right) :bitbtnform and bitbutton  Look at the status bar of the editor :   when the bitbutton tab is selected -> status bar indicates bitbtnform.pp   when the bitbtnform tab is selected -> status bar indicates bitbutton.pp Now press the left most tab and move it after the second one and you get 2 tabs with tab label bitbutton. ---------------------------------------------------------------------- wp · 2019-10-27 16:26 I cannot confirm with neither Laz trunk, nor Laz 2.0.4, nor Laz fixes (which should be 2.0.6). ---------------------------------------------------------------------- Martin_fr · 2019-10-27 16:55 Still works for me... Official Lazarus 2.0.6 32bit for windows, fresh install. Do you have any packages installed? (anchor docking?) Though I did just install anchor-dock (but no sparta) and it still works fine ---------------------------------------------------------------------- BrunoK · 2019-10-27 19:26 Will dig a bit with Lazarus debug version  and no additonal packages. ---------------------------------------------------------------------- BrunoK · 2019-10-28 11:15 Joined image of what shows. If after the manipulations show in the image, you drag once more the leftmost tab to the right, you end up whit 2 tabs with the same caption. SVN upgrade and list of installed packages. QuoteUpdate D:\fpc-laz\Lazarus\lazarus_2_0_6 from https://svn.freepascal.org/svn/lazarus/tags/lazarus_2_0_6 At revision: 62137                                                                                                             Full clean before rebuilding : Quotecd D:\fpc-laz\Lazarus del /s /q *.or del /s /q *.a del /s /q *.o del /s /q *.ppu del /s /q *.rsj del /s /q *.fpm This is a bare svn downloaded 3_0_6 without any of may personal improvements. ---------------------------------------------------------------------- Martin_fr · 2019-10-28 11:36 According to your image, right after you dragged "bitbutton" it is not the active tab. For me the tab that I dragged, always will be the active tag. I have to click the bitbuttonform to make it active. What happens if you change tabs? Add a tab? Will it synchronize again? Could it be that the IDE thinks the 2nd tab is active, but it is not highlighted? Just in case my win 10, is build 1903. ---------------------------------------------------------------------- BrunoK · 2019-10-28 11:48 What I mean is that in the third part of the image, the active Tab caption does not match the status bar filename. ---------------------------------------------------------------------- Martin_fr · 2019-10-28 12:13 Quote from: BrunoK on October 28, 2019, 12:48:58 pmWhat I mean is that in the third part of the image, the active Tab caption does not match the status bar filename. Yes I get what you mean. But it does not happen to me. Yet there is a crucial difference between our experiences. That is I assume that: - After the drag action - You did NOT click the first tab. => the first tab was already activated (as in the 3rd part of the image) by the drag action itself. So for you the tab that you dragged, is not active (at least display- wise) after you end the drag. For me the dragged tab always is the active one. So to narrow down what goes wrong: Maybe the IDE thinks that the 2nd tab is active (even though it is not visible marked as active). Therefore my question: QuoteWhat happens if you change tabs? Add a tab? Will it synchronize again? Could it be that the IDE thinks the 2nd tab is active, but it is not highlighted? --- What is your windows build version? Maybe something changed? ---------------------------------------------------------------------- BrunoK · 2019-10-28 14:52 Quote from: Martin_fr on October 28, 2019, 01:13:49 pmTherefore my question: What happens if you change tabs? Add a tab? Will it synchronize again? Could it be that the IDE thinks the 2nd tab is active, but it is not highlighted?Tabs end up pretty messed up with Tab caption not matching edited file. Quote from: Martin_fr on October 28, 2019, 01:13:49 pmWhat is your windows build version? Maybe something changed? Edition  : Windows 10 Pro Version : 1903 Installé le :  11.09.2019 Version du système d'exploitation : 18362.418 Hope we are not falling again on a Windows starts slowly like issue ... Version seems pretty recent and I think I would have noticed if it did happened before. ---------------------------------------------------------------------- Martin_fr · 2019-10-28 15:26 So same win version.... I move my tabs regularly. Usually between several windows, but also within one and the same. Though usually I use key-shortcuts (need to be assigned). But for testing your cases, I used the mouse.. Couple more questions (this is a bit poking for random luck, since I currently have no idea what goes wrong) 1) The content of the file, matches - the tab title - the status bar ? 2) change the name of the unit (in the "unit foo;" declaration) and trigger code tools (attempt a "Jump to declaration"). This should update the tab caption. Does it update the tab that - is visible active (and did show the wrong name before) - is visible not active, but did show the name of this unit 3) Does the entire issue also occur if you move the tabs - from the context menu: right click the tab (of the current active unit, before any mess has happened). Use the sub-menu "move page" - via keyboard (assign keys in Tools > Option) And one more question... Weird stuff sometimes depend on optimization. What opt level -Ox do you use to build your IDE? (I am always on -O1 or -O-) ---------------------------------------------------------------------- BrunoK · 2019-10-28 15:54 @Martin_fr : Will answer tomorrow. Thank you for your attention. ---------------------------------------------------------------------- BrunoK · 2019-10-29 10:04 [CLOSED, not related to Lazarus] In fact there is no apparent problem with lazarus itself. Even my development trunk where I attempt to get rid of the Configure Lazarus IDE screen that always disagree with me having make in a separate directory, doesn't show this problem after rebuild with clean 3.0.4 To test, I copied all my stuff to a Win7 machine and it did show the same problem, so, not Win10 related. After a recovery of a clean 3.0.4, recompiled both Trunk and 2.0.6 and everything is OK. So it is a consequence of recent changes I made to my FPC 3.0.4+ where I refactored all TList and descendants to TList = class(TFPList) or maybe a change to my heaptrc that reports leaked memory class names or even maybe a problem with loading memorymanager first at program startup. Some work in perspective to sort that out ... Since those codes had worked well (6+ months) until very recently I'll have to hunt when and where I did wrong lately. Sorry to have taken your time and many thanks to Martin_fr for his patience. ---------------------------------------------------------------------- Martin_fr · 2019-10-29 13:30 In case you need.... ide/sourceEditor Code: Pascal  [Select][+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i procedure TSourceNotebook.MoveEditor(OldPageIndex, NewPageIndex: integer);begin...  NoteBookPages.Move(OldPageIndex,NewPageIndex);  And if I traced it correct, NoteBookPages: comctrls Code: Pascal  [Select][+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i   TNBPages = class(TNBBasePages) I have no idea if anything changed in those, that conflicts with whatever changes you had. svn blame should tell.... Note that this move, must somehow tell the underlying widgetset (win API) that pages were moved.