Custom view for the minimap #92
Labels
advanced
Larger effort with open questions
architecture
Requires changes that affect the general architecture
performance
Profiling and performance debugging
The current setup for the minimap (where the minimap is a separate text view using a smaller font, but sharing an
NSTextStorage
with the main code view) has the inherent disadvantage that layout happens twice. This implies twice the work (where layout is the main performance bottleneck already anyway) and it means that we need to carefully set things up, such that the two layouts coincide (especially wrt to line breaks), which turns out to be a rather fragile affair.A better code architecture would share the layout of the code view with the minimap. This requires the minimap to use a custom view (instead of being a subclass of
{NS|UI}TextView
). To this end, we need to do the following:CodeView
needs to use customNSTextLineFragment
s that have a seconddraw
method for drawing to the minimap.Two challenges are the following:
{NS|UI}TextView
set up (judging from earlier experiments, where it seemed to use some undocumented functionality), but that is necessary as the view port needs to include the entire region displayed by the minimap and not only the portion visible in the code view.The text was updated successfully, but these errors were encountered: