提交 114e38f1 编写于 作者: J Johannes Rieken

suggest - add min height when persisting widget height

上级 2042a0e4
......@@ -701,6 +701,14 @@ export class SuggestWidget implements IDisposable {
this._loadingTimeout?.dispose();
this._setState(State.Hidden);
this._onDidHide.fire(this);
// ensure that a reasonable widget height is persisted so that
// accidential "resize-to-single-items" cases aren't happening
const dim = this._persistedSize.restore();
const minPersistedHeight = Math.ceil(this.getLayoutInfo().itemHeight * 4.3);
if (dim && dim.height < minPersistedHeight) {
this._persistedSize.store(dim.with(undefined, minPersistedHeight));
}
}
isFrozen(): boolean {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册