CARVIEW |
Select Language
HTTP/2 302
date: Sat, 19 Jul 2025 10:50:09 GMT
content-type: text/html; charset=utf-8
content-length: 0
vary: X-PJAX, X-PJAX-Container, Turbo-Visit, Turbo-Frame, X-Requested-With,Accept-Encoding, Accept, X-Requested-With
location: https://gist.github.com/pamelafox/2705527
cache-control: no-cache
strict-transport-security: max-age=31536000; includeSubdomains; preload
x-frame-options: deny
x-content-type-options: nosniff
x-xss-protection: 0
referrer-policy: origin-when-cross-origin, strict-origin-when-cross-origin
content-security-policy: default-src 'none'; base-uri 'self'; child-src github.githubassets.com github.com/assets-cdn/worker/ github.com/assets/ gist.github.com/assets-cdn/worker/; connect-src 'self' uploads.github.com www.githubstatus.com collector.github.com raw.githubusercontent.com api.github.com github-cloud.s3.amazonaws.com github-production-repository-file-5c1aeb.s3.amazonaws.com github-production-upload-manifest-file-7fdce7.s3.amazonaws.com github-production-user-asset-6210df.s3.amazonaws.com *.rel.tunnels.api.visualstudio.com wss://*.rel.tunnels.api.visualstudio.com objects-origin.githubusercontent.com copilot-proxy.githubusercontent.com proxy.individual.githubcopilot.com proxy.business.githubcopilot.com proxy.enterprise.githubcopilot.com *.actions.githubusercontent.com wss://*.actions.githubusercontent.com productionresultssa0.blob.core.windows.net/ productionresultssa1.blob.core.windows.net/ productionresultssa2.blob.core.windows.net/ productionresultssa3.blob.core.windows.net/ productionresultssa4.blob.core.windows.net/ productionresultssa5.blob.core.windows.net/ productionresultssa6.blob.core.windows.net/ productionresultssa7.blob.core.windows.net/ productionresultssa8.blob.core.windows.net/ productionresultssa9.blob.core.windows.net/ productionresultssa10.blob.core.windows.net/ productionresultssa11.blob.core.windows.net/ productionresultssa12.blob.core.windows.net/ productionresultssa13.blob.core.windows.net/ productionresultssa14.blob.core.windows.net/ productionresultssa15.blob.core.windows.net/ productionresultssa16.blob.core.windows.net/ productionresultssa17.blob.core.windows.net/ productionresultssa18.blob.core.windows.net/ productionresultssa19.blob.core.windows.net/ github-production-repository-image-32fea6.s3.amazonaws.com github-production-release-asset-2e65be.s3.amazonaws.com insights.github.com wss://alive.github.com api.githubcopilot.com api.individual.githubcopilot.com api.business.githubcopilot.com api.enterprise.githubcopilot.com; font-src github.githubassets.com; form-action 'self' github.com gist.github.com copilot-workspace.githubnext.com objects-origin.githubusercontent.com; frame-ancestors 'none'; frame-src viewscreen.githubusercontent.com notebooks.githubusercontent.com; img-src 'self' data: blob: github.githubassets.com media.githubusercontent.com camo.githubusercontent.com identicons.github.com avatars.githubusercontent.com private-avatars.githubusercontent.com github-cloud.s3.amazonaws.com objects.githubusercontent.com release-assets.githubusercontent.com secured-user-images.githubusercontent.com/ user-images.githubusercontent.com/ private-user-images.githubusercontent.com opengraph.githubassets.com copilotprodattachments.blob.core.windows.net/github-production-copilot-attachments/ github-production-user-asset-6210df.s3.amazonaws.com customer-stories-feed.github.com spotlights-feed.github.com objects-origin.githubusercontent.com *.githubusercontent.com; manifest-src 'self'; media-src github.com user-images.githubusercontent.com/ secured-user-images.githubusercontent.com/ private-user-images.githubusercontent.com github-production-user-asset-6210df.s3.amazonaws.com gist.github.com; script-src github.githubassets.com; style-src 'unsafe-inline' github.githubassets.com; upgrade-insecure-requests; worker-src github.githubassets.com github.com/assets-cdn/worker/ github.com/assets/ gist.github.com/assets-cdn/worker/
server: github.com
set-cookie: _gh_sess=PvA1dfoHBK7Ni1p1y38Amh77UvMz0SRSZNbv4Lmiz4C6%2BxvAbeCpFd1ABTJ2hRyLwIrxxM9IMesk9oVU4BM8fNQKVBBSSFM91S1ts4ZNeVVmwaerk9HGH4BVUHY9rDlHgjW45hboGJLLnPpHcP41ylJEiJcJe0SoQ4BClRyHc9bS%2FZxqNyUABEuGr7TVGGvoWrSy4En6AMFDtKjk0A6WO%2BDZoS1xYYg%2FgTHQA0ji5gUtiW0uiaRCiPSXeatUp%2FZPsDvz8x9QAQ0ZaVWrqWT5pA%3D%3D--xweJ8zfiX4d7JsZ2--LcYeYmk7UzxtotgjuHDM1A%3D%3D; Path=/; HttpOnly; Secure; SameSite=Lax
set-cookie: _octo=GH1.1.369991300.1752922209; Path=/; Domain=github.com; Expires=Sun, 19 Jul 2026 10:50:09 GMT; Secure; SameSite=Lax
set-cookie: logged_in=no; Path=/; Domain=github.com; Expires=Sun, 19 Jul 2026 10:50:09 GMT; HttpOnly; Secure; SameSite=Lax
x-github-request-id: 9978:A43E1:68227A:89577F:687B7861
HTTP/2 200
date: Sat, 19 Jul 2025 10:50:09 GMT
content-type: text/html; charset=utf-8
vary: X-PJAX, X-PJAX-Container, Turbo-Visit, Turbo-Frame, X-Requested-With,Accept-Encoding, Accept, X-Requested-With
etag: W/"bf81ebbeb1b285980b9ceb52c2487060"
cache-control: max-age=0, private, must-revalidate
strict-transport-security: max-age=31536000; includeSubdomains; preload
x-frame-options: deny
x-content-type-options: nosniff
x-xss-protection: 0
referrer-policy: origin-when-cross-origin, strict-origin-when-cross-origin
content-security-policy: default-src 'none'; base-uri 'self'; child-src github.githubassets.com github.com/assets-cdn/worker/ github.com/assets/ gist.github.com/assets-cdn/worker/; connect-src 'self' uploads.github.com www.githubstatus.com collector.github.com raw.githubusercontent.com api.github.com github-cloud.s3.amazonaws.com github-production-repository-file-5c1aeb.s3.amazonaws.com github-production-upload-manifest-file-7fdce7.s3.amazonaws.com github-production-user-asset-6210df.s3.amazonaws.com *.rel.tunnels.api.visualstudio.com wss://*.rel.tunnels.api.visualstudio.com objects-origin.githubusercontent.com copilot-proxy.githubusercontent.com proxy.individual.githubcopilot.com proxy.business.githubcopilot.com proxy.enterprise.githubcopilot.com *.actions.githubusercontent.com wss://*.actions.githubusercontent.com productionresultssa0.blob.core.windows.net/ productionresultssa1.blob.core.windows.net/ productionresultssa2.blob.core.windows.net/ productionresultssa3.blob.core.windows.net/ productionresultssa4.blob.core.windows.net/ productionresultssa5.blob.core.windows.net/ productionresultssa6.blob.core.windows.net/ productionresultssa7.blob.core.windows.net/ productionresultssa8.blob.core.windows.net/ productionresultssa9.blob.core.windows.net/ productionresultssa10.blob.core.windows.net/ productionresultssa11.blob.core.windows.net/ productionresultssa12.blob.core.windows.net/ productionresultssa13.blob.core.windows.net/ productionresultssa14.blob.core.windows.net/ productionresultssa15.blob.core.windows.net/ productionresultssa16.blob.core.windows.net/ productionresultssa17.blob.core.windows.net/ productionresultssa18.blob.core.windows.net/ productionresultssa19.blob.core.windows.net/ github-production-repository-image-32fea6.s3.amazonaws.com github-production-release-asset-2e65be.s3.amazonaws.com insights.github.com wss://alive.github.com api.githubcopilot.com api.individual.githubcopilot.com api.business.githubcopilot.com api.enterprise.githubcopilot.com; font-src github.githubassets.com; form-action 'self' github.com gist.github.com copilot-workspace.githubnext.com objects-origin.githubusercontent.com; frame-ancestors 'none'; frame-src viewscreen.githubusercontent.com notebooks.githubusercontent.com; img-src 'self' data: blob: github.githubassets.com media.githubusercontent.com camo.githubusercontent.com identicons.github.com avatars.githubusercontent.com private-avatars.githubusercontent.com github-cloud.s3.amazonaws.com objects.githubusercontent.com release-assets.githubusercontent.com secured-user-images.githubusercontent.com/ user-images.githubusercontent.com/ private-user-images.githubusercontent.com opengraph.githubassets.com copilotprodattachments.blob.core.windows.net/github-production-copilot-attachments/ github-production-user-asset-6210df.s3.amazonaws.com customer-stories-feed.github.com spotlights-feed.github.com objects-origin.githubusercontent.com *.githubusercontent.com; manifest-src 'self'; media-src github.com user-images.githubusercontent.com/ secured-user-images.githubusercontent.com/ private-user-images.githubusercontent.com github-production-user-asset-6210df.s3.amazonaws.com gist.github.com; script-src github.githubassets.com; style-src 'unsafe-inline' github.githubassets.com; upgrade-insecure-requests; worker-src github.githubassets.com github.com/assets-cdn/worker/ github.com/assets/ gist.github.com/assets-cdn/worker/
server: github.com
content-encoding: gzip
accept-ranges: bytes
x-github-request-id: 9978:A43E1:6822A2:8957A9:687B7861
EditorManager + CommandManager · GitHub
Show Gist options
Save pamelafox/2705527 to your computer and use it in GitHub Desktop.
{{ message }}
Instantly share code, notes, and snippets.
Created
May 15, 2012 22:11
-
Star
0
(0)
You must be signed in to star a gist -
Fork
0
(0)
You must be signed in to fork a gist
-
Save pamelafox/2705527 to your computer and use it in GitHub Desktop.
EditorManager + CommandManager
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/src/brackets.js b/src/brackets.js | |
index 39e30b2..cb20367 100644 | |
--- a/src/brackets.js | |
+++ b/src/brackets.js | |
@@ -199,7 +199,8 @@ define(function (require, exports, module) { | |
//{"Ctrl-X": Commands.EDIT_CUT}, | |
//{"Ctrl-C": Commands.EDIT_COPY}, | |
//{"Ctrl-V": Commands.EDIT_PASTE}, | |
- | |
+ {"Ctrl-I": Commands.SHOW_OTHER_STUFF}, | |
+ | |
{"Ctrl-A": Commands.EDIT_SELECT_ALL}, | |
{"Ctrl-F": Commands.EDIT_FIND}, | |
{"Ctrl-Shift-F": Commands.EDIT_FIND_IN_FILES}, | |
diff --git a/src/command/Commands.js b/src/command/Commands.js | |
index a0aee81..fd36db3 100644 | |
--- a/src/command/Commands.js | |
+++ b/src/command/Commands.js | |
@@ -82,5 +82,6 @@ define(function (require, exports, module) { | |
exports.DEBUG_USE_TAB_CHARS = "debug.useTabChars"; | |
exports.HELP_ABOUT = "help.about"; | |
+ exports.SHOW_OTHER_STUFF = "extensions.other"; | |
}); | |
diff --git a/src/editor/EditorManager.js b/src/editor/EditorManager.js | |
index 4dfc87e..0698048 100644 | |
--- a/src/editor/EditorManager.js | |
+++ b/src/editor/EditorManager.js | |
@@ -133,18 +133,21 @@ define(function (require, exports, module) { | |
* @return {$.Promise} a promise that will be resolved when an InlineWidget | |
* is created or rejected when no inline editors are available. | |
*/ | |
- function _openInlineWidget(editor) { | |
+ function _openInlineWidget(editor, provider) { | |
// Run through inline-editor providers until one responds | |
var pos = editor.getCursorPos(), | |
inlinePromise, | |
i, | |
result = new $.Deferred(); | |
- for (i = 0; i < _inlineEditProviders.length && !inlinePromise; i++) { | |
- var provider = _inlineEditProviders[i]; | |
- inlinePromise = provider(editor, pos); | |
+ if (!provider) { | |
+ for (i = 0; i < _inlineEditProviders.length && !inlinePromise; i++) { | |
+ provider = _inlineEditProviders[i]; | |
+ } | |
} | |
- | |
+ console.log(provider); | |
+ inlinePromise = provider(editor, pos); | |
+ | |
// If one of them will provide a widget, show it inline once ready | |
if (inlinePromise) { | |
inlinePromise.done(function (inlineWidget) { | |
@@ -496,7 +499,7 @@ define(function (require, exports, module) { | |
/** | |
* Show Inline Editor command handler | |
*/ | |
- function _showInlineEditor() { | |
+ function _showInlineEditor(provider) { | |
if (_currentEditor) { | |
var inlineWidget = null, | |
result = getFocusedInlineWidget(); | |
@@ -510,13 +513,13 @@ define(function (require, exports, module) { | |
inlineWidget.close(); | |
} else { | |
// main editor has focus, so create an inline editor | |
- _openInlineWidget(_currentEditor); | |
+ _openInlineWidget(_currentEditor, provider); | |
} | |
} | |
} | |
- | |
+ | |
CommandManager.register(Commands.SHOW_INLINE_EDITOR, _showInlineEditor); | |
- | |
+ | |
// Initialize: register listeners | |
$(DocumentManager).on("currentDocumentChange", _onCurrentDocumentChange); | |
$(DocumentManager).on("workingSetRemove", _onWorkingSetRemove); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
You can’t perform that action at this time.