CodeEditorView
CodeEditorView copied to clipboard
Initial drawing and drawing during resizing of background highlights
- [x] When a highlighting background of a notification is initially drawn, it immediately gets removed again (drawn over again).
- [ ] When resizing a window, background highlights (associated with message views, but also the current line highlight) flicker and sometimes the current line highlight is missing in the code view (it is fine in the gutter). It seems that
CodeView.drawBackground(in:)sometimes get's called in a way/context, where the computation ofcharRangefrom therectresults in a zero range although therectencompasses the entire visible part of the view. (Is the layout information maybe not up to date?)- [x] One problem is that the gutter drawing gets delayed when the text layout hasn't finished — and then it get's delayed too long. See
GutterView.draw(rect:). Maybe we can improve the timing by using the layout methods of theNSLayoutManagerDelegate. - [ ] The other problem is that the view layout computed by
CodeView.tile()leads to erratic changes during resizing.
- [x] One problem is that the gutter drawing gets delayed when the text layout hasn't finished — and then it get's delayed too long. See
- [x] When a window is not immediately becoming main, the current line highlight doesn't drawn before the selection moves (or it gets drawn and removed straight away).
We leave the remaining infelicity for later.