You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Implement separate colors for primary and secondary cursors when multiple cursors are present (#181991)
* Add support for separate primary cursor color when multiple cursors are present
- Does not change the existing behavior when there's a single cursor. editorCursor.foreground and background are still used.
- Add editorCursor.multiple.primary.foreground and background theme colors for the primary cursor. Only used when multiple cursors exist. Fallback to editorCursor.foreground/background when theme colors aren't set.
- Add editorCursor.multiple.secondary.foreground and `background theme colors for non-primary cursors. Only used when multiple cursors exist. Fallback to editorCursor.foreground/background when theme colors aren't set.
Add cursor-primary and cursor-secondary html classes to target with cursor color styles. No new class is introduced in the single-cursor case.
- Currently does not affect overview ruler colors. editorCursor.foreground is still used, even when multiple cursors are present.
* Update overview ruler to use primary and secondary cursor colors
- This maintains the existing handling for colors being undefined. However, each of these colors have defaults do I'm not sure if it's actually possible for them to be undefined
* Fix formatting
* Fix compilation errors
* Fall back to the existing cursor colors (to avoid breaking existing themes)
---------
Co-authored-by: Alex Dima <alexdima@microsoft.com>
exportconsteditorCursorForeground=registerColor('editorCursor.foreground',{dark: '#AEAFAD',light: Color.black,hcDark: Color.white,hcLight: '#0F4A85'},nls.localize('caret','Color of the editor cursor.'));
22
22
exportconsteditorCursorBackground=registerColor('editorCursor.background',null,nls.localize('editorCursorBackground','The background color of the editor cursor. Allows customizing the color of a character overlapped by a block cursor.'));
23
+
exportconsteditorMultiCursorPrimaryForeground=registerColor('editorMultiCursor.primary.foreground',{dark: editorCursorForeground,light: editorCursorForeground,hcDark: editorCursorForeground,hcLight: editorCursorForeground},nls.localize('editorMultiCursorPrimaryForeground','Color of the primary editor cursor when multiple cursors are present.'));
24
+
exportconsteditorMultiCursorPrimaryBackground=registerColor('editorMultiCursor.primary.background',{dark: editorCursorBackground,light: editorCursorBackground,hcDark: editorCursorBackground,hcLight: editorCursorBackground},nls.localize('editorMultiCursorPrimaryBackground','The background color of the primary editor cursor when multiple cursors are present. Allows customizing the color of a character overlapped by a block cursor.'));
25
+
exportconsteditorMultiCursorSecondaryForeground=registerColor('editorMultiCursor.secondary.foreground',{dark: editorCursorForeground,light: editorCursorForeground,hcDark: editorCursorForeground,hcLight: editorCursorForeground},nls.localize('editorMultiCursorSecondaryForeground','Color of secondary editor cursors when multiple cursors are present.'));
26
+
exportconsteditorMultiCursorSecondaryBackground=registerColor('editorMultiCursor.secondary.background',{dark: editorCursorBackground,light: editorCursorBackground,hcDark: editorCursorBackground,hcLight: editorCursorBackground},nls.localize('editorMultiCursorSecondaryBackground','The background color of secondary editor cursors when multiple cursors are present. Allows customizing the color of a character overlapped by a block cursor.'));
23
27
exportconsteditorWhitespaces=registerColor('editorWhitespace.foreground',{dark: '#e3e4e229',light: '#33333333',hcDark: '#e3e4e229',hcLight: '#CCCCCC'},nls.localize('editorWhitespaces','Color of whitespace characters in the editor.'));
24
28
exportconsteditorLineNumbers=registerColor('editorLineNumber.foreground',{dark: '#858585',light: '#237893',hcDark: Color.white,hcLight: '#292929'},nls.localize('editorLineNumbers','Color of editor line numbers.'));
0 commit comments