monaco-editor-core 0.55.0-dev-20251020 → 0.55.0-dev-20251022

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (210) hide show
  1. package/esm/nls.keys.json +1 -1
  2. package/esm/nls.messages.cs.js +2 -2
  3. package/esm/nls.messages.de.js +2 -2
  4. package/esm/nls.messages.es.js +2 -2
  5. package/esm/nls.messages.fr.js +2 -2
  6. package/esm/nls.messages.it.js +2 -2
  7. package/esm/nls.messages.ja.js +2 -2
  8. package/esm/nls.messages.js +1 -1
  9. package/esm/nls.messages.json +1 -1
  10. package/esm/nls.messages.ko.js +2 -2
  11. package/esm/nls.messages.pl.js +2 -2
  12. package/esm/nls.messages.pt-br.js +2 -2
  13. package/esm/nls.messages.ru.js +2 -2
  14. package/esm/nls.messages.tr.js +2 -2
  15. package/esm/nls.messages.zh-cn.js +2 -2
  16. package/esm/nls.messages.zh-tw.js +2 -2
  17. package/esm/nls.metadata.json +17 -5
  18. package/esm/vs/base/browser/ui/codicons/codicon/codicon.ttf +0 -0
  19. package/esm/vs/base/browser/ui/iconLabel/iconlabel.css +2 -3
  20. package/esm/vs/base/common/actions.js +5 -0
  21. package/esm/vs/base/common/actions.js.map +1 -1
  22. package/esm/vs/base/common/async.js +5 -5
  23. package/esm/vs/base/common/async.js.map +1 -1
  24. package/esm/vs/base/common/codiconsLibrary.js +1 -0
  25. package/esm/vs/base/common/codiconsLibrary.js.map +1 -1
  26. package/esm/vs/base/common/policy.js +40 -1
  27. package/esm/vs/base/common/policy.js.map +1 -1
  28. package/esm/vs/editor/browser/controller/editContext/native/nativeEditContext.js +20 -12
  29. package/esm/vs/editor/browser/controller/editContext/native/nativeEditContext.js.map +1 -1
  30. package/esm/vs/editor/browser/controller/editContext/native/screenReaderSupport.js +1 -1
  31. package/esm/vs/editor/browser/controller/editContext/screenReaderUtils.js +4 -4
  32. package/esm/vs/editor/browser/controller/editContext/textArea/textAreaEditContext.js +1 -1
  33. package/esm/vs/editor/browser/coreCommands.js +3 -3
  34. package/esm/vs/editor/browser/editorExtensions.js +9 -9
  35. package/esm/vs/editor/browser/gpu/viewGpuContext.js +1 -1
  36. package/esm/vs/editor/browser/services/hoverService/hoverWidget.js +1 -3
  37. package/esm/vs/editor/browser/services/hoverService/hoverWidget.js.map +1 -1
  38. package/esm/vs/editor/browser/services/hoverService/updatableHoverWidget.js +1 -1
  39. package/esm/vs/editor/browser/services/inlineCompletionsService.js +4 -4
  40. package/esm/vs/editor/browser/services/inlineCompletionsService.js.map +1 -1
  41. package/esm/vs/editor/browser/widget/codeEditor/codeEditorWidget.js +2 -2
  42. package/esm/vs/editor/browser/widget/diffEditor/commands.js +12 -12
  43. package/esm/vs/editor/browser/widget/diffEditor/components/accessibleDiffViewer.js +14 -14
  44. package/esm/vs/editor/browser/widget/diffEditor/components/accessibleDiffViewer.js.map +1 -1
  45. package/esm/vs/editor/browser/widget/diffEditor/components/diffEditorEditors.js +1 -1
  46. package/esm/vs/editor/browser/widget/diffEditor/components/diffEditorViewZones/copySelection.js +1 -1
  47. package/esm/vs/editor/browser/widget/diffEditor/components/diffEditorViewZones/inlineDiffDeletedCodeMargin.js +7 -7
  48. package/esm/vs/editor/browser/widget/diffEditor/diffEditor.contribution.js +5 -5
  49. package/esm/vs/editor/browser/widget/diffEditor/diffEditorWidget.js +6 -0
  50. package/esm/vs/editor/browser/widget/diffEditor/diffEditorWidget.js.map +1 -1
  51. package/esm/vs/editor/browser/widget/diffEditor/features/hideUnchangedRegionsFeature.js +7 -7
  52. package/esm/vs/editor/browser/widget/diffEditor/features/movedBlocksLinesFeature.js +2 -2
  53. package/esm/vs/editor/browser/widget/diffEditor/features/revertButtonsFeature.js +2 -2
  54. package/esm/vs/editor/browser/widget/diffEditor/registrations.contribution.js +5 -5
  55. package/esm/vs/editor/browser/widget/multiDiffEditor/colors.js +3 -3
  56. package/esm/vs/editor/browser/widget/multiDiffEditor/diffEditorItemTemplate.js +1 -0
  57. package/esm/vs/editor/browser/widget/multiDiffEditor/diffEditorItemTemplate.js.map +1 -1
  58. package/esm/vs/editor/browser/widget/multiDiffEditor/multiDiffEditorWidgetImpl.js +2 -2
  59. package/esm/vs/editor/common/config/editorConfigurationSchema.js +54 -54
  60. package/esm/vs/editor/common/config/editorOptions.js +406 -406
  61. package/esm/vs/editor/common/core/editorColorRegistry.js +68 -68
  62. package/esm/vs/editor/common/editorContextKeys.js +46 -46
  63. package/esm/vs/editor/common/languages/modesRegistry.js +1 -1
  64. package/esm/vs/editor/common/languages.js +56 -56
  65. package/esm/vs/editor/common/model/editStack.js +1 -1
  66. package/esm/vs/editor/common/standaloneStrings.js +10 -10
  67. package/esm/vs/editor/common/viewLayout/viewLineRenderer.js +2 -2
  68. package/esm/vs/editor/contrib/anchorSelect/browser/anchorSelect.js +6 -6
  69. package/esm/vs/editor/contrib/bracketMatching/browser/bracketMatching.js +6 -6
  70. package/esm/vs/editor/contrib/caretOperations/browser/caretOperations.js +2 -2
  71. package/esm/vs/editor/contrib/caretOperations/browser/transpose.js +1 -1
  72. package/esm/vs/editor/contrib/clipboard/browser/clipboard.js +17 -17
  73. package/esm/vs/editor/contrib/codeAction/browser/codeAction.js +1 -1
  74. package/esm/vs/editor/contrib/codeAction/browser/codeActionCommands.js +29 -29
  75. package/esm/vs/editor/contrib/codeAction/browser/codeActionContributions.js +3 -3
  76. package/esm/vs/editor/contrib/codeAction/browser/codeActionController.js +3 -3
  77. package/esm/vs/editor/contrib/codeAction/browser/codeActionMenu.js +8 -8
  78. package/esm/vs/editor/contrib/codeAction/browser/lightBulbWidget.js +9 -9
  79. package/esm/vs/editor/contrib/codelens/browser/codelensController.js +2 -2
  80. package/esm/vs/editor/contrib/colorPicker/browser/colorPickerParts/colorPickerCloseButton.js +1 -1
  81. package/esm/vs/editor/contrib/colorPicker/browser/colorPickerParts/colorPickerHeader.js +1 -1
  82. package/esm/vs/editor/contrib/colorPicker/browser/standaloneColorPicker/standaloneColorPickerActions.js +7 -7
  83. package/esm/vs/editor/contrib/comment/browser/comment.js +6 -6
  84. package/esm/vs/editor/contrib/contextmenu/browser/contextmenu.js +10 -10
  85. package/esm/vs/editor/contrib/cursorUndo/browser/cursorUndo.js +2 -2
  86. package/esm/vs/editor/contrib/dropOrPasteInto/browser/copyPasteContribution.js +4 -4
  87. package/esm/vs/editor/contrib/dropOrPasteInto/browser/copyPasteController.js +9 -9
  88. package/esm/vs/editor/contrib/dropOrPasteInto/browser/defaultProviders.js +8 -8
  89. package/esm/vs/editor/contrib/dropOrPasteInto/browser/dropIntoEditorController.js +3 -3
  90. package/esm/vs/editor/contrib/dropOrPasteInto/browser/postEditWidget.js +2 -2
  91. package/esm/vs/editor/contrib/editorState/browser/keybindingCancellation.js +1 -1
  92. package/esm/vs/editor/contrib/find/browser/findController.js +16 -16
  93. package/esm/vs/editor/contrib/find/browser/findWidget.js +26 -26
  94. package/esm/vs/editor/contrib/folding/browser/folding.js +20 -20
  95. package/esm/vs/editor/contrib/folding/browser/folding.js.map +1 -1
  96. package/esm/vs/editor/contrib/folding/browser/foldingDecorations.js +9 -9
  97. package/esm/vs/editor/contrib/folding/browser/foldingDecorations.js.map +1 -1
  98. package/esm/vs/editor/contrib/fontZoom/browser/fontZoom.js +3 -3
  99. package/esm/vs/editor/contrib/format/browser/formatActions.js +2 -2
  100. package/esm/vs/editor/contrib/gotoError/browser/gotoError.js +8 -8
  101. package/esm/vs/editor/contrib/gotoError/browser/gotoErrorWidget.js +14 -14
  102. package/esm/vs/editor/contrib/gotoSymbol/browser/goToCommands.js +39 -39
  103. package/esm/vs/editor/contrib/gotoSymbol/browser/link/goToDefinitionAtPosition.js +1 -1
  104. package/esm/vs/editor/contrib/gotoSymbol/browser/peek/referencesController.js +3 -3
  105. package/esm/vs/editor/contrib/gotoSymbol/browser/peek/referencesTree.js +3 -3
  106. package/esm/vs/editor/contrib/gotoSymbol/browser/peek/referencesWidget.js +3 -3
  107. package/esm/vs/editor/contrib/gotoSymbol/browser/referencesModel.js +8 -8
  108. package/esm/vs/editor/contrib/gotoSymbol/browser/symbolNavigation.js +3 -3
  109. package/esm/vs/editor/contrib/gpu/browser/gpuActions.js +4 -4
  110. package/esm/vs/editor/contrib/hover/browser/glyphHoverWidget.js +22 -2
  111. package/esm/vs/editor/contrib/hover/browser/glyphHoverWidget.js.map +1 -1
  112. package/esm/vs/editor/contrib/hover/browser/hoverActionIds.js +2 -2
  113. package/esm/vs/editor/contrib/hover/browser/hoverActions.js +24 -24
  114. package/esm/vs/editor/contrib/hover/browser/markdownHoverParticipant.js +9 -9
  115. package/esm/vs/editor/contrib/hover/browser/markerHoverParticipant.js +5 -5
  116. package/esm/vs/editor/contrib/inPlaceReplace/browser/inPlaceReplace.js +2 -2
  117. package/esm/vs/editor/contrib/indentation/browser/indentation.js +20 -20
  118. package/esm/vs/editor/contrib/inlayHints/browser/inlayHintsHover.js +8 -8
  119. package/esm/vs/editor/contrib/inlineCompletions/browser/controller/commands.js +18 -51
  120. package/esm/vs/editor/contrib/inlineCompletions/browser/controller/commands.js.map +1 -1
  121. package/esm/vs/editor/contrib/inlineCompletions/browser/controller/inlineCompletionContextKeys.js +12 -12
  122. package/esm/vs/editor/contrib/inlineCompletions/browser/controller/inlineCompletionsController.js +1 -1
  123. package/esm/vs/editor/contrib/inlineCompletions/browser/hintsWidget/hoverParticipant.js +1 -1
  124. package/esm/vs/editor/contrib/inlineCompletions/browser/hintsWidget/inlineCompletionsHintsWidget.js +5 -5
  125. package/esm/vs/editor/contrib/inlineCompletions/browser/inlineCompletions.contribution.js +2 -4
  126. package/esm/vs/editor/contrib/inlineCompletions/browser/inlineCompletions.contribution.js.map +1 -1
  127. package/esm/vs/editor/contrib/inlineCompletions/browser/model/inlineCompletionsSource.js +0 -1
  128. package/esm/vs/editor/contrib/inlineCompletions/browser/model/inlineCompletionsSource.js.map +1 -1
  129. package/esm/vs/editor/contrib/inlineCompletions/browser/telemetry.js.map +1 -1
  130. package/esm/vs/editor/contrib/inlineCompletions/browser/view/inlineEdits/components/gutterIndicatorMenu.js +6 -6
  131. package/esm/vs/editor/contrib/inlineCompletions/browser/view/inlineEdits/inlineEditsModel.js +1 -1
  132. package/esm/vs/editor/contrib/inlineCompletions/browser/view/inlineEdits/theme.js +20 -20
  133. package/esm/vs/editor/contrib/insertFinalNewLine/browser/insertFinalNewLine.js +1 -1
  134. package/esm/vs/editor/contrib/lineSelection/browser/lineSelection.js +1 -1
  135. package/esm/vs/editor/contrib/linesOperations/browser/linesOperations.js +31 -31
  136. package/esm/vs/editor/contrib/linkedEditing/browser/linkedEditing.js +2 -2
  137. package/esm/vs/editor/contrib/links/browser/links.js +10 -10
  138. package/esm/vs/editor/contrib/message/browser/messageController.js +1 -1
  139. package/esm/vs/editor/contrib/multicursor/browser/multicursor.js +22 -22
  140. package/esm/vs/editor/contrib/parameterHints/browser/parameterHints.js +1 -1
  141. package/esm/vs/editor/contrib/parameterHints/browser/parameterHintsWidget.js +4 -4
  142. package/esm/vs/editor/contrib/peekView/browser/peekView.js +18 -18
  143. package/esm/vs/editor/contrib/placeholderText/browser/placeholderText.contribution.js +1 -1
  144. package/esm/vs/editor/contrib/quickAccess/browser/gotoLineQuickAccess.js +35 -28
  145. package/esm/vs/editor/contrib/quickAccess/browser/gotoLineQuickAccess.js.map +1 -1
  146. package/esm/vs/editor/contrib/quickAccess/browser/gotoSymbolQuickAccess.js +32 -32
  147. package/esm/vs/editor/contrib/readOnlyMessage/browser/contribution.js +2 -2
  148. package/esm/vs/editor/contrib/rename/browser/rename.js +11 -11
  149. package/esm/vs/editor/contrib/rename/browser/renameWidget.js +8 -11
  150. package/esm/vs/editor/contrib/rename/browser/renameWidget.js.map +1 -1
  151. package/esm/vs/editor/contrib/smartSelect/browser/smartSelect.js +4 -4
  152. package/esm/vs/editor/contrib/snippet/browser/snippetController2.js +4 -4
  153. package/esm/vs/editor/contrib/snippet/browser/snippetVariables.js +4 -4
  154. package/esm/vs/editor/contrib/stickyScroll/browser/stickyScrollActions.js +11 -11
  155. package/esm/vs/editor/contrib/suggest/browser/suggest.js +8 -8
  156. package/esm/vs/editor/contrib/suggest/browser/suggestController.js +10 -10
  157. package/esm/vs/editor/contrib/suggest/browser/suggestWidget.js +17 -17
  158. package/esm/vs/editor/contrib/suggest/browser/suggestWidgetDetails.js +2 -2
  159. package/esm/vs/editor/contrib/suggest/browser/suggestWidgetRenderer.js +2 -2
  160. package/esm/vs/editor/contrib/suggest/browser/wordContextKey.js +1 -1
  161. package/esm/vs/editor/contrib/symbolIcons/browser/symbolIcons.js +33 -33
  162. package/esm/vs/editor/contrib/toggleTabFocusMode/browser/toggleTabFocusMode.js +4 -4
  163. package/esm/vs/editor/contrib/tokenization/browser/tokenization.js +1 -1
  164. package/esm/vs/editor/contrib/unicodeHighlighter/browser/bannerController.js +1 -1
  165. package/esm/vs/editor/contrib/unicodeHighlighter/browser/unicodeHighlighter.js +24 -24
  166. package/esm/vs/editor/contrib/unusualLineTerminators/browser/unusualLineTerminators.js +5 -5
  167. package/esm/vs/editor/contrib/wordHighlighter/browser/highlightDecorations.js +9 -9
  168. package/esm/vs/editor/contrib/wordHighlighter/browser/wordHighlighter.js +3 -3
  169. package/esm/vs/editor/contrib/wordOperations/browser/wordOperations.js +1 -1
  170. package/esm/vs/platform/accessibilitySignal/browser/accessibilitySignalService.js +62 -62
  171. package/esm/vs/platform/action/common/actionCommonCategories.js +6 -6
  172. package/esm/vs/platform/actionWidget/browser/actionList.js +4 -4
  173. package/esm/vs/platform/actionWidget/browser/actionWidget.js +7 -7
  174. package/esm/vs/platform/actions/browser/menuEntryActionViewItem.js +5 -5
  175. package/esm/vs/platform/actions/browser/toolbar.js +2 -2
  176. package/esm/vs/platform/actions/common/menuService.js +2 -2
  177. package/esm/vs/platform/configuration/common/configurationRegistry.js +10 -10
  178. package/esm/vs/platform/contextkey/browser/contextKeyService.js +1 -1
  179. package/esm/vs/platform/contextkey/common/contextkey.js +9 -9
  180. package/esm/vs/platform/contextkey/common/contextkeys.js +9 -9
  181. package/esm/vs/platform/contextkey/common/scanner.js +5 -5
  182. package/esm/vs/platform/history/browser/contextScopedHistoryWidget.js +1 -1
  183. package/esm/vs/platform/keybinding/common/abstractKeybindingService.js +4 -4
  184. package/esm/vs/platform/list/browser/listService.js +27 -27
  185. package/esm/vs/platform/markers/common/markerService.js +2 -2
  186. package/esm/vs/platform/markers/common/markers.js +6 -6
  187. package/esm/vs/platform/quickinput/browser/commandsQuickAccess.js +7 -7
  188. package/esm/vs/platform/quickinput/browser/helpQuickAccess.js +1 -1
  189. package/esm/vs/platform/quickinput/browser/quickInput.js +10 -10
  190. package/esm/vs/platform/quickinput/browser/quickInputActions.js +5 -5
  191. package/esm/vs/platform/quickinput/browser/quickInputController.js +6 -6
  192. package/esm/vs/platform/quickinput/browser/quickInputList.js +1 -1
  193. package/esm/vs/platform/quickinput/browser/quickInputUtils.js +1 -1
  194. package/esm/vs/platform/quickinput/browser/tree/quickInputTreeAccessibilityProvider.js +1 -1
  195. package/esm/vs/platform/theme/common/colorUtils.js +2 -2
  196. package/esm/vs/platform/theme/common/colors/baseColors.js +17 -17
  197. package/esm/vs/platform/theme/common/colors/chartsColors.js +8 -8
  198. package/esm/vs/platform/theme/common/colors/editorColors.js +95 -95
  199. package/esm/vs/platform/theme/common/colors/inputColors.js +47 -47
  200. package/esm/vs/platform/theme/common/colors/listColors.js +36 -36
  201. package/esm/vs/platform/theme/common/colors/menuColors.js +7 -7
  202. package/esm/vs/platform/theme/common/colors/minimapColors.js +11 -11
  203. package/esm/vs/platform/theme/common/colors/miscColors.js +15 -15
  204. package/esm/vs/platform/theme/common/colors/quickpickColors.js +9 -9
  205. package/esm/vs/platform/theme/common/colors/searchColors.js +3 -3
  206. package/esm/vs/platform/theme/common/iconRegistry.js +6 -6
  207. package/esm/vs/platform/undoRedo/common/undoRedoService.js +20 -20
  208. package/esm/vs/platform/workspace/common/workspace.js +1 -1
  209. package/package.json +2 -2
  210. package/version.txt +1 -1
@@ -32,10 +32,10 @@ export class OneReference {
32
32
  get ariaMessage() {
33
33
  const preview = this.parent.getPreview(this)?.preview(this.range);
34
34
  if (!preview) {
35
- return localize(1083, "in {0} on line {1} at column {2}", basename(this.uri), this.range.startLineNumber, this.range.startColumn);
35
+ return localize(1088, "in {0} on line {1} at column {2}", basename(this.uri), this.range.startLineNumber, this.range.startColumn);
36
36
  }
37
37
  else {
38
- return localize(1084, "{0} in {1} on line {2} at column {3}", preview.value, basename(this.uri), this.range.startLineNumber, this.range.startColumn);
38
+ return localize(1089, "{0} in {1} on line {2} at column {3}", preview.value, basename(this.uri), this.range.startLineNumber, this.range.startColumn);
39
39
  }
40
40
  }
41
41
  }
@@ -81,10 +81,10 @@ export class FileReferences {
81
81
  get ariaMessage() {
82
82
  const len = this.children.length;
83
83
  if (len === 1) {
84
- return localize(1085, "1 symbol in {0}, full path {1}", basename(this.uri), this.uri.fsPath);
84
+ return localize(1090, "1 symbol in {0}, full path {1}", basename(this.uri), this.uri.fsPath);
85
85
  }
86
86
  else {
87
- return localize(1086, "{0} symbols in {1}, full path {2}", len, basename(this.uri), this.uri.fsPath);
87
+ return localize(1091, "{0} symbols in {1}, full path {2}", len, basename(this.uri), this.uri.fsPath);
88
88
  }
89
89
  }
90
90
  async resolve(textModelResolverService) {
@@ -148,16 +148,16 @@ export class ReferencesModel {
148
148
  }
149
149
  get ariaMessage() {
150
150
  if (this.isEmpty) {
151
- return localize(1087, "No results found");
151
+ return localize(1092, "No results found");
152
152
  }
153
153
  else if (this.references.length === 1) {
154
- return localize(1088, "Found 1 symbol in {0}", this.references[0].uri.fsPath);
154
+ return localize(1093, "Found 1 symbol in {0}", this.references[0].uri.fsPath);
155
155
  }
156
156
  else if (this.groups.length === 1) {
157
- return localize(1089, "Found {0} symbols in {1}", this.references.length, this.groups[0].uri.fsPath);
157
+ return localize(1094, "Found {0} symbols in {1}", this.references.length, this.groups[0].uri.fsPath);
158
158
  }
159
159
  else {
160
- return localize(1090, "Found {0} symbols in {1} files", this.references.length, this.groups.length);
160
+ return localize(1095, "Found {0} symbols in {1} files", this.references.length, this.groups.length);
161
161
  }
162
162
  }
163
163
  nextOrPreviousReference(reference, next) {
@@ -24,7 +24,7 @@ import { createDecorator } from '../../../../platform/instantiation/common/insta
24
24
  import { IKeybindingService } from '../../../../platform/keybinding/common/keybinding.js';
25
25
  import { KeybindingsRegistry } from '../../../../platform/keybinding/common/keybindingsRegistry.js';
26
26
  import { INotificationService } from '../../../../platform/notification/common/notification.js';
27
- export const ctxHasSymbols = new RawContextKey('hasSymbols', false, localize(1091, "Whether there are symbol locations that can be navigated via keyboard-only."));
27
+ export const ctxHasSymbols = new RawContextKey('hasSymbols', false, localize(1096, "Whether there are symbol locations that can be navigated via keyboard-only."));
28
28
  export const ISymbolNavigationService = createDecorator('ISymbolNavigationService');
29
29
  let SymbolNavigationService = class SymbolNavigationService {
30
30
  constructor(contextKeyService, _editorService, _notificationService, _keybindingService) {
@@ -110,8 +110,8 @@ let SymbolNavigationService = class SymbolNavigationService {
110
110
  this._currentMessage?.close();
111
111
  const kb = this._keybindingService.lookupKeybinding('editor.gotoNextSymbolFromResult');
112
112
  const message = kb
113
- ? localize(1092, "Symbol {0} of {1}, {2} for next", this._currentIdx + 1, this._currentModel.references.length, kb.getLabel())
114
- : localize(1093, "Symbol {0} of {1}", this._currentIdx + 1, this._currentModel.references.length);
113
+ ? localize(1097, "Symbol {0} of {1}, {2} for next", this._currentIdx + 1, this._currentModel.references.length, kb.getLabel())
114
+ : localize(1098, "Symbol {0} of {1}", this._currentIdx + 1, this._currentModel.references.length);
115
115
  this._currentMessage = this._notificationService.status(message);
116
116
  }
117
117
  };
@@ -21,7 +21,7 @@ class DebugEditorGpuRendererAction extends EditorAction {
21
21
  constructor() {
22
22
  super({
23
23
  id: 'editor.action.debugEditorGpuRenderer',
24
- label: localize2(1097, "Developer: Debug Editor GPU Renderer"),
24
+ label: localize2(1102, "Developer: Debug Editor GPU Renderer"),
25
25
  // TODO: Why doesn't `ContextKeyExpr.equals('config:editor.experimentalGpuAcceleration', 'on')` work?
26
26
  precondition: ContextKeyExpr.true(),
27
27
  });
@@ -31,15 +31,15 @@ class DebugEditorGpuRendererAction extends EditorAction {
31
31
  const quickInputService = accessor.get(IQuickInputService);
32
32
  const choice = await quickInputService.pick([
33
33
  {
34
- label: localize(1094, "Log Texture Atlas Stats"),
34
+ label: localize(1099, "Log Texture Atlas Stats"),
35
35
  id: 'logTextureAtlasStats',
36
36
  },
37
37
  {
38
- label: localize(1095, "Save Texture Atlas"),
38
+ label: localize(1100, "Save Texture Atlas"),
39
39
  id: 'saveTextureAtlas',
40
40
  },
41
41
  {
42
- label: localize(1096, "Draw Glyph"),
42
+ label: localize(1101, "Draw Glyph"),
43
43
  id: 'drawGlyph',
44
44
  },
45
45
  ], { canPickMany: false });
@@ -26,6 +26,7 @@ let GlyphHoverWidget = class GlyphHoverWidget extends Disposable {
26
26
  constructor(editor, _markdownRendererService) {
27
27
  super();
28
28
  this._markdownRendererService = _markdownRendererService;
29
+ this.allowEditorOverflow = true;
29
30
  this._renderDisposeables = this._register(new DisposableStore());
30
31
  this._editor = editor;
31
32
  this._isVisible = false;
@@ -143,8 +144,27 @@ let GlyphHoverWidget = class GlyphHoverWidget extends Disposable {
143
144
  const nodeHeight = this._hover.containerDomNode.clientHeight;
144
145
  const top = topForLineNumber - editorScrollTop - ((nodeHeight - lineHeight) / 2);
145
146
  const left = editorLayout.glyphMarginLeft + editorLayout.glyphMarginWidth + (laneOrLine === 'lineNo' ? editorLayout.lineNumbersWidth : 0);
146
- this._hover.containerDomNode.style.left = `${left}px`;
147
- this._hover.containerDomNode.style.top = `${Math.max(Math.round(top), 0)}px`;
147
+ // Constrain the hover widget to stay within the editor bounds
148
+ const editorHeight = editorLayout.height;
149
+ const maxTop = editorHeight - nodeHeight;
150
+ const constrainedTop = Math.max(0, Math.min(Math.round(top), maxTop));
151
+ const fixedOverflowWidgets = this._editor.getOption(51 /* EditorOption.fixedOverflowWidgets */);
152
+ if (fixedOverflowWidgets) {
153
+ // Use fixed positioning relative to the viewport
154
+ const editorDomNode = this._editor.getDomNode();
155
+ if (editorDomNode) {
156
+ const editorRect = dom.getDomNodePagePosition(editorDomNode);
157
+ this._hover.containerDomNode.style.position = 'fixed';
158
+ this._hover.containerDomNode.style.left = `${editorRect.left + left}px`;
159
+ this._hover.containerDomNode.style.top = `${editorRect.top + constrainedTop}px`;
160
+ }
161
+ }
162
+ else {
163
+ // Use absolute positioning relative to the editor
164
+ this._hover.containerDomNode.style.position = 'absolute';
165
+ this._hover.containerDomNode.style.left = `${left}px`;
166
+ this._hover.containerDomNode.style.top = `${constrainedTop}px`;
167
+ }
148
168
  this._hover.containerDomNode.style.zIndex = '11'; // 1 more than the zone widget at 10 (#233819)
149
169
  }
150
170
  _onMouseLeave(e) {
@@ -1 +1 @@
1
- {"version":3,"sources":["file:///mnt/vss/_work/1/s/dependencies/vscode/out-editor-src/vs/editor/contrib/hover/browser/glyphHoverWidget.ts","vs/editor/contrib/hover/browser/glyphHoverWidget.ts"],"names":[],"mappings":"AAAA;;;gGAGgG;;;;;;;;;;;AAEhG,OAAO,KAAK,GAAG,MAAM,iCAAiC,CAAC;AACvD,OAAO,EAAE,UAAU,EAAE,eAAe,EAAE,MAAM,sCAAsC,CAAC;AACnF,OAAO,EAAE,wBAAwB,EAAE,MAAM,2DAA2D,CAAC;AAGrG,OAAO,EAAE,cAAc,EAA+B,MAAM,qBAAqB,CAAC;AAClF,OAAO,EAAE,WAAW,EAAE,MAAM,kDAAkD,CAAC;AAE/E,OAAO,EAAmC,kBAAkB,EAA6B,MAAM,yBAAyB,CAAC;AACzH,OAAO,EAAE,4BAA4B,EAAE,MAAM,iBAAiB,CAAC;AAE/D,MAAM,CAAC,GAAG,GAAG,CAAC,CAAC,CAAC;AAET,IAAM,gBAAgB,GAAtB,MAAM,gBAAiB,SAAQ,UAAU;;aAExB,OAAE,GAAG,sCAAH,AAAyC,CAAC;IAanE,YACC,MAAmB,EACO,wBAAmE;QAE7F,KAAK,E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AC,GAAG,CAAC,EAAE,CAAC,CAAC,IAAI,CAAC;QAC7E,IAAI,CAAC,MAAM,CAAC,gBAAgB,CAAC,KAAK,CAAC,MAAM,GAAG,IAAI,CAAC,CAAC,8CAA8C;IACjG,CAAC;IAEO,aAAa,CAAC,CAAa;QAClC,MAAM,aAAa,GAAG,IAAI,CAAC,OAAO,CAAC,UAAU,EAAE,CAAC;QAChD,MAAM,8BAA8B,GAAG,CAAC,aAAa,IAAI,CAAC,4BAA4B,CAAC,aAAa,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,CAAC;QAChH,IAAI,8BAA8B,EAAE,CAAC;YACpC,IAAI,CAAC,IAAI,EAAE,CAAC;QACb,CAAC;IACF,CAAC;;AAxKW,gBAAgB;IAiB1B,WAAA,wBAAwB,CAAA;GAjBd,gBAAgB,CAyK5B","file":"glyphHoverWidget.js","sourceRoot":"file:///mnt/vss/_work/1/s/dependencies/vscode/out-editor-src","sourcesContent":["/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n\nimport * as dom from '../../../../base/browser/dom.js';\nimport { Disposable, DisposableStore } from '../../../../base/common/lifecycle.js';\nimport { IMarkdownRendererService } from '../../../../platform/markdown/browser/markdownRenderer.js';\nimport { ICodeEditor, IEditorMouseEvent, IOverlayWidget, IOverlayWidgetPosition, MouseTargetType } from '../../../browser/editorBrowser.js';\nimport { ConfigurationChangedEvent, EditorOption } from '../../../common/config/editorOptions.js';\nimport { HoverOperation, HoverResult, HoverStartMode } from './hoverOperation.js';\nimport { HoverWidget } from '../../../../base/browser/ui/hover/hoverWidget.js';\nimport { IHoverWidget } from './hoverTypes.js';\nimport { IHoverMessage, LaneOrLineNumber, GlyphHoverComputer, GlyphHoverComputerOptions } from './glyphHoverComputer.js';\nimport { isMousePositionWithinElement } from './hoverUtils.js';\n\nconst $ = dom.$;\n\nexport class GlyphHoverWidget extends Disposable implements IOverlayWidget, IHoverWidget {\n\n\tpublic static readonly ID = 'editor.contrib.modesGlyphHoverWidget';\n\n\tprivate readonly _editor: ICodeEditor;\n\tprivate readonly _hover: HoverWidget;\n\n\tprivate _isVisible: boolean;\n\tprivate _messages: IHoverMessage[];\n\n\tprivate readonly _hoverOperation: HoverOperation<GlyphHoverComputerOptions, IHoverMessage>;\n\tprivate readonly _renderDisposeables = this._register(new DisposableStore());\n\n\tprivate _hoverComputerOptions: GlyphHoverComputerOptions | undefined;\n\n\tconstructor(\n\t\teditor: ICodeEditor,\n\t\t@IMarkdownRendererService private readonly _markdownRendererService: IMarkdownRendererService,\n\t) {\n\t\tsuper();\n\t\tthis._editor = editor;\n\n\t\tthis._isVisible = false;\n\t\tthis._messages = [];\n\n\t\tthis._hover = this._register(new HoverWidget(true));\n\t\tthis._hover.containerDomNode.classList.toggle('hidden', !this._isVisible);\n\n\t\tthis._hoverOperation = this._register(new HoverOperation(this._editor, new GlyphHoverComputer(this._editor)));\n\t\tthis._register(this._hoverOperation.onResult((result) => this._withResult(result)));\n\n\t\tthis._register(this._editor.onDidChangeModelDecorations(() => this._onModelDecorationsChanged()));\n\t\tthis._register(this._editor.onDidChangeConfiguration((e: ConfigurationChangedEvent) => {\n\t\t\tif (e.hasChanged(EditorOption.fontInfo)) {\n\t\t\t\tthis._updateFont();\n\t\t\t}\n\t\t}));\n\t\tthis._register(dom.addStandardDisposableListener(this._hover.containerDomNode, 'mouseleave', (e) => {\n\t\t\tthis._onMouseLeave(e);\n\t\t}));\n\t\tthis._editor.addOverlayWidget(this);\n\t}\n\n\tpublic override dispose(): void {\n\t\tthis._hoverComputerOptions = undefined;\n\t\tthis._editor.removeOverlayWidget(this);\n\t\tsuper.dispose();\n\t}\n\n\tpublic getId(): string {\n\t\treturn GlyphHoverWidget.ID;\n\t}\n\n\tpublic getDomNode(): HTMLElement {\n\t\treturn this._hover.containerDomNode;\n\t}\n\n\tpublic getPosition(): IOverlayWidgetPosition | null {\n\t\treturn null;\n\t}\n\n\tprivate _updateFont(): void {\n\t\tconst codeClasses: HTMLElement[] = Array.prototype.slice.call(this._hover.contentsDomNode.getElementsByClassName('code'));\n\t\tcodeClasses.forEach(node => this._editor.applyFontInfo(node));\n\t}\n\n\tprivate _onModelDecorationsChanged(): void {\n\t\tif (this._isVisible && this._hoverComputerOptions) {\n\t\t\t// The decorations have changed and the hover is visible,\n\t\t\t// we need to recompute the displayed text\n\t\t\tthis._hoverOperation.cancel();\n\t\t\tthis._hoverOperation.start(HoverStartMode.Delayed, this._hoverComputerOptions);\n\t\t}\n\t}\n\n\tpublic showsOrWillShow(mouseEvent: IEditorMouseEvent): boolean {\n\t\tconst target = mouseEvent.target;\n\t\tif (target.type === MouseTargetType.GUTTER_GLYPH_MARGIN && target.detail.glyphMarginLane) {\n\t\t\tthis._startShowingAt(target.position.lineNumber, target.detail.glyphMarginLane);\n\t\t\treturn true;\n\t\t}\n\t\tif (target.type === MouseTargetType.GUTTER_LINE_NUMBERS) {\n\t\t\tthis._startShowingAt(target.position.lineNumber, 'lineNo');\n\t\t\treturn true;\n\t\t}\n\t\treturn false;\n\t}\n\n\tprivate _startShowingAt(lineNumber: number, laneOrLine: LaneOrLineNumber): void {\n\t\tif (this._hoverComputerOptions\n\t\t\t&& this._hoverComputerOptions.lineNumber === lineNumber\n\t\t\t&& this._hoverComputerOptions.laneOrLine === laneOrLine) {\n\t\t\t// We have to show the widget at the exact same line number as before, so no work is needed\n\t\t\treturn;\n\t\t}\n\t\tthis._hoverOperation.cancel();\n\t\tthis.hide();\n\t\tthis._hoverComputerOptions = { lineNumber, laneOrLine };\n\t\tthis._hoverOperation.start(HoverStartMode.Delayed, this._hoverComputerOptions);\n\t}\n\n\tpublic hide(): void {\n\t\tthis._hoverComputerOptions = undefined;\n\t\tthis._hoverOperation.cancel();\n\t\tif (!this._isVisible) {\n\t\t\treturn;\n\t\t}\n\t\tthis._isVisible = false;\n\t\tthis._hover.containerDomNode.classList.toggle('hidden', !this._isVisible);\n\t}\n\n\tprivate _withResult(result: HoverResult<GlyphHoverComputerOptions, IHoverMessage>): void {\n\t\tthis._messages = result.value;\n\n\t\tif (this._messages.length > 0) {\n\t\t\tthis._renderMessages(result.options.lineNumber, result.options.laneOrLine, this._messages);\n\t\t} else {\n\t\t\tthis.hide();\n\t\t}\n\t}\n\n\tprivate _renderMessages(lineNumber: number, laneOrLine: LaneOrLineNumber, messages: IHoverMessage[]): void {\n\t\tthis._renderDisposeables.clear();\n\n\t\tconst fragment = document.createDocumentFragment();\n\n\t\tfor (const msg of messages) {\n\t\t\tconst markdownHoverElement = $('div.hover-row.markdown-hover');\n\t\t\tconst hoverContentsElement = dom.append(markdownHoverElement, $('div.hover-contents'));\n\t\t\tconst renderedContents = this._renderDisposeables.add(this._markdownRendererService.render(msg.value, { context: this._editor }));\n\t\t\thoverContentsElement.appendChild(renderedContents.element);\n\t\t\tfragment.appendChild(markdownHoverElement);\n\t\t}\n\n\t\tthis._updateContents(fragment);\n\t\tthis._showAt(lineNumber, laneOrLine);\n\t}\n\n\tprivate _updateContents(node: Node): void {\n\t\tthis._hover.contentsDomNode.textContent = '';\n\t\tthis._hover.contentsDomNode.appendChild(node);\n\t\tthis._updateFont();\n\t}\n\n\tprivate _showAt(lineNumber: number, laneOrLine: LaneOrLineNumber): void {\n\t\tif (!this._isVisible) {\n\t\t\tthis._isVisible = true;\n\t\t\tthis._hover.containerDomNode.classList.toggle('hidden', !this._isVisible);\n\t\t}\n\n\t\tconst editorLayout = this._editor.getLayoutInfo();\n\t\tconst topForLineNumber = this._editor.getTopForLineNumber(lineNumber);\n\t\tconst editorScrollTop = this._editor.getScrollTop();\n\t\tconst lineHeight = this._editor.getOption(EditorOption.lineHeight);\n\t\tconst nodeHeight = this._hover.containerDomNode.clientHeight;\n\t\tconst top = topForLineNumber - editorScrollTop - ((nodeHeight - lineHeight) / 2);\n\t\tconst left = editorLayout.glyphMarginLeft + editorLayout.glyphMarginWidth + (laneOrLine === 'lineNo' ? editorLayout.lineNumbersWidth : 0);\n\t\tthis._hover.containerDomNode.style.left = `${left}px`;\n\t\tthis._hover.containerDomNode.style.top = `${Math.max(Math.round(top), 0)}px`;\n\t\tthis._hover.containerDomNode.style.zIndex = '11'; // 1 more than the zone widget at 10 (#233819)\n\t}\n\n\tprivate _onMouseLeave(e: MouseEvent): void {\n\t\tconst editorDomNode = this._editor.getDomNode();\n\t\tconst isMousePositionOutsideOfEditor = !editorDomNode || !isMousePositionWithinElement(editorDomNode, e.x, e.y);\n\t\tif (isMousePositionOutsideOfEditor) {\n\t\t\tthis.hide();\n\t\t}\n\t}\n}\n","/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n\nimport * as dom from '../../../../base/browser/dom.js';\nimport { Disposable, DisposableStore } from '../../../../base/common/lifecycle.js';\nimport { IMarkdownRendererService } from '../../../../platform/markdown/browser/markdownRenderer.js';\nimport { ICodeEditor, IEditorMouseEvent, IOverlayWidget, IOverlayWidgetPosition, MouseTargetType } from '../../../browser/editorBrowser.js';\nimport { ConfigurationChangedEvent, EditorOption } from '../../../common/config/editorOptions.js';\nimport { HoverOperation, HoverResult, HoverStartMode } from './hoverOperation.js';\nimport { HoverWidget } from '../../../../base/browser/ui/hover/hoverWidget.js';\nimport { IHoverWidget } from './hoverTypes.js';\nimport { IHoverMessage, LaneOrLineNumber, GlyphHoverComputer, GlyphHoverComputerOptions } from './glyphHoverComputer.js';\nimport { isMousePositionWithinElement } from './hoverUtils.js';\n\nconst $ = dom.$;\n\nexport class GlyphHoverWidget extends Disposable implements IOverlayWidget, IHoverWidget {\n\n\tpublic static readonly ID = 'editor.contrib.modesGlyphHoverWidget';\n\n\tprivate readonly _editor: ICodeEditor;\n\tprivate readonly _hover: HoverWidget;\n\n\tprivate _isVisible: boolean;\n\tprivate _messages: IHoverMessage[];\n\n\tprivate readonly _hoverOperation: HoverOperation<GlyphHoverComputerOptions, IHoverMessage>;\n\tprivate readonly _renderDisposeables = this._register(new DisposableStore());\n\n\tprivate _hoverComputerOptions: GlyphHoverComputerOptions | undefined;\n\n\tconstructor(\n\t\teditor: ICodeEditor,\n\t\t@IMarkdownRendererService private readonly _markdownRendererService: IMarkdownRendererService,\n\t) {\n\t\tsuper();\n\t\tthis._editor = editor;\n\n\t\tthis._isVisible = false;\n\t\tthis._messages = [];\n\n\t\tthis._hover = this._register(new HoverWidget(true));\n\t\tthis._hover.containerDomNode.classList.toggle('hidden', !this._isVisible);\n\n\t\tthis._hoverOperation = this._register(new HoverOperation(this._editor, new GlyphHoverComputer(this._editor)));\n\t\tthis._register(this._hoverOperation.onResult((result) => this._withResult(result)));\n\n\t\tthis._register(this._editor.onDidChangeModelDecorations(() => this._onModelDecorationsChanged()));\n\t\tthis._register(this._editor.onDidChangeConfiguration((e: ConfigurationChangedEvent) => {\n\t\t\tif (e.hasChanged(EditorOption.fontInfo)) {\n\t\t\t\tthis._updateFont();\n\t\t\t}\n\t\t}));\n\t\tthis._register(dom.addStandardDisposableListener(this._hover.containerDomNode, 'mouseleave', (e) => {\n\t\t\tthis._onMouseLeave(e);\n\t\t}));\n\t\tthis._editor.addOverlayWidget(this);\n\t}\n\n\tpublic override dispose(): void {\n\t\tthis._hoverComputerOptions = undefined;\n\t\tthis._editor.removeOverlayWidget(this);\n\t\tsuper.dispose();\n\t}\n\n\tpublic getId(): string {\n\t\treturn GlyphHoverWidget.ID;\n\t}\n\n\tpublic getDomNode(): HTMLElement {\n\t\treturn this._hover.containerDomNode;\n\t}\n\n\tpublic getPosition(): IOverlayWidgetPosition | null {\n\t\treturn null;\n\t}\n\n\tprivate _updateFont(): void {\n\t\tconst codeClasses: HTMLElement[] = Array.prototype.slice.call(this._hover.contentsDomNode.getElementsByClassName('code'));\n\t\tcodeClasses.forEach(node => this._editor.applyFontInfo(node));\n\t}\n\n\tprivate _onModelDecorationsChanged(): void {\n\t\tif (this._isVisible && this._hoverComputerOptions) {\n\t\t\t// The decorations have changed and the hover is visible,\n\t\t\t// we need to recompute the displayed text\n\t\t\tthis._hoverOperation.cancel();\n\t\t\tthis._hoverOperation.start(HoverStartMode.Delayed, this._hoverComputerOptions);\n\t\t}\n\t}\n\n\tpublic showsOrWillShow(mouseEvent: IEditorMouseEvent): boolean {\n\t\tconst target = mouseEvent.target;\n\t\tif (target.type === MouseTargetType.GUTTER_GLYPH_MARGIN && target.detail.glyphMarginLane) {\n\t\t\tthis._startShowingAt(target.position.lineNumber, target.detail.glyphMarginLane);\n\t\t\treturn true;\n\t\t}\n\t\tif (target.type === MouseTargetType.GUTTER_LINE_NUMBERS) {\n\t\t\tthis._startShowingAt(target.position.lineNumber, 'lineNo');\n\t\t\treturn true;\n\t\t}\n\t\treturn false;\n\t}\n\n\tprivate _startShowingAt(lineNumber: number, laneOrLine: LaneOrLineNumber): void {\n\t\tif (this._hoverComputerOptions\n\t\t\t&& this._hoverComputerOptions.lineNumber === lineNumber\n\t\t\t&& this._hoverComputerOptions.laneOrLine === laneOrLine) {\n\t\t\t// We have to show the widget at the exact same line number as before, so no work is needed\n\t\t\treturn;\n\t\t}\n\t\tthis._hoverOperation.cancel();\n\t\tthis.hide();\n\t\tthis._hoverComputerOptions = { lineNumber, laneOrLine };\n\t\tthis._hoverOperation.start(HoverStartMode.Delayed, this._hoverComputerOptions);\n\t}\n\n\tpublic hide(): void {\n\t\tthis._hoverComputerOptions = undefined;\n\t\tthis._hoverOperation.cancel();\n\t\tif (!this._isVisible) {\n\t\t\treturn;\n\t\t}\n\t\tthis._isVisible = false;\n\t\tthis._hover.containerDomNode.classList.toggle('hidden', !this._isVisible);\n\t}\n\n\tprivate _withResult(result: HoverResult<GlyphHoverComputerOptions, IHoverMessage>): void {\n\t\tthis._messages = result.value;\n\n\t\tif (this._messages.length > 0) {\n\t\t\tthis._renderMessages(result.options.lineNumber, result.options.laneOrLine, this._messages);\n\t\t} else {\n\t\t\tthis.hide();\n\t\t}\n\t}\n\n\tprivate _renderMessages(lineNumber: number, laneOrLine: LaneOrLineNumber, messages: IHoverMessage[]): void {\n\t\tthis._renderDisposeables.clear();\n\n\t\tconst fragment = document.createDocumentFragment();\n\n\t\tfor (const msg of messages) {\n\t\t\tconst markdownHoverElement = $('div.hover-row.markdown-hover');\n\t\t\tconst hoverContentsElement = dom.append(markdownHoverElement, $('div.hover-contents'));\n\t\t\tconst renderedContents = this._renderDisposeables.add(this._markdownRendererService.render(msg.value, { context: this._editor }));\n\t\t\thoverContentsElement.appendChild(renderedContents.element);\n\t\t\tfragment.appendChild(markdownHoverElement);\n\t\t}\n\n\t\tthis._updateContents(fragment);\n\t\tthis._showAt(lineNumber, laneOrLine);\n\t}\n\n\tprivate _updateContents(node: Node): void {\n\t\tthis._hover.contentsDomNode.textContent = '';\n\t\tthis._hover.contentsDomNode.appendChild(node);\n\t\tthis._updateFont();\n\t}\n\n\tprivate _showAt(lineNumber: number, laneOrLine: LaneOrLineNumber): void {\n\t\tif (!this._isVisible) {\n\t\t\tthis._isVisible = true;\n\t\t\tthis._hover.containerDomNode.classList.toggle('hidden', !this._isVisible);\n\t\t}\n\n\t\tconst editorLayout = this._editor.getLayoutInfo();\n\t\tconst topForLineNumber = this._editor.getTopForLineNumber(lineNumber);\n\t\tconst editorScrollTop = this._editor.getScrollTop();\n\t\tconst lineHeight = this._editor.getOption(EditorOption.lineHeight);\n\t\tconst nodeHeight = this._hover.containerDomNode.clientHeight;\n\t\tconst top = topForLineNumber - editorScrollTop - ((nodeHeight - lineHeight) / 2);\n\t\tconst left = editorLayout.glyphMarginLeft + editorLayout.glyphMarginWidth + (laneOrLine === 'lineNo' ? editorLayout.lineNumbersWidth : 0);\n\t\tthis._hover.containerDomNode.style.left = `${left}px`;\n\t\tthis._hover.containerDomNode.style.top = `${Math.max(Math.round(top), 0)}px`;\n\t\tthis._hover.containerDomNode.style.zIndex = '11'; // 1 more than the zone widget at 10 (#233819)\n\t}\n\n\tprivate _onMouseLeave(e: MouseEvent): void {\n\t\tconst editorDomNode = this._editor.getDomNode();\n\t\tconst isMousePositionOutsideOfEditor = !editorDomNode || !isMousePositionWithinElement(editorDomNode, e.x, e.y);\n\t\tif (isMousePositionOutsideOfEditor) {\n\t\t\tthis.hide();\n\t\t}\n\t}\n}\n"]}
1
+ {"version":3,"sources":["file:///mnt/vss/_work/1/s/dependencies/vscode/out-editor-src/vs/editor/contrib/hover/browser/glyphHoverWidget.ts","vs/editor/contrib/hover/browser/glyphHoverWidget.ts"],"names":[],"mappings":"AAAA;;;gGAGgG;;;;;;;;;;;AAEhG,OAAO,KAAK,GAAG,MAAM,iCAAiC,CAAC;AACvD,OAAO,EAAE,UAAU,EAAE,eAAe,EAAE,MAAM,sCAAsC,CAAC;AACnF,OAAO,EAAE,wBAAwB,EAAE,MAAM,2DAA2D,CAAC;AAGrG,OAAO,EAAE,cAAc,EAA+B,MAAM,qBAAqB,CAAC;AAClF,OAAO,EAAE,WAAW,EAAE,MAAM,kDAAkD,CAAC;AAE/E,OAAO,EAAmC,kBAAkB,EAA6B,MAAM,yBAAyB,CAAC;AACzH,OAAO,EAAE,4BAA4B,EAAE,MAAM,iBAAiB,CAAC;AAE/D,MAAM,CAAC,GAAG,GAAG,CAAC,CAAC,CAAC;AAET,IAAM,gBAAgB,GAAtB,MAAM,gBAAiB,SAAQ,UAAU;;aAExB,OAAE,GAAG,sCAAH,AAAyC,CAAC;IAcnE,YACC,MAAmB,EACO,wBAAmE;QAE7F,KAAK,EAAE,CAAC;QAFmC,6BAAwB,GAAxB,wBAAwB,CAA0B;QAf9E,wBAAmB,GAAG,IAAI,CAAC;QAS1B,wBAAmB,GAAG,IAAI,CAAC,SAAS,CAAC,IAAI,eAAe,EAAE,CAAC,CAAC;QAS5E,IAAI,CAAC,OAAO,GAAG,MAAM,CAAC;QAEtB,IAAI,CAAC,UAAU,GAAG,KAAK,CAAC;QACxB,IAAI,CAAC,SAAS,GAAG,EAAE,CAAC;QAEpB,IA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ot":"file:///mnt/vss/_work/1/s/dependencies/vscode/out-editor-src","sourcesContent":["/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n\nimport * as dom from '../../../../base/browser/dom.js';\nimport { Disposable, DisposableStore } from '../../../../base/common/lifecycle.js';\nimport { IMarkdownRendererService } from '../../../../platform/markdown/browser/markdownRenderer.js';\nimport { ICodeEditor, IEditorMouseEvent, IOverlayWidget, IOverlayWidgetPosition, MouseTargetType } from '../../../browser/editorBrowser.js';\nimport { ConfigurationChangedEvent, EditorOption } from '../../../common/config/editorOptions.js';\nimport { HoverOperation, HoverResult, HoverStartMode } from './hoverOperation.js';\nimport { HoverWidget } from '../../../../base/browser/ui/hover/hoverWidget.js';\nimport { IHoverWidget } from './hoverTypes.js';\nimport { IHoverMessage, LaneOrLineNumber, GlyphHoverComputer, GlyphHoverComputerOptions } from './glyphHoverComputer.js';\nimport { isMousePositionWithinElement } from './hoverUtils.js';\n\nconst $ = dom.$;\n\nexport class GlyphHoverWidget extends Disposable implements IOverlayWidget, IHoverWidget {\n\n\tpublic static readonly ID = 'editor.contrib.modesGlyphHoverWidget';\n\tpublic readonly allowEditorOverflow = true;\n\n\tprivate readonly _editor: ICodeEditor;\n\tprivate readonly _hover: HoverWidget;\n\n\tprivate _isVisible: boolean;\n\tprivate _messages: IHoverMessage[];\n\n\tprivate readonly _hoverOperation: HoverOperation<GlyphHoverComputerOptions, IHoverMessage>;\n\tprivate readonly _renderDisposeables = this._register(new DisposableStore());\n\n\tprivate _hoverComputerOptions: GlyphHoverComputerOptions | undefined;\n\n\tconstructor(\n\t\teditor: ICodeEditor,\n\t\t@IMarkdownRendererService private readonly _markdownRendererService: IMarkdownRendererService,\n\t) {\n\t\tsuper();\n\t\tthis._editor = editor;\n\n\t\tthis._isVisible = false;\n\t\tthis._messages = [];\n\n\t\tthis._hover = this._register(new HoverWidget(true));\n\t\tthis._hover.containerDomNode.classList.toggle('hidden', !this._isVisible);\n\n\t\tthis._hoverOperation = this._register(new HoverOperation(this._editor, new GlyphHoverComputer(this._editor)));\n\t\tthis._register(this._hoverOperation.onResult((result) => this._withResult(result)));\n\n\t\tthis._register(this._editor.onDidChangeModelDecorations(() => this._onModelDecorationsChanged()));\n\t\tthis._register(this._editor.onDidChangeConfiguration((e: ConfigurationChangedEvent) => {\n\t\t\tif (e.hasChanged(EditorOption.fontInfo)) {\n\t\t\t\tthis._updateFont();\n\t\t\t}\n\t\t}));\n\t\tthis._register(dom.addStandardDisposableListener(this._hover.containerDomNode, 'mouseleave', (e) => {\n\t\t\tthis._onMouseLeave(e);\n\t\t}));\n\t\tthis._editor.addOverlayWidget(this);\n\t}\n\n\tpublic override dispose(): void {\n\t\tthis._hoverComputerOptions = undefined;\n\t\tthis._editor.removeOverlayWidget(this);\n\t\tsuper.dispose();\n\t}\n\n\tpublic getId(): string {\n\t\treturn GlyphHoverWidget.ID;\n\t}\n\n\tpublic getDomNode(): HTMLElement {\n\t\treturn this._hover.containerDomNode;\n\t}\n\n\tpublic getPosition(): IOverlayWidgetPosition | null {\n\t\treturn null;\n\t}\n\n\tprivate _updateFont(): void {\n\t\tconst codeClasses: HTMLElement[] = Array.prototype.slice.call(this._hover.contentsDomNode.getElementsByClassName('code'));\n\t\tcodeClasses.forEach(node => this._editor.applyFontInfo(node));\n\t}\n\n\tprivate _onModelDecorationsChanged(): void {\n\t\tif (this._isVisible && this._hoverComputerOptions) {\n\t\t\t// The decorations have changed and the hover is visible,\n\t\t\t// we need to recompute the displayed text\n\t\t\tthis._hoverOperation.cancel();\n\t\t\tthis._hoverOperation.start(HoverStartMode.Delayed, this._hoverComputerOptions);\n\t\t}\n\t}\n\n\tpublic showsOrWillShow(mouseEvent: IEditorMouseEvent): boolean {\n\t\tconst target = mouseEvent.target;\n\t\tif (target.type === MouseTargetType.GUTTER_GLYPH_MARGIN && target.detail.glyphMarginLane) {\n\t\t\tthis._startShowingAt(target.position.lineNumber, target.detail.glyphMarginLane);\n\t\t\treturn true;\n\t\t}\n\t\tif (target.type === MouseTargetType.GUTTER_LINE_NUMBERS) {\n\t\t\tthis._startShowingAt(target.position.lineNumber, 'lineNo');\n\t\t\treturn true;\n\t\t}\n\t\treturn false;\n\t}\n\n\tprivate _startShowingAt(lineNumber: number, laneOrLine: LaneOrLineNumber): void {\n\t\tif (this._hoverComputerOptions\n\t\t\t&& this._hoverComputerOptions.lineNumber === lineNumber\n\t\t\t&& this._hoverComputerOptions.laneOrLine === laneOrLine) {\n\t\t\t// We have to show the widget at the exact same line number as before, so no work is needed\n\t\t\treturn;\n\t\t}\n\t\tthis._hoverOperation.cancel();\n\t\tthis.hide();\n\t\tthis._hoverComputerOptions = { lineNumber, laneOrLine };\n\t\tthis._hoverOperation.start(HoverStartMode.Delayed, this._hoverComputerOptions);\n\t}\n\n\tpublic hide(): void {\n\t\tthis._hoverComputerOptions = undefined;\n\t\tthis._hoverOperation.cancel();\n\t\tif (!this._isVisible) {\n\t\t\treturn;\n\t\t}\n\t\tthis._isVisible = false;\n\t\tthis._hover.containerDomNode.classList.toggle('hidden', !this._isVisible);\n\t}\n\n\tprivate _withResult(result: HoverResult<GlyphHoverComputerOptions, IHoverMessage>): void {\n\t\tthis._messages = result.value;\n\n\t\tif (this._messages.length > 0) {\n\t\t\tthis._renderMessages(result.options.lineNumber, result.options.laneOrLine, this._messages);\n\t\t} else {\n\t\t\tthis.hide();\n\t\t}\n\t}\n\n\tprivate _renderMessages(lineNumber: number, laneOrLine: LaneOrLineNumber, messages: IHoverMessage[]): void {\n\t\tthis._renderDisposeables.clear();\n\n\t\tconst fragment = document.createDocumentFragment();\n\n\t\tfor (const msg of messages) {\n\t\t\tconst markdownHoverElement = $('div.hover-row.markdown-hover');\n\t\t\tconst hoverContentsElement = dom.append(markdownHoverElement, $('div.hover-contents'));\n\t\t\tconst renderedContents = this._renderDisposeables.add(this._markdownRendererService.render(msg.value, { context: this._editor }));\n\t\t\thoverContentsElement.appendChild(renderedContents.element);\n\t\t\tfragment.appendChild(markdownHoverElement);\n\t\t}\n\n\t\tthis._updateContents(fragment);\n\t\tthis._showAt(lineNumber, laneOrLine);\n\t}\n\n\tprivate _updateContents(node: Node): void {\n\t\tthis._hover.contentsDomNode.textContent = '';\n\t\tthis._hover.contentsDomNode.appendChild(node);\n\t\tthis._updateFont();\n\t}\n\n\tprivate _showAt(lineNumber: number, laneOrLine: LaneOrLineNumber): void {\n\t\tif (!this._isVisible) {\n\t\t\tthis._isVisible = true;\n\t\t\tthis._hover.containerDomNode.classList.toggle('hidden', !this._isVisible);\n\t\t}\n\n\t\tconst editorLayout = this._editor.getLayoutInfo();\n\t\tconst topForLineNumber = this._editor.getTopForLineNumber(lineNumber);\n\t\tconst editorScrollTop = this._editor.getScrollTop();\n\t\tconst lineHeight = this._editor.getOption(EditorOption.lineHeight);\n\t\tconst nodeHeight = this._hover.containerDomNode.clientHeight;\n\t\tconst top = topForLineNumber - editorScrollTop - ((nodeHeight - lineHeight) / 2);\n\t\tconst left = editorLayout.glyphMarginLeft + editorLayout.glyphMarginWidth + (laneOrLine === 'lineNo' ? editorLayout.lineNumbersWidth : 0);\n\n\t\t// Constrain the hover widget to stay within the editor bounds\n\t\tconst editorHeight = editorLayout.height;\n\t\tconst maxTop = editorHeight - nodeHeight;\n\t\tconst constrainedTop = Math.max(0, Math.min(Math.round(top), maxTop));\n\n\t\tconst fixedOverflowWidgets = this._editor.getOption(EditorOption.fixedOverflowWidgets);\n\t\tif (fixedOverflowWidgets) {\n\t\t\t// Use fixed positioning relative to the viewport\n\t\t\tconst editorDomNode = this._editor.getDomNode();\n\t\t\tif (editorDomNode) {\n\t\t\t\tconst editorRect = dom.getDomNodePagePosition(editorDomNode);\n\t\t\t\tthis._hover.containerDomNode.style.position = 'fixed';\n\t\t\t\tthis._hover.containerDomNode.style.left = `${editorRect.left + left}px`;\n\t\t\t\tthis._hover.containerDomNode.style.top = `${editorRect.top + constrainedTop}px`;\n\t\t\t}\n\t\t} else {\n\t\t\t// Use absolute positioning relative to the editor\n\t\t\tthis._hover.containerDomNode.style.position = 'absolute';\n\t\t\tthis._hover.containerDomNode.style.left = `${left}px`;\n\t\t\tthis._hover.containerDomNode.style.top = `${constrainedTop}px`;\n\t\t}\n\t\tthis._hover.containerDomNode.style.zIndex = '11'; // 1 more than the zone widget at 10 (#233819)\n\t}\n\n\tprivate _onMouseLeave(e: MouseEvent): void {\n\t\tconst editorDomNode = this._editor.getDomNode();\n\t\tconst isMousePositionOutsideOfEditor = !editorDomNode || !isMousePositionWithinElement(editorDomNode, e.x, e.y);\n\t\tif (isMousePositionOutsideOfEditor) {\n\t\t\tthis.hide();\n\t\t}\n\t}\n}\n","/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n\nimport * as dom from '../../../../base/browser/dom.js';\nimport { Disposable, DisposableStore } from '../../../../base/common/lifecycle.js';\nimport { IMarkdownRendererService } from '../../../../platform/markdown/browser/markdownRenderer.js';\nimport { ICodeEditor, IEditorMouseEvent, IOverlayWidget, IOverlayWidgetPosition, MouseTargetType } from '../../../browser/editorBrowser.js';\nimport { ConfigurationChangedEvent, EditorOption } from '../../../common/config/editorOptions.js';\nimport { HoverOperation, HoverResult, HoverStartMode } from './hoverOperation.js';\nimport { HoverWidget } from '../../../../base/browser/ui/hover/hoverWidget.js';\nimport { IHoverWidget } from './hoverTypes.js';\nimport { IHoverMessage, LaneOrLineNumber, GlyphHoverComputer, GlyphHoverComputerOptions } from './glyphHoverComputer.js';\nimport { isMousePositionWithinElement } from './hoverUtils.js';\n\nconst $ = dom.$;\n\nexport class GlyphHoverWidget extends Disposable implements IOverlayWidget, IHoverWidget {\n\n\tpublic static readonly ID = 'editor.contrib.modesGlyphHoverWidget';\n\tpublic readonly allowEditorOverflow = true;\n\n\tprivate readonly _editor: ICodeEditor;\n\tprivate readonly _hover: HoverWidget;\n\n\tprivate _isVisible: boolean;\n\tprivate _messages: IHoverMessage[];\n\n\tprivate readonly _hoverOperation: HoverOperation<GlyphHoverComputerOptions, IHoverMessage>;\n\tprivate readonly _renderDisposeables = this._register(new DisposableStore());\n\n\tprivate _hoverComputerOptions: GlyphHoverComputerOptions | undefined;\n\n\tconstructor(\n\t\teditor: ICodeEditor,\n\t\t@IMarkdownRendererService private readonly _markdownRendererService: IMarkdownRendererService,\n\t) {\n\t\tsuper();\n\t\tthis._editor = editor;\n\n\t\tthis._isVisible = false;\n\t\tthis._messages = [];\n\n\t\tthis._hover = this._register(new HoverWidget(true));\n\t\tthis._hover.containerDomNode.classList.toggle('hidden', !this._isVisible);\n\n\t\tthis._hoverOperation = this._register(new HoverOperation(this._editor, new GlyphHoverComputer(this._editor)));\n\t\tthis._register(this._hoverOperation.onResult((result) => this._withResult(result)));\n\n\t\tthis._register(this._editor.onDidChangeModelDecorations(() => this._onModelDecorationsChanged()));\n\t\tthis._register(this._editor.onDidChangeConfiguration((e: ConfigurationChangedEvent) => {\n\t\t\tif (e.hasChanged(EditorOption.fontInfo)) {\n\t\t\t\tthis._updateFont();\n\t\t\t}\n\t\t}));\n\t\tthis._register(dom.addStandardDisposableListener(this._hover.containerDomNode, 'mouseleave', (e) => {\n\t\t\tthis._onMouseLeave(e);\n\t\t}));\n\t\tthis._editor.addOverlayWidget(this);\n\t}\n\n\tpublic override dispose(): void {\n\t\tthis._hoverComputerOptions = undefined;\n\t\tthis._editor.removeOverlayWidget(this);\n\t\tsuper.dispose();\n\t}\n\n\tpublic getId(): string {\n\t\treturn GlyphHoverWidget.ID;\n\t}\n\n\tpublic getDomNode(): HTMLElement {\n\t\treturn this._hover.containerDomNode;\n\t}\n\n\tpublic getPosition(): IOverlayWidgetPosition | null {\n\t\treturn null;\n\t}\n\n\tprivate _updateFont(): void {\n\t\tconst codeClasses: HTMLElement[] = Array.prototype.slice.call(this._hover.contentsDomNode.getElementsByClassName('code'));\n\t\tcodeClasses.forEach(node => this._editor.applyFontInfo(node));\n\t}\n\n\tprivate _onModelDecorationsChanged(): void {\n\t\tif (this._isVisible && this._hoverComputerOptions) {\n\t\t\t// The decorations have changed and the hover is visible,\n\t\t\t// we need to recompute the displayed text\n\t\t\tthis._hoverOperation.cancel();\n\t\t\tthis._hoverOperation.start(HoverStartMode.Delayed, this._hoverComputerOptions);\n\t\t}\n\t}\n\n\tpublic showsOrWillShow(mouseEvent: IEditorMouseEvent): boolean {\n\t\tconst target = mouseEvent.target;\n\t\tif (target.type === MouseTargetType.GUTTER_GLYPH_MARGIN && target.detail.glyphMarginLane) {\n\t\t\tthis._startShowingAt(target.position.lineNumber, target.detail.glyphMarginLane);\n\t\t\treturn true;\n\t\t}\n\t\tif (target.type === MouseTargetType.GUTTER_LINE_NUMBERS) {\n\t\t\tthis._startShowingAt(target.position.lineNumber, 'lineNo');\n\t\t\treturn true;\n\t\t}\n\t\treturn false;\n\t}\n\n\tprivate _startShowingAt(lineNumber: number, laneOrLine: LaneOrLineNumber): void {\n\t\tif (this._hoverComputerOptions\n\t\t\t&& this._hoverComputerOptions.lineNumber === lineNumber\n\t\t\t&& this._hoverComputerOptions.laneOrLine === laneOrLine) {\n\t\t\t// We have to show the widget at the exact same line number as before, so no work is needed\n\t\t\treturn;\n\t\t}\n\t\tthis._hoverOperation.cancel();\n\t\tthis.hide();\n\t\tthis._hoverComputerOptions = { lineNumber, laneOrLine };\n\t\tthis._hoverOperation.start(HoverStartMode.Delayed, this._hoverComputerOptions);\n\t}\n\n\tpublic hide(): void {\n\t\tthis._hoverComputerOptions = undefined;\n\t\tthis._hoverOperation.cancel();\n\t\tif (!this._isVisible) {\n\t\t\treturn;\n\t\t}\n\t\tthis._isVisible = false;\n\t\tthis._hover.containerDomNode.classList.toggle('hidden', !this._isVisible);\n\t}\n\n\tprivate _withResult(result: HoverResult<GlyphHoverComputerOptions, IHoverMessage>): void {\n\t\tthis._messages = result.value;\n\n\t\tif (this._messages.length > 0) {\n\t\t\tthis._renderMessages(result.options.lineNumber, result.options.laneOrLine, this._messages);\n\t\t} else {\n\t\t\tthis.hide();\n\t\t}\n\t}\n\n\tprivate _renderMessages(lineNumber: number, laneOrLine: LaneOrLineNumber, messages: IHoverMessage[]): void {\n\t\tthis._renderDisposeables.clear();\n\n\t\tconst fragment = document.createDocumentFragment();\n\n\t\tfor (const msg of messages) {\n\t\t\tconst markdownHoverElement = $('div.hover-row.markdown-hover');\n\t\t\tconst hoverContentsElement = dom.append(markdownHoverElement, $('div.hover-contents'));\n\t\t\tconst renderedContents = this._renderDisposeables.add(this._markdownRendererService.render(msg.value, { context: this._editor }));\n\t\t\thoverContentsElement.appendChild(renderedContents.element);\n\t\t\tfragment.appendChild(markdownHoverElement);\n\t\t}\n\n\t\tthis._updateContents(fragment);\n\t\tthis._showAt(lineNumber, laneOrLine);\n\t}\n\n\tprivate _updateContents(node: Node): void {\n\t\tthis._hover.contentsDomNode.textContent = '';\n\t\tthis._hover.contentsDomNode.appendChild(node);\n\t\tthis._updateFont();\n\t}\n\n\tprivate _showAt(lineNumber: number, laneOrLine: LaneOrLineNumber): void {\n\t\tif (!this._isVisible) {\n\t\t\tthis._isVisible = true;\n\t\t\tthis._hover.containerDomNode.classList.toggle('hidden', !this._isVisible);\n\t\t}\n\n\t\tconst editorLayout = this._editor.getLayoutInfo();\n\t\tconst topForLineNumber = this._editor.getTopForLineNumber(lineNumber);\n\t\tconst editorScrollTop = this._editor.getScrollTop();\n\t\tconst lineHeight = this._editor.getOption(EditorOption.lineHeight);\n\t\tconst nodeHeight = this._hover.containerDomNode.clientHeight;\n\t\tconst top = topForLineNumber - editorScrollTop - ((nodeHeight - lineHeight) / 2);\n\t\tconst left = editorLayout.glyphMarginLeft + editorLayout.glyphMarginWidth + (laneOrLine === 'lineNo' ? editorLayout.lineNumbersWidth : 0);\n\n\t\t// Constrain the hover widget to stay within the editor bounds\n\t\tconst editorHeight = editorLayout.height;\n\t\tconst maxTop = editorHeight - nodeHeight;\n\t\tconst constrainedTop = Math.max(0, Math.min(Math.round(top), maxTop));\n\n\t\tconst fixedOverflowWidgets = this._editor.getOption(EditorOption.fixedOverflowWidgets);\n\t\tif (fixedOverflowWidgets) {\n\t\t\t// Use fixed positioning relative to the viewport\n\t\t\tconst editorDomNode = this._editor.getDomNode();\n\t\t\tif (editorDomNode) {\n\t\t\t\tconst editorRect = dom.getDomNodePagePosition(editorDomNode);\n\t\t\t\tthis._hover.containerDomNode.style.position = 'fixed';\n\t\t\t\tthis._hover.containerDomNode.style.left = `${editorRect.left + left}px`;\n\t\t\t\tthis._hover.containerDomNode.style.top = `${editorRect.top + constrainedTop}px`;\n\t\t\t}\n\t\t} else {\n\t\t\t// Use absolute positioning relative to the editor\n\t\t\tthis._hover.containerDomNode.style.position = 'absolute';\n\t\t\tthis._hover.containerDomNode.style.left = `${left}px`;\n\t\t\tthis._hover.containerDomNode.style.top = `${constrainedTop}px`;\n\t\t}\n\t\tthis._hover.containerDomNode.style.zIndex = '11'; // 1 more than the zone widget at 10 (#233819)\n\t}\n\n\tprivate _onMouseLeave(e: MouseEvent): void {\n\t\tconst editorDomNode = this._editor.getDomNode();\n\t\tconst isMousePositionOutsideOfEditor = !editorDomNode || !isMousePositionWithinElement(editorDomNode, e.x, e.y);\n\t\tif (isMousePositionOutsideOfEditor) {\n\t\t\tthis.hide();\n\t\t}\n\t}\n}\n"]}
@@ -15,7 +15,7 @@ export const PAGE_DOWN_HOVER_ACTION_ID = 'editor.action.pageDownHover';
15
15
  export const GO_TO_TOP_HOVER_ACTION_ID = 'editor.action.goToTopHover';
16
16
  export const GO_TO_BOTTOM_HOVER_ACTION_ID = 'editor.action.goToBottomHover';
17
17
  export const INCREASE_HOVER_VERBOSITY_ACTION_ID = 'editor.action.increaseHoverVerbosityLevel';
18
- export const INCREASE_HOVER_VERBOSITY_ACTION_LABEL = nls.localize(1098, "Increase Hover Verbosity Level");
18
+ export const INCREASE_HOVER_VERBOSITY_ACTION_LABEL = nls.localize(1103, "Increase Hover Verbosity Level");
19
19
  export const DECREASE_HOVER_VERBOSITY_ACTION_ID = 'editor.action.decreaseHoverVerbosityLevel';
20
- export const DECREASE_HOVER_VERBOSITY_ACTION_LABEL = nls.localize(1099, "Decrease Hover Verbosity Level");
20
+ export const DECREASE_HOVER_VERBOSITY_ACTION_LABEL = nls.localize(1104, "Decrease Hover Verbosity Level");
21
21
  //# sourceMappingURL=hoverActionIds.js.map
@@ -22,7 +22,7 @@ export class ShowOrFocusHoverAction extends EditorAction {
22
22
  constructor() {
23
23
  super({
24
24
  id: SHOW_OR_FOCUS_HOVER_ACTION_ID,
25
- label: nls.localize2(1103, "Show or Focus Hover"),
25
+ label: nls.localize2(1108, "Show or Focus Hover"),
26
26
 
27
27
 
28
28
 
@@ -31,7 +31,7 @@ export class ShowOrFocusHoverAction extends EditorAction {
31
31
 
32
32
 
33
33
  metadata: {
34
- description: nls.localize2(1104, 'Show or focus the editor hover which shows documentation, references, and other content for a symbol at the current cursor position.'),
34
+ description: nls.localize2(1109, 'Show or focus the editor hover which shows documentation, references, and other content for a symbol at the current cursor position.'),
35
35
  args: [{
36
36
  name: 'args',
37
37
  schema: {
@@ -41,9 +41,9 @@ export class ShowOrFocusHoverAction extends EditorAction {
41
41
  description: 'Controls if and when the hover should take focus upon being triggered by this action.',
42
42
  enum: [HoverFocusBehavior.NoAutoFocus, HoverFocusBehavior.FocusIfVisible, HoverFocusBehavior.AutoFocusImmediately],
43
43
  enumDescriptions: [
44
- nls.localize(1100, 'The hover will not automatically take focus.'),
45
- nls.localize(1101, 'The hover will take focus only if it is already visible.'),
46
- nls.localize(1102, 'The hover will automatically take focus when it appears.'),
44
+ nls.localize(1105, 'The hover will not automatically take focus.'),
45
+ nls.localize(1106, 'The hover will take focus only if it is already visible.'),
46
+ nls.localize(1107, 'The hover will automatically take focus when it appears.'),
47
47
  ],
48
48
  default: HoverFocusBehavior.FocusIfVisible,
49
49
  }
@@ -98,7 +98,7 @@ export class ShowDefinitionPreviewHoverAction extends EditorAction {
98
98
  constructor() {
99
99
  super({
100
100
  id: SHOW_DEFINITION_PREVIEW_HOVER_ACTION_ID,
101
- label: nls.localize2(1105, "Show Definition Preview Hover"),
101
+ label: nls.localize2(1110, "Show Definition Preview Hover"),
102
102
 
103
103
 
104
104
 
@@ -107,7 +107,7 @@ export class ShowDefinitionPreviewHoverAction extends EditorAction {
107
107
 
108
108
  precondition: undefined,
109
109
  metadata: {
110
- description: nls.localize2(1106, 'Show the definition preview hover in the editor.'),
110
+ description: nls.localize2(1111, 'Show the definition preview hover in the editor.'),
111
111
  },
112
112
  });
113
113
  }
@@ -135,7 +135,7 @@ export class HideContentHoverAction extends EditorAction {
135
135
  constructor() {
136
136
  super({
137
137
  id: HIDE_HOVER_ACTION_ID,
138
- label: nls.localize2(1107, "Hide Hover"),
138
+ label: nls.localize2(1112, "Hide Hover"),
139
139
 
140
140
 
141
141
 
@@ -151,7 +151,7 @@ export class ScrollUpHoverAction extends EditorAction {
151
151
  constructor() {
152
152
  super({
153
153
  id: SCROLL_UP_HOVER_ACTION_ID,
154
- label: nls.localize2(1108, "Scroll Up Hover"),
154
+ label: nls.localize2(1113, "Scroll Up Hover"),
155
155
 
156
156
 
157
157
 
@@ -164,7 +164,7 @@ export class ScrollUpHoverAction extends EditorAction {
164
164
  weight: 100 /* KeybindingWeight.EditorContrib */
165
165
  },
166
166
  metadata: {
167
- description: nls.localize2(1109, 'Scroll up the editor hover.')
167
+ description: nls.localize2(1114, 'Scroll up the editor hover.')
168
168
  },
169
169
  });
170
170
  }
@@ -180,7 +180,7 @@ export class ScrollDownHoverAction extends EditorAction {
180
180
  constructor() {
181
181
  super({
182
182
  id: SCROLL_DOWN_HOVER_ACTION_ID,
183
- label: nls.localize2(1110, "Scroll Down Hover"),
183
+ label: nls.localize2(1115, "Scroll Down Hover"),
184
184
 
185
185
 
186
186
 
@@ -193,7 +193,7 @@ export class ScrollDownHoverAction extends EditorAction {
193
193
  weight: 100 /* KeybindingWeight.EditorContrib */
194
194
  },
195
195
  metadata: {
196
- description: nls.localize2(1111, 'Scroll down the editor hover.'),
196
+ description: nls.localize2(1116, 'Scroll down the editor hover.'),
197
197
  },
198
198
  });
199
199
  }
@@ -209,7 +209,7 @@ export class ScrollLeftHoverAction extends EditorAction {
209
209
  constructor() {
210
210
  super({
211
211
  id: SCROLL_LEFT_HOVER_ACTION_ID,
212
- label: nls.localize2(1112, "Scroll Left Hover"),
212
+ label: nls.localize2(1117, "Scroll Left Hover"),
213
213
 
214
214
 
215
215
 
@@ -222,7 +222,7 @@ export class ScrollLeftHoverAction extends EditorAction {
222
222
  weight: 100 /* KeybindingWeight.EditorContrib */
223
223
  },
224
224
  metadata: {
225
- description: nls.localize2(1113, 'Scroll left the editor hover.'),
225
+ description: nls.localize2(1118, 'Scroll left the editor hover.'),
226
226
  },
227
227
  });
228
228
  }
@@ -238,7 +238,7 @@ export class ScrollRightHoverAction extends EditorAction {
238
238
  constructor() {
239
239
  super({
240
240
  id: SCROLL_RIGHT_HOVER_ACTION_ID,
241
- label: nls.localize2(1114, "Scroll Right Hover"),
241
+ label: nls.localize2(1119, "Scroll Right Hover"),
242
242
 
243
243
 
244
244
 
@@ -251,7 +251,7 @@ export class ScrollRightHoverAction extends EditorAction {
251
251
  weight: 100 /* KeybindingWeight.EditorContrib */
252
252
  },
253
253
  metadata: {
254
- description: nls.localize2(1115, 'Scroll right the editor hover.')
254
+ description: nls.localize2(1120, 'Scroll right the editor hover.')
255
255
  },
256
256
  });
257
257
  }
@@ -267,7 +267,7 @@ export class PageUpHoverAction extends EditorAction {
267
267
  constructor() {
268
268
  super({
269
269
  id: PAGE_UP_HOVER_ACTION_ID,
270
- label: nls.localize2(1116, "Page Up Hover"),
270
+ label: nls.localize2(1121, "Page Up Hover"),
271
271
 
272
272
 
273
273
 
@@ -281,7 +281,7 @@ export class PageUpHoverAction extends EditorAction {
281
281
  weight: 100 /* KeybindingWeight.EditorContrib */
282
282
  },
283
283
  metadata: {
284
- description: nls.localize2(1117, 'Page up the editor hover.'),
284
+ description: nls.localize2(1122, 'Page up the editor hover.'),
285
285
  },
286
286
  });
287
287
  }
@@ -297,7 +297,7 @@ export class PageDownHoverAction extends EditorAction {
297
297
  constructor() {
298
298
  super({
299
299
  id: PAGE_DOWN_HOVER_ACTION_ID,
300
- label: nls.localize2(1118, "Page Down Hover"),
300
+ label: nls.localize2(1123, "Page Down Hover"),
301
301
 
302
302
 
303
303
 
@@ -311,7 +311,7 @@ export class PageDownHoverAction extends EditorAction {
311
311
  weight: 100 /* KeybindingWeight.EditorContrib */
312
312
  },
313
313
  metadata: {
314
- description: nls.localize2(1119, 'Page down the editor hover.'),
314
+ description: nls.localize2(1124, 'Page down the editor hover.'),
315
315
  },
316
316
  });
317
317
  }
@@ -327,7 +327,7 @@ export class GoToTopHoverAction extends EditorAction {
327
327
  constructor() {
328
328
  super({
329
329
  id: GO_TO_TOP_HOVER_ACTION_ID,
330
- label: nls.localize2(1120, "Go To Top Hover"),
330
+ label: nls.localize2(1125, "Go To Top Hover"),
331
331
 
332
332
 
333
333
 
@@ -341,7 +341,7 @@ export class GoToTopHoverAction extends EditorAction {
341
341
  weight: 100 /* KeybindingWeight.EditorContrib */
342
342
  },
343
343
  metadata: {
344
- description: nls.localize2(1121, 'Go to the top of the editor hover.'),
344
+ description: nls.localize2(1126, 'Go to the top of the editor hover.'),
345
345
  },
346
346
  });
347
347
  }
@@ -357,7 +357,7 @@ export class GoToBottomHoverAction extends EditorAction {
357
357
  constructor() {
358
358
  super({
359
359
  id: GO_TO_BOTTOM_HOVER_ACTION_ID,
360
- label: nls.localize2(1122, "Go To Bottom Hover"),
360
+ label: nls.localize2(1127, "Go To Bottom Hover"),
361
361
 
362
362
 
363
363
 
@@ -371,7 +371,7 @@ export class GoToBottomHoverAction extends EditorAction {
371
371
  weight: 100 /* KeybindingWeight.EditorContrib */
372
372
  },
373
373
  metadata: {
374
- description: nls.localize2(1123, 'Go to the bottom of the editor hover.')
374
+ description: nls.localize2(1128, 'Go to the bottom of the editor hover.')
375
375
  },
376
376
  });
377
377
  }
@@ -35,8 +35,8 @@ import { AsyncIterableProducer } from '../../../../base/common/async.js';
35
35
  import { getHoverProviderResultsAsAsyncIterable } from './getHover.js';
36
36
  import { ICommandService } from '../../../../platform/commands/common/commands.js';
37
37
  const $ = dom.$;
38
- const increaseHoverVerbosityIcon = registerIcon('hover-increase-verbosity', Codicon.add, nls.localize(1124, 'Icon for increaseing hover verbosity.'));
39
- const decreaseHoverVerbosityIcon = registerIcon('hover-decrease-verbosity', Codicon.remove, nls.localize(1125, 'Icon for decreasing hover verbosity.'));
38
+ const increaseHoverVerbosityIcon = registerIcon('hover-increase-verbosity', Codicon.add, nls.localize(1129, 'Icon for increaseing hover verbosity.'));
39
+ const decreaseHoverVerbosityIcon = registerIcon('hover-decrease-verbosity', Codicon.remove, nls.localize(1130, 'Icon for decreasing hover verbosity.'));
40
40
  export class MarkdownHover {
41
41
  constructor(owner, range, contents, isBeforeContent, ordinal, source = undefined) {
42
42
  this.owner = owner;
@@ -79,7 +79,7 @@ let MarkdownHoverParticipant = class MarkdownHoverParticipant {
79
79
  this.hoverOrdinal = 3;
80
80
  }
81
81
  createLoadingMessage(anchor) {
82
- return new MarkdownHover(this, anchor.range, [new MarkdownString().appendText(nls.localize(1126, "Loading..."))], false, 2000);
82
+ return new MarkdownHover(this, anchor.range, [new MarkdownString().appendText(nls.localize(1131, "Loading..."))], false, 2000);
83
83
  }
84
84
  computeSync(anchor, lineDecorations) {
85
85
  if (!this._editor.hasModel() || anchor.type !== 1 /* HoverAnchorType.Range */) {
@@ -100,12 +100,12 @@ let MarkdownHoverParticipant = class MarkdownHoverParticipant {
100
100
  if (stopRenderingLineAfter >= 0 && lineLength > stopRenderingLineAfter && anchor.range.startColumn >= stopRenderingLineAfter) {
101
101
  stopRenderingMessage = true;
102
102
  result.push(new MarkdownHover(this, anchor.range, [{
103
- value: nls.localize(1127, "Rendering paused for long line for performance reasons. This can be configured via `editor.stopRenderingLineAfter`.")
103
+ value: nls.localize(1132, "Rendering paused for long line for performance reasons. This can be configured via `editor.stopRenderingLineAfter`.")
104
104
  }], false, index++));
105
105
  }
106
106
  if (!stopRenderingMessage && typeof maxTokenizationLineLength === 'number' && lineLength >= maxTokenizationLineLength) {
107
107
  result.push(new MarkdownHover(this, anchor.range, [{
108
- value: nls.localize(1128, "Tokenization is skipped for long lines for performance reasons. This can be configured via `editor.maxTokenizationLineLength`.")
108
+ value: nls.localize(1133, "Tokenization is skipped for long lines for performance reasons. This can be configured via `editor.maxTokenizationLineLength`.")
109
109
  }], false, index++));
110
110
  }
111
111
  let isBeforeContent = false;
@@ -388,14 +388,14 @@ export function labelForHoverVerbosityAction(keybindingService, action) {
388
388
  case HoverVerbosityAction.Increase: {
389
389
  const kb = keybindingService.lookupKeybinding(INCREASE_HOVER_VERBOSITY_ACTION_ID);
390
390
  return kb ?
391
- nls.localize(1129, "Increase Hover Verbosity ({0})", kb.getLabel()) :
392
- nls.localize(1130, "Increase Hover Verbosity");
391
+ nls.localize(1134, "Increase Hover Verbosity ({0})", kb.getLabel()) :
392
+ nls.localize(1135, "Increase Hover Verbosity");
393
393
  }
394
394
  case HoverVerbosityAction.Decrease: {
395
395
  const kb = keybindingService.lookupKeybinding(DECREASE_HOVER_VERBOSITY_ACTION_ID);
396
396
  return kb ?
397
- nls.localize(1131, "Decrease Hover Verbosity ({0})", kb.getLabel()) :
398
- nls.localize(1132, "Decrease Hover Verbosity");
397
+ nls.localize(1136, "Decrease Hover Verbosity ({0})", kb.getLabel()) :
398
+ nls.localize(1137, "Decrease Hover Verbosity");
399
399
  }
400
400
  }
401
401
  }
@@ -169,7 +169,7 @@ let MarkerHoverParticipant = class MarkerHoverParticipant {
169
169
  const markerController = MarkerController.get(this._editor);
170
170
  if (markerController) {
171
171
  context.statusBar.addAction({
172
- label: nls.localize(1133, "View Problem"),
172
+ label: nls.localize(1138, "View Problem"),
173
173
  commandId: NextMarkerAction.ID,
174
174
  run: () => {
175
175
  context.hide();
@@ -184,14 +184,14 @@ let MarkerHoverParticipant = class MarkerHoverParticipant {
184
184
  if (this.recentMarkerCodeActionsInfo) {
185
185
  if (IMarkerData.makeKey(this.recentMarkerCodeActionsInfo.marker) === IMarkerData.makeKey(markerHover.marker)) {
186
186
  if (!this.recentMarkerCodeActionsInfo.hasCodeActions) {
187
- quickfixPlaceholderElement.textContent = nls.localize(1134, "No quick fixes available");
187
+ quickfixPlaceholderElement.textContent = nls.localize(1139, "No quick fixes available");
188
188
  }
189
189
  }
190
190
  else {
191
191
  this.recentMarkerCodeActionsInfo = undefined;
192
192
  }
193
193
  }
194
- const updatePlaceholderDisposable = this.recentMarkerCodeActionsInfo && !this.recentMarkerCodeActionsInfo.hasCodeActions ? Disposable.None : disposableTimeout(() => quickfixPlaceholderElement.textContent = nls.localize(1135, "Checking for quick fixes..."), 200, disposables);
194
+ const updatePlaceholderDisposable = this.recentMarkerCodeActionsInfo && !this.recentMarkerCodeActionsInfo.hasCodeActions ? Disposable.None : disposableTimeout(() => quickfixPlaceholderElement.textContent = nls.localize(1140, "Checking for quick fixes..."), 200, disposables);
195
195
  if (!quickfixPlaceholderElement.textContent) {
196
196
  // Have some content in here to avoid flickering
197
197
  quickfixPlaceholderElement.textContent = String.fromCharCode(0xA0); // &nbsp;
@@ -203,7 +203,7 @@ let MarkerHoverParticipant = class MarkerHoverParticipant {
203
203
  this.recentMarkerCodeActionsInfo = { marker: markerHover.marker, hasCodeActions: actions.validActions.length > 0 };
204
204
  if (!this.recentMarkerCodeActionsInfo.hasCodeActions) {
205
205
  actions.dispose();
206
- quickfixPlaceholderElement.textContent = nls.localize(1136, "No quick fixes available");
206
+ quickfixPlaceholderElement.textContent = nls.localize(1141, "No quick fixes available");
207
207
  return;
208
208
  }
209
209
  quickfixPlaceholderElement.style.display = 'none';
@@ -214,7 +214,7 @@ let MarkerHoverParticipant = class MarkerHoverParticipant {
214
214
  }
215
215
  }));
216
216
  context.statusBar.addAction({
217
- label: nls.localize(1137, "Quick Fix..."),
217
+ label: nls.localize(1142, "Quick Fix..."),
218
218
  commandId: quickFixCommandId,
219
219
  run: (target) => {
220
220
  showing = true;
@@ -107,7 +107,7 @@ class InPlaceReplaceUp extends EditorAction {
107
107
  constructor() {
108
108
  super({
109
109
  id: 'editor.action.inPlaceReplace.up',
110
- label: nls.localize2(1232, "Replace with Previous Value"),
110
+ label: nls.localize2(1235, "Replace with Previous Value"),
111
111
  precondition: EditorContextKeys.writable,
112
112
  kbOpts: {
113
113
  kbExpr: EditorContextKeys.editorTextFocus,
@@ -128,7 +128,7 @@ class InPlaceReplaceDown extends EditorAction {
128
128
  constructor() {
129
129
  super({
130
130
  id: 'editor.action.inPlaceReplace.down',
131
- label: nls.localize2(1233, "Replace with Next Value"),
131
+ label: nls.localize2(1236, "Replace with Next Value"),
132
132
  precondition: EditorContextKeys.writable,
133
133
  kbOpts: {
134
134
  kbExpr: EditorContextKeys.editorTextFocus,