We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 370f889 commit 3686922Copy full SHA for 3686922
packages/jupyterlab-lsp/src/features/syntax_highlighting.ts
@@ -75,7 +75,10 @@ export class CMSyntaxHighlighting extends CodeMirrorIntegration {
75
76
// change the mode if the majority of the code is the foreign code
77
if (coverage > this.settings.composite.foreignCodeThreshold) {
78
- editor.setOption('mode', mode.mime);
+ let old_mode = editor.getOption('mode');
79
+ if (old_mode != mode.mime) {
80
+ editor.setOption('mode', mode.mime);
81
+ }
82
}
83
84
0 commit comments