View Issue Details

IDProjectCategoryView StatusLast Update
0018033LazarusIDEpublic2010-12-21 22:27
ReporterDenis Golovan Assigned ToMartin Friebe  
Status closedResolutionfixed 
Product Version0.9.29 (SVN) 
Target Version0.9.30Fixed in Version0.9.29 (SVN) 
Summary0018033: Suddenly editor closes all tabs

It is a problem to reproduce this bug, but I get it regularly (twice a day or so).
Basically when trying to close some unit/tab in editor, all but the correct tabs are closed.
Sometimes a "fantom" tab without any filename on it precedes this problem. This fantom is always the last tab. I suspect something is wrong with the closing tab index.
TagsNo tags attached.
Fixed in Revision28788
WidgetsetGTK 2
Attached Files


related to 0016165 closedMartin Friebe All editor tabs close unexpectedly except for one I clicked on 


Vincent Snijders

2010-11-23 23:26

manager   ~0043440

I think it is because Lazarus think you have CTRL pressed while clicking.

Ctrl+Click means close all but current tab.

Vincent Snijders

2010-11-23 23:27

manager   ~0043441

Did you press the ctrl key shortly before?

Denis Golovan

2010-11-24 00:06

reporter   ~0043443

No, I don't think I press Ctrl each time while clicking.

Actually, I do use Ctrl a lot as a part of Ctrl+Ins sequence.
So maybe Lazarus misuses some keyboard information?

Martin Friebe

2010-11-24 00:10

manager   ~0043444

It could be the same as 0016165

The problem is gtk2 (gtk?) only.

When the IDE looses focus, while you hold down the ctrl kety. And you release the ctrl key, while the IDE does not have focus, then the IDE never knows you released it.

Now if you focus the IDE again (while ctrl is no longer pressed), the IDE still believes that ctrl is pressed.

If you now (middle) click a tab, then all others get closed, and the only clicked tab is kept open.

Not sure however where the "phantom" tab comes from. Can you run lazarus from console, and see if any exception/stack trace are printed? Only if the "phantom" occurs.

Martin Friebe

2010-11-24 00:11

manager   ~0043447

Btw which revision are you on? The ctrl click seems to have been broken recently...
So if you where on a very recent revision, then it must be something else.

If your revision was not so recent:
I added an option ( in the editor options / "multi windows and pages" section, which has all the notebook related stuff). You can now disable the ctrl-middle click (it will then become a normal middle click).
This does not fix the underlying ctrl-key-state issue.

Denis Golovan

2010-11-24 07:48

reporter   ~0043453

I am on rev. 28198
See my options in attachment. I never changed anything there.

2010-11-24 07:48


notebook0-opt.png (69,166 bytes)   
notebook0-opt.png (69,166 bytes)   

Martin Friebe

2010-11-24 16:41

manager   ~0043483

Last edited: 2010-11-25 16:36

@Denis: Yes then it's the ctrl-in-wrong-state click issue.

You can upgrade, and disable the ctrl-click completely. It's not a full solution, but will prevent the closing.

-- EDIT:
disable "close other tabs" if ctrl key is hold (or believed to be hold)
This will avoid the unwanted (and not undo-able) closing of many files.

As Graeme pointed out in the next note: navigations an other issue. But navigation can be undone, easier than closing a lot of tabs.

Graeme Geldenhuys

2010-11-25 07:31

reporter   ~0043503

I've been getting this bug for months too - and still in the latest revision. Also using the GTK2 widgetset. And yes, I previously tried to debug when the issue occurs, and indeed it seems to be the Ctrl key that gets stuck in the wrong state. A very annoying bug though.

Disabling the Ctrl+Click means you loose code-navigation as well. That is unfortunately not something I can live without.

After a while I learned to detected the screwed up Ctrl state issue. Simply move the mouse over your source code. The cursor will change to a pointing hand (active links like when you do code navigation). Simply press and release the Ctrl key, pointer new changes to a normal pointer. Then you can close a tab without all other tabs closing instead. Alternatively (to stop temptation), disable the "close button on tabs" and use the Ctrl+F4 shortcut to close a tab instead.
A work-around, but lets hope we don't have to live with this till v1.0 release of Lazarus. :)

Denis Golovan

2010-11-28 16:37

reporter   ~0043661

Yeap. Seems like disabling Ctrl+Middle-click on tab closes all others at least does not produce that annoying effect.
Thanks for hint.
Surely, it's not a full solution.

Martin Friebe

2010-12-20 12:59

manager   ~0044422

Please test and close if ok

Denis Golovan

2010-12-21 22:27

reporter   ~0044481

Looks like it works now. Thanks a lot!

Issue History

Date Modified Username Field Change
2010-11-23 21:26 Denis Golovan New Issue
2010-11-23 21:26 Denis Golovan Widgetset => GTK 2
2010-11-23 23:26 Vincent Snijders Note Added: 0043440
2010-11-23 23:27 Vincent Snijders LazTarget => -
2010-11-23 23:27 Vincent Snijders Note Added: 0043441
2010-11-23 23:27 Vincent Snijders Status new => feedback
2010-11-24 00:03 Martin Friebe Relationship added related to 0016165
2010-11-24 00:06 Denis Golovan Note Added: 0043443
2010-11-24 00:10 Martin Friebe Note Added: 0043444
2010-11-24 00:11 Martin Friebe Note Added: 0043447
2010-11-24 07:48 Denis Golovan Note Added: 0043453
2010-11-24 07:48 Denis Golovan File Added: notebook0-opt.png
2010-11-24 08:33 Vincent Snijders Status feedback => acknowledged
2010-11-24 08:34 Vincent Snijders LazTarget - => 1.0
2010-11-24 08:34 Vincent Snijders Target Version => 1.0.0
2010-11-24 16:41 Martin Friebe Note Added: 0043483
2010-11-25 07:31 Graeme Geldenhuys Note Added: 0043503
2010-11-25 16:36 Martin Friebe Note Edited: 0043483
2010-11-28 16:37 Denis Golovan Note Added: 0043661
2010-12-20 12:59 Martin Friebe Fixed in Revision => 28788
2010-12-20 12:59 Martin Friebe Status acknowledged => resolved
2010-12-20 12:59 Martin Friebe Fixed in Version => 0.9.29 (SVN)
2010-12-20 12:59 Martin Friebe Resolution open => fixed
2010-12-20 12:59 Martin Friebe Assigned To => Martin Friebe
2010-12-20 12:59 Martin Friebe Note Added: 0044422
2010-12-20 12:59 Martin Friebe Target Version 1.0.0 => 0.9.30
2010-12-21 22:27 Denis Golovan Status resolved => closed
2010-12-21 22:27 Denis Golovan Note Added: 0044481