ninja-ide/ninja-ide — pull request #1272 by nelsam (2013-06-25 21:43:42+00:00)
Title: Check for _mini

I recently started working on a couple of projects written in Go and didn't feel like getting a new editor to work with them - so I just created the project in ninja-ide. Because Go recommends the use of tabs in its syntax guide, I set the properties of the new project to use tabs.

After I set the project to use tabs, I noticed that it was refusing to open any new files, so I turned on debugging and traced it down to gui.editor.Editor.set_tab_usage. The statement "if self._mini" was assuming that the attribute "_mini" exists, but it doesn't when opening new files. So I just set it to check for _mini with hasattr before checking to see if it evaluates to True.