A reactive notebook for Python — run reproducible experiments, query with SQL, execute as a script, deploy as an app, and version with git. Stored as pure Python. All in a modern, AI-native editor.
Python artificial-intelligencedagdata-sciencedata-visualizationdataflowdeveloper-toolsmachine-learningnotebookspipelinepythonreactivesqlweb-app
fix: maybe fixes cmd+click, remove all underlines (#1463)
Myles Scolnick949a5f776d90
diff --git a/frontend/src/core/codemirror/go-to-definition/underline.ts b/frontend/src/core/codemirror/go-to-definition/underline.tsindex 4256a5ce23..842ee42ade 100644--- a/frontend/src/core/codemirror/go-to-definition/underline.ts+++ b/frontend/src/core/codemirror/go-to-definition/underline.ts@@ -15,7 +15,7 @@ const underlineDecoration = Decoration.mark({ class: "underline" });// State Effectsconst addUnderline = StateEffect.define<{ from: number; to: number }>();-const removeUnderline = StateEffect.define<{ from: number; to: number }>();+const removeUnderlines = StateEffect.define();// Underline Fieldexport const underlineField = StateField.define<DecorationSet>({@@ -29,11 +29,8 @@ export const underlineField = StateField.define<DecorationSet>({newUnderlines = underlines.update({add: [underlineDecoration.range(effect.value.from, effect.value.to)],});- } else if (effect.is(removeUnderline)) {- newUnderlines = underlines.update({- filter: (from, to) =>- from !== effect.value.from || to !== effect.value.to,- });+ } else if (effect.is(removeUnderlines)) {+ newUnderlines = Decoration.none;}}return newUnderlines;@@ -111,7 +108,7 @@ class MetaUnderlineVariablePlugin {};private keydown = (event: KeyboardEvent) => {- if (event.key === "Meta") {+ if (event.key === "Meta" || event.key === "Ctrl") {this.commandKey = true;}};@@ -136,7 +133,7 @@ class MetaUnderlineVariablePlugin {};private keyup = (event: KeyboardEvent) => {- if (event.key === "Meta") {+ if (event.key === "Meta" || event.key === "Ctrl") {this.commandKey = false;this.clearUnderline();}@@ -144,7 +141,7 @@ class MetaUnderlineVariablePlugin {private clearUnderline() {if (this.hoveredRange) {- this.view.dispatch({ effects: removeUnderline.of(this.hoveredRange) });+ this.view.dispatch({ effects: removeUnderlines.of(null) });this.hoveredRange = null;}}