diff --git a/.github/workflows/codeql-analysis.yml b/.github/workflows/codeql-analysis.yml index 60d142c86e..d892bfbf93 100644 --- a/.github/workflows/codeql-analysis.yml +++ b/.github/workflows/codeql-analysis.yml @@ -23,7 +23,7 @@ on: jobs: analyze: name: Analyze - runs-on: ubuntu-latest + runs-on: ubuntu-22.04 permissions: actions: read contents: read diff --git a/.github/workflows/comment_pr.yml b/.github/workflows/comment_pr.yml index e029b35252..b2a059f507 100644 --- a/.github/workflows/comment_pr.yml +++ b/.github/workflows/comment_pr.yml @@ -9,7 +9,7 @@ on: jobs: one: - runs-on: ubuntu-latest + runs-on: ubuntu-22.04 strategy: matrix: python-version: [3.8] diff --git a/.github/workflows/create-deploy.yml b/.github/workflows/create-deploy.yml index a5af682b11..e38ec9cc2f 100644 --- a/.github/workflows/create-deploy.yml +++ b/.github/workflows/create-deploy.yml @@ -6,7 +6,7 @@ on: jobs: build-tasks: - runs-on: ubuntu-latest + runs-on: ubuntu-22.04 steps: - uses: actions/checkout@v3 - name: setup node diff --git a/.github/workflows/desktop-linux-prod-test-pull.yml b/.github/workflows/desktop-linux-prod-test-pull.yml index 5f2484a41e..b18755b96c 100644 --- a/.github/workflows/desktop-linux-prod-test-pull.yml +++ b/.github/workflows/desktop-linux-prod-test-pull.yml @@ -10,7 +10,7 @@ concurrency: jobs: test-desktop-linux-prod: - runs-on: ubuntu-latest + runs-on: ubuntu-22.04 timeout-minutes: 90 steps: - uses: actions/checkout@v3 diff --git a/.github/workflows/desktop-linux-test-pull.yml b/.github/workflows/desktop-linux-test-pull.yml index 9a2ca4c322..4e7efdb888 100644 --- a/.github/workflows/desktop-linux-test-pull.yml +++ b/.github/workflows/desktop-linux-test-pull.yml @@ -9,7 +9,7 @@ concurrency: jobs: test-desktop-linux: - runs-on: ubuntu-latest + runs-on: ubuntu-22.04 timeout-minutes: 90 steps: - uses: actions/checkout@v3 diff --git a/.github/workflows/dev-deploy.yml b/.github/workflows/dev-deploy.yml index 13cb4a6c03..39d30266b7 100644 --- a/.github/workflows/dev-deploy.yml +++ b/.github/workflows/dev-deploy.yml @@ -6,7 +6,7 @@ on: jobs: build-tasks: - runs-on: ubuntu-latest + runs-on: ubuntu-22.04 steps: - uses: actions/checkout@v3 - name: Npm Install diff --git a/.github/workflows/minor-version-bump.yml b/.github/workflows/minor-version-bump.yml index 4190204221..db2f0e11bd 100644 --- a/.github/workflows/minor-version-bump.yml +++ b/.github/workflows/minor-version-bump.yml @@ -6,7 +6,7 @@ on: jobs: build-tasks: - runs-on: ubuntu-latest + runs-on: ubuntu-22.04 steps: - name: setup node uses: actions/setup-node@v3 diff --git a/.github/workflows/patch-version-bump.yml b/.github/workflows/patch-version-bump.yml index f963730135..dbb600c0d4 100644 --- a/.github/workflows/patch-version-bump.yml +++ b/.github/workflows/patch-version-bump.yml @@ -6,7 +6,7 @@ on: jobs: build-tasks: - runs-on: ubuntu-latest + runs-on: ubuntu-22.04 steps: - name: setup node uses: actions/setup-node@v3 diff --git a/.github/workflows/playwright-chromium-linux.yml b/.github/workflows/playwright-chromium-linux.yml index 19ad63eb9a..d3cc937c75 100644 --- a/.github/workflows/playwright-chromium-linux.yml +++ b/.github/workflows/playwright-chromium-linux.yml @@ -10,7 +10,7 @@ concurrency: jobs: playwright-chromium-linux: timeout-minutes: 90 - runs-on: ubuntu-latest + runs-on: ubuntu-22.04 steps: - uses: actions/checkout@v3 - name: setup node diff --git a/.github/workflows/playwright-firefox-linux.yml b/.github/workflows/playwright-firefox-linux.yml index f0a306a97b..602da564bc 100644 --- a/.github/workflows/playwright-firefox-linux.yml +++ b/.github/workflows/playwright-firefox-linux.yml @@ -10,7 +10,7 @@ concurrency: jobs: playwright-firefox-linux: timeout-minutes: 90 - runs-on: ubuntu-latest + runs-on: ubuntu-22.04 steps: - uses: actions/checkout@v3 - name: setup node diff --git a/.github/workflows/playwright-staging-prod.yml b/.github/workflows/playwright-staging-prod.yml index 03c53f7614..1dd4436849 100644 --- a/.github/workflows/playwright-staging-prod.yml +++ b/.github/workflows/playwright-staging-prod.yml @@ -7,7 +7,7 @@ on: jobs: playwrightChromiumLinux: timeout-minutes: 90 - runs-on: ubuntu-latest + runs-on: ubuntu-22.04 steps: - uses: actions/checkout@v3 - name: setup node @@ -166,7 +166,7 @@ jobs: playwrightFirefoxLinux: timeout-minutes: 90 - runs-on: ubuntu-latest + runs-on: ubuntu-22.04 steps: - uses: actions/checkout@v3 - name: setup node diff --git a/.github/workflows/prod-deploy.yml b/.github/workflows/prod-deploy.yml index 5253b365a0..0c6ac530d2 100644 --- a/.github/workflows/prod-deploy.yml +++ b/.github/workflows/prod-deploy.yml @@ -6,7 +6,7 @@ on: jobs: build-tasks: - runs-on: ubuntu-latest + runs-on: ubuntu-22.04 steps: - uses: actions/checkout@v3 - name: setup node diff --git a/.github/workflows/pull_request_verify.yml b/.github/workflows/pull_request_verify.yml index a68a5f3d3c..d295ee8ae9 100644 --- a/.github/workflows/pull_request_verify.yml +++ b/.github/workflows/pull_request_verify.yml @@ -6,7 +6,7 @@ on: jobs: build-tasks: - runs-on: ubuntu-latest + runs-on: ubuntu-22.04 steps: - uses: actions/checkout@v3 - name: setup node diff --git a/.github/workflows/staging-deploy.yml b/.github/workflows/staging-deploy.yml index e1db1a41df..3ecd2f7c29 100644 --- a/.github/workflows/staging-deploy.yml +++ b/.github/workflows/staging-deploy.yml @@ -6,7 +6,7 @@ on: jobs: build-tasks: - runs-on: ubuntu-latest + runs-on: ubuntu-22.04 steps: - uses: actions/checkout@v3 - name: setup node diff --git a/.github/workflows/tauri-deploy.yml b/.github/workflows/tauri-deploy.yml index f01b1829c8..a0bdfc7be7 100644 --- a/.github/workflows/tauri-deploy.yml +++ b/.github/workflows/tauri-deploy.yml @@ -11,7 +11,7 @@ on: jobs: build-tasks: - runs-on: ubuntu-latest + runs-on: ubuntu-22.04 steps: - uses: actions/checkout@v3 - name: setup node diff --git a/.github/workflows/tranlate-languages.yml b/.github/workflows/tranlate-languages.yml index c63e20ae4f..5314c734af 100644 --- a/.github/workflows/tranlate-languages.yml +++ b/.github/workflows/tranlate-languages.yml @@ -6,7 +6,7 @@ on: jobs: build-tasks: - runs-on: ubuntu-latest + runs-on: ubuntu-22.04 steps: - uses: actions/checkout@v3 - name: Building phoenix diff --git a/.github/workflows/verify_cla_signature_pr.yml b/.github/workflows/verify_cla_signature_pr.yml index 1e0b06764f..eece406388 100644 --- a/.github/workflows/verify_cla_signature_pr.yml +++ b/.github/workflows/verify_cla_signature_pr.yml @@ -15,7 +15,7 @@ on: jobs: one: - runs-on: ubuntu-latest + runs-on: ubuntu-22.04 strategy: matrix: python-version: [3.8] diff --git a/.github/workflows/yearly-major-version-bump.yml b/.github/workflows/yearly-major-version-bump.yml index 115e39e405..669fdd418d 100644 --- a/.github/workflows/yearly-major-version-bump.yml +++ b/.github/workflows/yearly-major-version-bump.yml @@ -7,7 +7,7 @@ on: jobs: build-tasks: - runs-on: ubuntu-latest + runs-on: ubuntu-22.04 steps: - uses: actions/checkout@v3 with: diff --git a/src/extensionsIntegrated/CSSColorPreview/main.js b/src/extensionsIntegrated/CSSColorPreview/main.js index 0f774920f8..c7c033c5e9 100644 --- a/src/extensionsIntegrated/CSSColorPreview/main.js +++ b/src/extensionsIntegrated/CSSColorPreview/main.js @@ -122,7 +122,6 @@ define(function (require, exports, module) { */ function showGutters(editor, _results, update = false) { if (editor && enabled) { - const cm = editor._codeMirror; // if the file is updated we don't need to clear the gutter // as it will clear all the existing markers. if(!update) { @@ -132,9 +131,9 @@ define(function (require, exports, module) { // Only add markers if enabled if (enabled) { - cm.colorGutters = _.sortBy(_results, "lineNumber"); + const colorGutters = _.sortBy(_results, "lineNumber"); - cm.colorGutters.forEach(function (obj) { + colorGutters.forEach(function (obj) { let $marker; if (obj.colorValues.length === 1) { // Single color preview @@ -213,18 +212,10 @@ define(function (require, exports, module) { newEditor.on("cursorActivity.colorPreview", _cursorActivity); // Unbind the previous editor's change event if it exists if (oldEditor) { - const oldCM = oldEditor._codeMirror; - if (oldCM) { - oldCM.off("change", onChanged); - } - } - - // Bind change event to the new editor - const cm = newEditor._codeMirror; - if (cm) { - cm.on("change", onChanged); + oldEditor.off("change", onChanged); } - + newEditor.off("change", onChanged); + newEditor.on("change", onChanged); showColorMarks(); _cursorActivity(null, newEditor); } @@ -233,13 +224,11 @@ define(function (require, exports, module) { // Handle the currently active editor at initialization const activeEditor = EditorManager.getActiveEditor(); if (activeEditor) { - const cm = activeEditor._codeMirror; - if (cm) { - cm.on("change", onChanged); - } + activeEditor.off("change", onChanged); + activeEditor.on("change", onChanged); showColorMarks(); + _cursorActivity(null, activeEditor); } - } /**