CodeEditorView icon indicating copy to clipboard operation
CodeEditorView copied to clipboard

Initial drawing and drawing during resizing of background highlights

Open mchakravarty opened this issue 4 years ago • 1 comments

  • [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 of charRange from the rect results in a zero range although the rect encompasses 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 the NSLayoutManagerDelegate.
    • [ ] The other problem is that the view layout computed by CodeView.tile() leads to erratic changes during resizing.
  • [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).

mchakravarty avatar May 01 '21 15:05 mchakravarty

We leave the remaining infelicity for later.

mchakravarty avatar May 09 '21 15:05 mchakravarty