IntelliJ Idea keeps closing opened files


So I've done a bit of Google search, and couldn't find anything recent with this problem.

I downloaded IntelliJ IDEA 2017.1 and it keeps closing my opened tabs. This happens after running the code and sometimes it happens kind of randomly (when opening other files or folders for example).

I'd be happy if somebody knows what causes this.

Note: My PC is connected to Active Directory with roaming profiles, could that have something to do with it? Messed up settings? Folder structure?


Nope, unfortunately not. My limit is set to the default (10) and I don't use the recent file thingy.


With the default limit 10 IDE will close tabs when the limit is exceeded. Are you sure it's not the case?


Pretty sure, I tested it with a new project and creating a new file. Only opened that single file and it still happened. Also, pinning tabs doesn't seem to help anything either.


Try to keep all the project files and IDE files on the local drives, see


I'll try with a USB stick if I can find one, I'll update this comment later.

Edit: That seems to work, thanks!


This is also happening in my 2018.3.3 version of CLion.


Maybe you have preview editor tabs enabled.
Go to Settings > Editor > Editor Tabs


and under Opening policy disable 'Enable preview tab'


Please sign in to leave a comment.