Feature #2042 2006-03-25 20:40

florianx

Saving the editors font size / zoom

It's very annoying to set set the font size/zoom of the editor each time I open a file. It would be great, If the zoom is forced to be the same in all opened files and if this size would be saved when closing cb and restored the next time.

Category
Interface
Status
Closed
Close date
2006-04-22 15:52
Assigned to
 
dermeister 2006-03-29 10:59

This already works in the current svn versions. Maybe you are still using RC2?

thomasdenk 2006-04-22 15:52

The zoom was not being saved (insofar, Florian was right). Actually, you could go as far as saying this was a bug, since you would normally expect that to happen.

Revision 2369 saves and restores zoom. It does not, however, notify already open editors.

This is because of wxScintilla's design, which uses events in a quite unreasonable way (IMO). If you try to *set* the zoom in another editor when receiving an event, you overflow the event queue in an infinite loop because wxScintilla answers that by sending you another event...

As a workaround (to make it work at all), editors poll the currently valid zoom when being created from EditorManager and update that value when the user zooms. Unluckily, we don't have an "editor pane activated" notification (or do we?), so we can't easily update the other open editors. One solution that would work would be to poll from inside OnUpdateUI, but that would be very inefficient, as this function is called *many* times.