thehogfather / brackets-code-folding

Code folding extension for brackets IDE
134 stars 42 forks source link

Folding triangles should be visible in host editor when focus is in inline editor #9

Closed njx closed 11 years ago

njx commented 11 years ago
  1. Install the brackets-code-folding extension
  2. File > Open Folder on brackets/test/smokes/citrus completed
  3. Open the index.html file - folding triangles appear
  4. Put the cursor inside the start tag <body>
  5. Cmd/Ctrl-E to open the inline editor

Actual result: The folding triangles in the full (outer) editor disappear. This is because the extension only shows folding triangles inside the active editor (which is now the inline editor). Expected result: Folding triangles should be shown in all editors, both full editors and inline editors.

njx commented 11 years ago

Note that in the current Brackets master (as of sprint 27), there are other bugs that show up after step 5--in particular, the code in the outer editor is cut off. That should be fixed when we land https://github.com/adobe/brackets/pull/4421.

Probably the best way for you to keep the folding triangles persistent is to simply not remove the folding gutter from the previous editor when you get activeEditorChange (and don't re-create the gutter if it already exists in the active editor). However, the problem is that there isn't currently a public way to iterate all open full editors, so if the user disables folding, there isn't a good way for you to remove all the gutters from the open editors. Please feel free to file a bug in Brackets if you need that API.

thehogfather commented 11 years ago

Noted. Although I think a good starting point would be rendering the folding triangles on the focusedEditor as opposed to masterEditor or currentFullEditor - which is what is currently happening.