News for hackers. Stuff that matters.
Re:VS Code uses 13% CPU when idle due to blinking cursor ren... by biggiesmalls on Thursday March 23, 2017 @07:20PM (#13945253)
>> text editors built on the web stack cannot rely on the OS text caret

Can you explain in simple terms why this is the case? Why on earth not?

Re:VS Code uses 13% CPU when idle due to blinking cursor ren... by Sharlin on Friday March 24, 2017 @02:25AM (#13947080)
Because you can't just ask the OS to "please paint text caret here thankyou", and browsers do not expose a powerful enough native text editing control. So you end up reimplementing one in JS/HTML/CSS, including the caret.
Re:VS Code uses 13% CPU when idle due to blinking cursor ren... by heinrich5991 on Sunday March 26, 2017 @07:54PM (#13964111)
The WinAPI function SetCaretPos seems to do that: https://msdn.microsoft.com/en-us/library/windows/desktop/ms6...
Re:VS Code uses 13% CPU when idle due to blinking cursor ren... by prafuitu on Thursday April 06, 2017 @08:02AM (#14049771)
Well, because, in order to satisfy the most finicky of its users (myself included), VS Code offers no less than 6 styles for its cursor ('block', 'block-outline', 'line', 'line-thin', 'underline' and 'underline-thin') and 5 animations ('blink', 'smooth', 'phase', 'expand' and 'solid'). Also, in a future release the themes will be allowed to change the color of the cursor to any of the 16,581,375 colors in the RGB spectrum.

Does that answer your question? :)