- Fix the text-copy code to handle fullwidth characters. - Move the caret painting code to its own function.