Fixes #140386: Use the configured cursor color as caret color in the input <textarea>

This commit is contained in:
Alex Dima 2022-02-18 09:25:15 +01:00
parent b76c5f7c8e
commit 8f607b695a
No known key found for this signature in database
GPG key ID: 39563C1504FDD0C9

View file

@ -374,6 +374,7 @@ registerThemingParticipant((theme, collector) => {
if (!caretBackground) {
caretBackground = caret.opposite();
}
collector.addRule(`.monaco-editor .inputarea.ime-input { caret-color: ${caret}; }`);
collector.addRule(`.monaco-editor .cursors-layer .cursor { background-color: ${caret}; border-color: ${caret}; color: ${caretBackground}; }`);
if (theme.type === 'hc') {
collector.addRule(`.monaco-editor .cursors-layer.has-selection .cursor { border-left: 1px solid ${caretBackground}; border-right: 1px solid ${caretBackground}; }`);