Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Perfecto1noly patch 1 #197791

Closed
Closed
Changes from 1 commit
Commits
Show all changes
10000 commits
Select commit Hold shift + click to select a range
8f9432b
Make untitled editor hint accessible (#190214)
joyceerhl Aug 11, 2023
2acda08
Do not show description for all workspaces when viewing environment c…
Aug 11, 2023
b057249
Merge pull request #190138 from microsoft/aiday/updateLeftOnModelChange
aiday-mar Aug 11, 2023
4c9d0b8
when invoking the VariableCompletions provider explicitly check for `…
jrieken Aug 11, 2023
552ff61
add chat variables service and hook up with completions
jrieken Aug 11, 2023
2cb4a66
implement and wire-up chatVariables proposal
jrieken Aug 11, 2023
6e2cace
Merge pull request #190161 from microsoft/aiday/fixingMonacoEditorError
aiday-mar Aug 11, 2023
487606d
Merge branch 'main' into chatVariables
jrieken Aug 11, 2023
99dad5d
Update distro
Tyriar Aug 11, 2023
1e8e725
add `resolveVariables` to resolve all variables of a prompt
jrieken Aug 11, 2023
f6a8e3a
joh/eastern slug (#190250)
jrieken Aug 11, 2023
205b572
loop over @-word instead of registered variables
jrieken Aug 11, 2023
6e7ea55
Merge branch 'main' into aiday/limitingWidthOfHover
alexdima Aug 11, 2023
a572838
Content hover minimum width update (#189155)
aiday-mar Aug 11, 2023
61740bb
listen to account menu storage change (#190260)
sbatten Aug 11, 2023
684270a
Use consistent names for variables, fall back to defaults when wrappi…
alexdima Aug 11, 2023
8a578df
Merge remote-tracking branch 'origin/main' into aiday/limitingWidthOf…
alexdima Aug 11, 2023
0352502
Merge pull request #190223 from microsoft/kartik/inadequate-bandicoot
Aug 11, 2023
a02d88b
Merge pull request #190247 from microsoft/tyriar/distro_230811
Tyriar Aug 11, 2023
00b98a8
Reuse `_contentWidth`
alexdima Aug 11, 2023
4751626
Merge pull request #190191 from microsoft/aamunger/copyOutput
amunger Aug 11, 2023
76985ae
build: fix alpine cli build (#190266)
connor4312 Aug 11, 2023
01d8f7d
regex fix for codeql (#190211)
MeghanKulkarni Aug 11, 2023
25d06a8
bump the version as part of resetting renderers so it wont assume the…
amunger Aug 11, 2023
d4241aa
Add basic decorations for variables
roblourens Aug 11, 2023
367ebb5
Use `editorBackground` for chat code blocks (#190271)
daviddossett Aug 11, 2023
081ebb4
fix #190261
meganrogge Aug 11, 2023
5f06a7d
fix #190272
meganrogge Aug 11, 2023
ea912c1
start on acc xterm
meganrogge Aug 11, 2023
bb62f08
Merge pull request #190280 from microsoft/merogge/acc-view-help
meganrogge Aug 11, 2023
aa72eda
strip object down to dto for event
amunger Aug 11, 2023
3f769af
Merge pull request #190273 from microsoft/aamunger/scrollToggleFix
amunger Aug 11, 2023
87df237
Merge pull request #190283 from microsoft/aamunger/outputDto
amunger Aug 11, 2023
ee88f3f
Update no ports welcome to include local case (#190284)
alexr00 Aug 11, 2023
a7a8242
simplify
meganrogge Aug 11, 2023
40e49b4
xterm@5.3.0-beta.32
Tyriar Aug 11, 2023
3ec4d30
Adopt xterm cursorInactiveStyle and reduce type repetition
Tyriar Aug 11, 2023
98512a7
only call status if not ''
meganrogge Aug 11, 2023
9ba4f3e
Merge pull request #190289 from microsoft/tyriar/xterm_230811
Tyriar Aug 11, 2023
6cff4df
Merge pull request #190279 from microsoft/merogge/hover-hint
meganrogge Aug 11, 2023
bb9d98b
check if screen reader optimized, support for right prompts
meganrogge Aug 11, 2023
436a8af
Update src/vs/platform/terminal/common/capabilities/commandDetectionC…
meganrogge Aug 11, 2023
fffa587
Update src/vs/workbench/contrib/terminal/browser/terminalInstance.ts
meganrogge Aug 11, 2023
9ce4b05
Align input part content with list content (#190299)
daviddossett Aug 12, 2023
1b87291
Remove background color for chat requests (#190297)
daviddossett Aug 12, 2023
2d9cc42
testing: menu contribution points around messages (#190298)
connor4312 Aug 12, 2023
9283cbe
Fix issue with variable decorations
roblourens Aug 13, 2023
a029c95
Support . as a row:column separator in terminal link detector
Timmmm Aug 12, 2023
9454421
Add more test cases for new row.col pattern
Tyriar Aug 13, 2023
b6b13f9
up distro (#190376)
connor4312 Aug 14, 2023
f1c80a5
Merge branch 'main' into chatVariables
jrieken Aug 14, 2023
b7ebbb6
Update dev container node version (#190346)
Timmmm Aug 14, 2023
11c5aa2
Marks editor.experimental.asyncTokenizationVerification as experimental
hediet Aug 14, 2023
13b404d
expose resolved variables to chat request
jrieken Aug 14, 2023
f7f8fea
Merge pull request #187698 from microsoft/aiday/limitingWidthOfHover
aiday-mar Aug 14, 2023
bf55386
Update src/vs/workbench/contrib/terminal/browser/media/shellIntegrati…
Tyriar Aug 14, 2023
538698f
Fixes #188470
hediet Aug 14, 2023
63b5176
remove file based recommendation - not effective
isidorn Aug 14, 2023
bda5425
Fixes #190413
hediet Aug 14, 2023
0c6b510
xterm@5.3.0-beta.39
Tyriar Aug 14, 2023
35e0b75
Merge pull request #190351 from Timmmm/sail_lines
Tyriar Aug 14, 2023
62fcea0
Merge pull request #190192 from andyleejordan/andyleejordan/iswindows
Tyriar Aug 14, 2023
0ea34ae
Capture the errors that tunnel providers throw (#190282)
alexr00 Aug 14, 2023
6565a8b
Merge pull request #190417 from microsoft/tyriar/xterm_230814
Tyriar Aug 14, 2023
c19f62d
Merge branch 'main' into merogge/xterm-acc
meganrogge Aug 14, 2023
910aceb
Make Settings inspect lazier (#190100)
rzhao271 Aug 14, 2023
50a58a8
Use https (#190358)
hediet Aug 14, 2023
b652d7e
Merge pull request #190415 from microsoft/isidorn/hollow-antlion
isidorn Aug 14, 2023
d6b2ced
Update sticky scroll widget width on model change (#190410)
aiday-mar Aug 14, 2023
d18b853
Fires partial accept event when augmented suggest item is accepted.
hediet Aug 14, 2023
1dcbd07
Make QuickChat styles closer to QuickPick (#190101)
TylerLeonhardt Aug 14, 2023
04dd69f
Renders toggle state in action bar. Fixes #186403.
hediet Aug 14, 2023
d72cb88
Uses inputActiveOptionBackground as default for actionBar.toggledBack…
hediet Aug 14, 2023
8ca2aef
Fix typo in command name (#190428)
TylerLeonhardt Aug 14, 2023
fef7c8a
Merge branch 'main' into merogge/xterm-acc
meganrogge Aug 14, 2023
b077e28
fix tests
meganrogge Aug 14, 2023
b9cd07d
move html link creation to linkify function
amunger Aug 14, 2023
3597d59
Merge branch 'main' into aamunger/errorHtml
amunger Aug 14, 2023
4daa545
Support navigating to chat response file tree
joyceerhl Aug 14, 2023
ecb24a5
Add a11y hint for file tree focus command
joyceerhl Aug 14, 2023
d1bde5b
Fix focused chat response file tree border color
joyceerhl Aug 14, 2023
d49b39b
Allow enter to toggle tree collapse state
joyceerhl Aug 14, 2023
0b8ba1e
Read file tree count in chat response aria label
joyceerhl Aug 14, 2023
4a2c8f8
remove unused variable
amunger Aug 14, 2023
1edd786
Merge pull request #190441 from microsoft/dev/joyceerhl/diplomatic-slug
joyceerhl Aug 14, 2023
ad3288d
Return focus to where it came from (#190433)
TylerLeonhardt Aug 14, 2023
0e60fe8
Show untitled editor chat hint even if editor has language (#190438)
joyceerhl Aug 14, 2023
5fd9258
Restore autoforwarded ports (#190442)
alexr00 Aug 14, 2023
afc07aa
Action widget keyboard navigation shortcuts (#190432)
justschen Aug 14, 2023
9f71c04
Merge pull request #190440 from microsoft/aamunger/errorHtml
amunger Aug 14, 2023
6aba138
Get `/clear` working in Quick Chat (#190106)
TylerLeonhardt Aug 14, 2023
84f8417
fix #189318
meganrogge Aug 14, 2023
5c538c0
comment the textarea css
meganrogge Aug 14, 2023
7c75fd7
improve name
meganrogge Aug 14, 2023
e151ba5
clean up
meganrogge Aug 14, 2023
d4e6e8d
Update src/vs/workbench/contrib/terminal/browser/media/xterm.css
meganrogge Aug 14, 2023
971874b
half baked
amunger Aug 14, 2023
3185000
Add prompt text to variable resolution
roblourens Aug 15, 2023
818e9a6
Merge branch 'main' into chatVariables
roblourens Aug 15, 2023
936edaf
cleanup
roblourens Aug 15, 2023
dd83a28
Merge remote-tracking branch 'origin/main' into chatVariables
roblourens Aug 15, 2023
6f36672
Add experimental default drop setting and fix `yieldTo` ordering (#19…
mjbvz Aug 15, 2023
69adc1f
Find with selected values when
tisilent Aug 15, 2023
958ce55
Merge pull request #190462 from microsoft/chatVariables
roblourens Aug 15, 2023
cb94a70
Bump distro (#190470)
roblourens Aug 15, 2023
66e5308
use proper enum for `ChatVariableLevel`
jrieken Aug 15, 2023
ce8c0de
Merge pull request #190491 from microsoft/joh/entitled-lungfish
jrieken Aug 15, 2023
036e8d4
Merge branch 'main' into honest-spider
yiliang114 Aug 15, 2023
a715f95
should not update max dimensions when contents have changed, only on …
aiday-mar Aug 15, 2023
00da20f
Merge branch 'main' into merogge/xterm-acc
meganrogge Aug 15, 2023
7b42d2f
Merge branch 'main' into honest-spider
yiliang114 Aug 8, 2023
75303d9
chore: remove build output of compilation.js
yiliang114 Aug 15, 2023
ca333cd
chore: remove build output of compilation.js
yiliang114 Aug 15, 2023
6d939f4
chore: bump electron@25.5.0 (#190490)
deepak1556 Aug 15, 2023
a4895ad
endgame notebooks cell additions for viewing blocked issues (#189581)
andreamah Aug 15, 2023
7cd3476
Add compiled file
alexr00 Aug 15, 2023
1820ef8
move styles to terminal.css, revert changes to xterm.css
meganrogge Aug 15, 2023
394250e
fix type any problem
meganrogge Aug 15, 2023
9d9dad9
comment out the css
meganrogge Aug 15, 2023
2271791
Update src/vs/platform/terminal/common/capabilities/commandDetectionC…
meganrogge Aug 15, 2023
d70dde3
Update src/vs/workbench/contrib/terminal/browser/media/terminal.css
meganrogge Aug 15, 2023
31a6f1d
Merge pull request #189557 from yiliang114/honest-spider
meganrogge Aug 15, 2023
1c647be
Update src/vs/workbench/contrib/terminal/browser/media/xterm.css
meganrogge Aug 15, 2023
6ba4565
xterm@5.3.0-beta.42
Tyriar Aug 15, 2023
eb519d2
copy from the image html element
amunger Aug 15, 2023
1f09f99
add devMode setting, reduce complexity
meganrogge Aug 15, 2023
4459913
enable for image only outputs
amunger Aug 15, 2023
e11d85a
use MutableDisposable
meganrogge Aug 15, 2023
38679a2
comment, better name
amunger Aug 15, 2023
0202f32
removed unneeded code
amunger Aug 15, 2023
168b2d7
Merge branch 'main' into aamunger/copyImage
amunger Aug 15, 2023
ee823a1
Merge pull request #190512 from microsoft/tyriar/xterm_230815
Tyriar Aug 15, 2023
d561eda
rm from xtermterminal
meganrogge Aug 15, 2023
0f38f22
make it a contribution
meganrogge Aug 15, 2023
6a847ba
eng: add support for snapshot tests (#190444)
connor4312 Aug 15, 2023
516e675
Update src/vs/workbench/contrib/terminal/browser/terminalInstance.ts
meganrogge Aug 15, 2023
6f079a0
Merge pull request #190514 from microsoft/aamunger/copyImage
amunger Aug 15, 2023
6c7f0cc
Fix telemetry module (#190513)
lramos15 Aug 15, 2023
bd869eb
testing: add `testResultOutdated` context key (#190522)
connor4312 Aug 15, 2023
b40e044
fix build failure (#190523)
connor4312 Aug 15, 2023
39b7db4
Update src/vs/workbench/contrib/terminalContrib/accessibility/browser…
meganrogge Aug 15, 2023
e983119
add private update dev mode function
meganrogge Aug 15, 2023
8693dc9
more explicitly exclude
meganrogge Aug 15, 2023
7a464d6
Merge pull request #190294 from microsoft/merogge/xterm-acc
meganrogge Aug 15, 2023
1a35da8
fix #186307
meganrogge Aug 15, 2023
4c2daf2
focus editor on close
meganrogge Aug 15, 2023
85dab33
Merge pull request #190501 from microsoft/aiday/initialSizeIssue
aiday-mar Aug 16, 2023
004189e
fallback to this.inputValue if
tisilent Aug 16, 2023
01029a4
Fixes monaco editor type check
hediet Aug 16, 2023
9a83521
Wait to processes outside port forwarding until restore
alexr00 Aug 16, 2023
b0abdbe
use stopWatch for measuring MP query duration
isidorn Aug 16, 2023
d4e89fd
Merge pull request #190466 from tisilent/fix-terminalFinad-initial-se…
Tyriar Aug 16, 2023
c45b5d5
Merge pull request #190593 from microsoft/alexr00/waitForTunnelRestore
alexr00 Aug 16, 2023
b95ec3e
Fixes ts config
hediet Aug 16, 2023
10747bc
Merge branch 'main' into isidorn/geographical-haddock
isidorn Aug 16, 2023
a36f5e7
Merge pull request #190595 from microsoft/isidorn/geographical-haddock
isidorn Aug 16, 2023
dea0b0c
Tweak untitled editor chat hint wording (#190597)
joyceerhl Aug 16, 2023
f5982db
Merge branch 'main' into merogge/inline-completions-accessibility
meganrogge Aug 16, 2023
28f2011
simplify a line
meganrogge Aug 16, 2023
7b12bf1
don't inform abt the hover
meganrogge Aug 16, 2023
f0b5e0d
alert w hint
meganrogge Aug 16, 2023
72ba612
use correct toolbar aria label for type
meganrogge Aug 16, 2023
8cc9d27
fix another bug
meganrogge Aug 16, 2023
71e3343
use editorOption
meganrogge Aug 16, 2023
c0dd3cd
fix tests
meganrogge Aug 16, 2023
3f8a55b
`trimLeft` -> `trimStart` (#190601)
mjbvz Aug 16, 2023
719a6a6
debug: adopt external changes (#190602)
connor4312 Aug 16, 2023
74b272c
get next/previous and accepting to work
meganrogge Aug 16, 2023
4047859
Implement vscode command terminal quick fixes
Tyriar Aug 16, 2023
2f5c0a5
polish
meganrogge Aug 16, 2023
85de2f2
Add command service to tests
Tyriar Aug 16, 2023
e5921ad
add focusedView variable to window title
meganrogge Aug 16, 2023
6ea1bd3
use name
meganrogge Aug 16, 2023
6ce0f37
Fix using variables with uppercase characters (#190606)
roblourens Aug 16, 2023
29736e1
Merge pull request #190613 from microsoft/merogge/window-title-focuse…
meganrogge Aug 16, 2023
f7dc5e1
Use `regexp.flags` instead of custom function (#190617)
mjbvz Aug 16, 2023
4e59c47
Merge pull request #190531 from microsoft/merogge/inline-completions-…
meganrogge Aug 16, 2023
1afcd2c
Remove `regExpContainsBackreference` (#190621)
mjbvz Aug 16, 2023
376d0b1
Bump TS version for building VS Code (#190622)
mjbvz Aug 16, 2023
ccb95fd
Create an `IQuickWidget` (#190627)
TylerLeonhardt Aug 16, 2023
00ea3ea
Merge pull request #190609 from microsoft/tyriar/162950_4
Tyriar Aug 17, 2023
b4cf1fa
Add settings similarity search (#190453)
rzhao271 Aug 17, 2023
c4bb9ad
fix #188764
meganrogge Aug 17, 2023
945039c
Update src/vs/workbench/contrib/terminal/browser/terminalService.ts
meganrogge Aug 17, 2023
5f37fdc
Merge pull request #190689 from microsoft/merogge/source
meganrogge Aug 17, 2023
63c6a82
disable / enable actions in the accessible view depending on context
meganrogge Aug 17, 2023
49c886c
use simple aria label
meganrogge Aug 17, 2023
551f3d0
more instances
meganrogge Aug 17, 2023
eb68de2
ensure screen reader focuses the correct elt
meganrogge Aug 17, 2023
03434ca
dont switch to a fallback language for a text model langauge change e…
amunger Aug 17, 2023
bf5f926
rm line text fr announcement
meganrogge Aug 17, 2023
2909481
clean up
amunger Aug 17, 2023
e808a72
Merge pull request #190693 from microsoft/merogge/context-keys
meganrogge Aug 17, 2023
1654d95
Merge pull request #190694 from microsoft/merogge/ensure-focus-elt
meganrogge Aug 17, 2023
1f9950b
Merge pull request #190695 from microsoft/aamunger/unregisteredLanguage2
amunger Aug 17, 2023
a492379
improve tooltip
amunger Aug 17, 2023
ce4442d
don't use hack, alert is sufficient
meganrogge Aug 17, 2023
91cfd99
Merge pull request #190700 from microsoft/aamunger/unregisteredLanguage2
amunger Aug 17, 2023
bda93fc
skip scroll to reveal when copying output and select the correct output
amunger Aug 17, 2023
2d14307
Merge pull request #190705 from microsoft/merogge/rm-set-timeout
meganrogge Aug 17, 2023
cf1b443
clean up
amunger Aug 17, 2023
3e753b1
Show more results (#190707)
rzhao271 Aug 17, 2023
d9839c3
Add a side-menu in chat (#190709)
TylerLeonhardt Aug 17, 2023
377953e
Merge pull request #190706 from microsoft/aamunger/copyImageFocus
amunger Aug 17, 2023
501baeb
Fix copying responses (#190712)
roblourens Aug 18, 2023
a1e8856
Place sticky scroll into View > Apperance (#190677)
aiday-mar Aug 18, 2023
f137f25
Fix typo plural -> singular
Tyriar Aug 18, 2023
96f5a18
Merge pull request #190740 from microsoft/atomic-pheasant
Tyriar Aug 18, 2023
6336ee7
eng: cleanup some leaks around around editors and workbenchInstantiat…
connor4312 Aug 18, 2023
7ebb304
Add enabled dim unfocused setting, tweak enabled setting
Tyriar Aug 18, 2023
42b6e31
Don't add dim unfocused element if not used
Tyriar Aug 18, 2023
f0f36df
Remove commented out setting
Tyriar Aug 18, 2023
3fe5a47
eng: revert #190623 until everyone can review it (#190752)
connor4312 Aug 18, 2023
d4c7440
Merge pull request #190751 from microsoft/tyriar/30522_3
Tyriar Aug 18, 2023
e40344e
ports: rename 'local address' -> 'forwarded address' (#190755)
connor4312 Aug 18, 2023
5e6c5a1
fix #190716
meganrogge Aug 18, 2023
bd60cc5
allow copying cell output images from context menu
amunger Aug 18, 2023
f1b9a60
disable default context menu items for the rest of the output webview
amunger Aug 18, 2023
967f27b
Fix overflow of setting list (#190721)
hsfzxjy Aug 18, 2023
7ebfc44
removed formatting changes
amunger Aug 18, 2023
c73043e
terminal: enable link detectors in detached terminals (#190699)
connor4312 Aug 18, 2023
b6cf374
Merge pull request #190762 from microsoft/aamunger/copyImageContextMenu
amunger Aug 18, 2023
d1a2b7e
Add debug logging for Cloud Changes enablement (#190764)
joyceerhl Aug 18, 2023
4d0e682
fixed copying image in Interactive Window
amunger Aug 18, 2023
de63553
add an action
meganrogge Aug 18, 2023
61d996d
improve consistency
meganrogge Aug 18, 2023
6909c0b
use id
meganrogge Aug 18, 2023
8ce3780
Merge pull request #190760 from microsoft/merogge/def-key
meganrogge Aug 18, 2023
3a31edf
Merge pull request #190768 from microsoft/aamunger/copyImageIW
amunger Aug 18, 2023
dc2bcb1
fix #190766
meganrogge Aug 18, 2023
e988d9d
fix #189974
meganrogge Aug 18, 2023
1d9febc
Render file tree during progressive rendering (#190697)
joyceerhl Aug 18, 2023
f6c280b
fix #188755
meganrogge Aug 18, 2023
b02a5b2
Merge pull request #190775 from microsoft/merogge/check-context
meganrogge Aug 18, 2023
49abb6e
Merge pull request #190771 from microsoft/merogge/actions-view
meganrogge Aug 18, 2023
1f76cf7
Merge pull request #190772 from microsoft/merogge/alt-keybinding
meganrogge Aug 18, 2023
41a5fc5
fix #190718
meganrogge Aug 18, 2023
990da21
Merge pull request #190776 from microsoft/merogge/delay
meganrogge Aug 18, 2023
349c93d
Add progressbar to Settings editor (#190708)
rzhao271 Aug 18, 2023
e92a7f0
Remove titlebar and include side buttons in quick chat (#190780)
TylerLeonhardt Aug 18, 2023
6562544
Don't use `remoteCredentialsService` when client specified a `secretS…
TylerLeonhardt Aug 18, 2023
b2a4823
xterm@5.3.0-beta.46
Tyriar Aug 18, 2023
df7e41c
Merge pull request #190785 from microsoft/tyriar/xterm_20230818
Tyriar Aug 19, 2023
3cc27e7
Make telemetry more resilient to bad networks (#190810)
lramos15 Aug 20, 2023
f125afb
Move contributing to Command Center to registration time & have Chat …
TylerLeonhardt Aug 20, 2023
3f4b4b3
Create FUNDING.yml
Perfecto1noly Aug 22, 2023
59d2973
Update .gitignore
Perfecto1noly Nov 6, 2023
8d2782b
Update .mention-bot
Perfecto1noly Nov 6, 2023
ce60f78
Merge branch 'aeschli/fix160094' into Perfecto1noly-patch-1
Perfecto1noly Nov 9, 2023
039d24e
??
Perfecto1noly Nov 9, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
55 changes: 30 additions & 25 deletions src/vs/editor/contrib/hover/browser/contentHover.ts
Original file line number Diff line number Diff line change
@@ -474,8 +474,7 @@ export class ContentHoverWidget extends ResizableContentWidget {
private _visibleData: ContentHoverVisibleData | undefined;
private _positionPreference: ContentWidgetPositionPreference | undefined;
private _minimumSize: dom.Dimension;
private _contentWidth: number;
private _initialWidth: number | undefined;
private _contentWidth: number | undefined;

private readonly _hover: HoverWidget = this._register(new HoverWidget());
private readonly _hoverVisibleKey: IContextKey<boolean>;
@@ -509,7 +508,6 @@ export class ContentHoverWidget extends ResizableContentWidget {
const minimumSize = new dom.Dimension(minimumWidth, minimumHeight);
super(editor, minimumSize);
this._minimumSize = minimumSize;
this._contentWidth = minimumWidth; // we initially assume the content width to be the minimum width
this._hoverVisibleKey = EditorContextKeys.hoverVisible.bindTo(contextKeyService);
this._hoverFocusedKey = EditorContextKeys.hoverFocused.bindTo(contextKeyService);

@@ -609,7 +607,7 @@ export class ContentHoverWidget extends ResizableContentWidget {
}
}

private _setResizableNodeMaxDimensions(): void {
private _updateResizableNodeMaxDimensions(): void {
const maxRenderingWidth = this._findMaximumRenderingWidth() ?? Infinity;
const maxRenderingHeight = this._findMaximumRenderingHeight() ?? Infinity;
this._resizableNode.maxSize = new dom.Dimension(maxRenderingWidth, maxRenderingHeight);
@@ -620,7 +618,7 @@ export class ContentHoverWidget extends ResizableContentWidget {
ContentHoverWidget._lastDimensions = new dom.Dimension(size.width, size.height);
this._setAdjustedHoverWidgetDimensions(size);
this._resizableNode.layout(size.height, size.width);
this._setResizableNodeMaxDimensions();
this._updateResizableNodeMaxDimensions();
this._hover.scrollbar.scanDomNode();
this._editor.layoutContentWidget(this);
this._visibleData?.colorPicker?.layout();
@@ -641,8 +639,8 @@ export class ContentHoverWidget extends ResizableContentWidget {
}
// Padding needed in order to stop the resizing down to a smaller height
let maximumHeight = CONTAINER_HEIGHT_PADDING;
Array.from(this._hover.contentsDomNode.children).forEach((hoverElement) => {
maximumHeight += hoverElement.clientHeight;
Array.from(this._hover.contentsDomNode.children).forEach((hoverPart) => {
maximumHeight += hoverPart.clientHeight;
});
if (this._hasHorizontalScrollbar()) {
maximumHeight += SCROLLBAR_WIDTH;
@@ -651,22 +649,34 @@ export class ContentHoverWidget extends ResizableContentWidget {
}

private _isHoverTextOverflowing(): boolean {
let overflowing = false;
Array.from(this._hover.contentsDomNode.children).forEach((hoverElement) => {
overflowing = overflowing || hoverElement.scrollWidth > hoverElement.clientWidth;
// To find out if the text is overflowing, we will disable wrapping, check the widths, and then re-enable wrapping
this._hover.containerDomNode.style.setProperty('--vscode-hover-whiteSpace', 'nowrap');
this._hover.containerDomNode.style.setProperty('--vscode-hover-sourceWhiteSpace', 'nowrap');

const overflowing = Array.from(this._hover.contentsDomNode.children).some((hoverElement) => {
return hoverElement.scrollWidth > hoverElement.clientWidth;
});

this._hover.containerDomNode.style.removeProperty('--vscode-hover-whiteSpace');
this._hover.containerDomNode.style.removeProperty('--vscode-hover-sourceWhiteSpace');

return overflowing;
}

private _findMaximumRenderingWidth(): number | undefined {
if (!this._editor || !this._editor.hasModel()) {
return;
}
this._setHoverWrapping(false);

const overflowing = this._isHoverTextOverflowing();
this._setHoverWrapping(true);

if (overflowing || (this._initialWidth && this._hover.containerDomNode.clientWidth < this._initialWidth)) {
const initialWidth = (
typeof this._contentWidth === 'undefined'
? 0
: this._contentWidth - 2 // - 2 for the borders
);

if (overflowing || this._hover.containerDomNode.clientWidth < initialWidth) {
const bodyBoxWidth = dom.getClientArea(document.body).width;
const horizontalPadding = 14;
return bodyBoxWidth - horizontalPadding;
@@ -759,16 +769,6 @@ export class ContentHoverWidget extends ResizableContentWidget {
};
}

private _setHoverWrapping(shouldWrap: boolean): void {
if (shouldWrap) {
this._hover.containerDomNode.style.removeProperty('--vscode-hover-whiteSpace');
this._hover.containerDomNode.style.removeProperty('--vscode-hover-sourceWhiteSpace');
} else {
this._hover.containerDomNode.style.setProperty('--vscode-hover-whiteSpace', 'nowrap');
this._hover.containerDomNode.style.setProperty('--vscode-hover-sourceWhiteSpace', 'nowrap');
}
}

public showAt(node: DocumentFragment, hoverData: ContentHoverVisibleData): void {
if (!this._editor || !this._editor.hasModel()) {
return;
@@ -827,8 +827,13 @@ export class ContentHoverWidget extends ResizableContentWidget {
}

private _updateMinimumWidth(): void {
const width = (
typeof this._contentWidth === 'undefined'
? this._minimumSize.width
: Math.min(this._contentWidth, this._minimumSize.width)
);
// We want to avoid that the hover is artificially large, so we use the content width as minimum width
this._resizableNode.minSize = new dom.Dimension(Math.min(this._contentWidth, this._minimumSize.width), this._minimumSize.height);
this._resizableNode.minSize = new dom.Dimension(width, this._minimumSize.height);
}

public onContentsChanged(): void {
@@ -845,6 +850,7 @@ export class ContentHoverWidget extends ResizableContentWidget {
width = dom.getTotalWidth(containerDomNode);
this._contentWidth = width;
this._updateMinimumWidth();
this._updateResizableNodeMaxDimensions();
this._resizableNode.layout(height, width);

if (this._hasHorizontalScrollbar()) {
@@ -856,7 +862,6 @@ export class ContentHoverWidget extends ResizableContentWidget {
this._positionPreference = this._findPositionPreference(widgetHeight, this._visibleData.showAtPosition);
}
this._layoutContentWidget();
this._initialWidth = this._hover.containerDomNode.clientWidth;
}

public focus(): void {