Opened 12 years ago

Closed 10 years ago

#505 closed defect (fixed)

Text pasted into listener doesn't show up until next UI event

Reported by: rongarret Owned by: gb
Priority: normal Milestone:
Component: IDE Version: 1.3
Keywords: Cc:


Text pasted into a listener isn't drawn until after the next input event (i.e. after the next keystroke, mouse click, etc.)

Ironically, this bug only manifests itself when the cursor is at the end of the listener buffer when the paste occurs. My guess is that this is because the relocation of the cursor to the end of the buffer has the same effect as an input event in forcing a screen refresh.

Change History (2)

comment:1 Changed 12 years ago by gb

  • Owner set to gb
  • Status changed from new to assigned

Part of the reason that this is listener-specific is that listeners disable "background layout"; this was originally done to workaround a bug but is still done because it improves performance in some cases. ("background layout" is done - when it's enabled - when the event loop is idle; "layout" is the process of figuring out where glyphs go in the view. Display will force layout as needed, and things that generate lots of output (much of which just scrolls by) can be faster if the layout work is done on demand rather than when the event loop thinks that it has some free time.)

I made the #/paste method recalculate where the selection is and do other things that force redisplay in r12148 in the trunk, but it'd probably be better to do that in a more general way (so that other things - drag and drop and whatever else modifies the buffer without going through Hemlock command processing - also forces layout to occur.)

#/paste in a listener should work better in the trunk now.

comment:2 Changed 10 years ago by rme

  • Resolution set to fixed
  • Status changed from assigned to closed
Note: See TracTickets for help on using tickets.