mirror of
https://github.com/laurent22/joplin.git
synced 2024-11-30 08:26:59 +02:00
Also ensure that highlight marks are shown above inline code
This commit is contained in:
parent
84d95c6dcb
commit
e3bd24f819
@ -381,6 +381,9 @@ function CodeMirror(props: NoteBodyEditorProps, ref: any) {
|
||||
`.CodeMirror-selected {
|
||||
background: #6b6b6b !important;
|
||||
}` : '';
|
||||
// Vim mode draws a fat cursor in the background, we don't want to add background colors
|
||||
// to the inline code in this case (it would hide the cursor)
|
||||
const codeBackgroundColor = Setting.value('editor.keyboardMode') !== 'vim' ? theme.codeBackgroundColor : 'inherit';
|
||||
const monospaceFonts = [];
|
||||
if (Setting.value('style.editor.monospaceFontFamily')) monospaceFonts.push(`"${Setting.value('style.editor.monospaceFontFamily')}"`);
|
||||
monospaceFonts.push('monospace');
|
||||
@ -476,9 +479,9 @@ function CodeMirror(props: NoteBodyEditorProps, ref: any) {
|
||||
}
|
||||
|
||||
/* Negative margins are needed to componsate for the border */
|
||||
div.CodeMirror span.cm-comment.cm-jn-inline-code {
|
||||
div.CodeMirror span.cm-comment.cm-jn-inline-code:not(.cm-search-marker):not(.cm-fat-cursor-mark):not(.cm-search-marker-selected):not(.CodeMirror-selectedtext) {
|
||||
border: 1px solid ${theme.codeBorderColor};
|
||||
background-color: ${theme.codeBackgroundColor};
|
||||
background-color: ${codeBackgroundColor};
|
||||
margin-left: -1px;
|
||||
margin-right: -1px;
|
||||
border-radius: .25em;
|
||||
|
Loading…
Reference in New Issue
Block a user