mirror of
https://github.com/livebook-dev/livebook.git
synced 2025-01-27 17:27:51 +08:00
Allow editor command palette to overflow (#764)
This commit is contained in:
parent
e98bfacfd0
commit
84222d0a0c
2 changed files with 20 additions and 0 deletions
|
@ -105,6 +105,13 @@ Also some spacing adjustments.
|
||||||
margin: 0 !important;
|
margin: 0 !important;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* Command palette height is computed based on editor height,
|
||||||
|
which is not what we want, since the editor can have just
|
||||||
|
a single line, hence we override with a fixed height */
|
||||||
|
.monaco-editor .quick-input-list .monaco-list {
|
||||||
|
max-height: 300px !important;
|
||||||
|
}
|
||||||
|
|
||||||
/* === Monaco cursor widget === */
|
/* === Monaco cursor widget === */
|
||||||
|
|
||||||
.monaco-cursor-widget-container {
|
.monaco-cursor-widget-container {
|
||||||
|
|
|
@ -218,6 +218,19 @@ class LiveEditor {
|
||||||
"editor.action.showHover",
|
"editor.action.showHover",
|
||||||
monaco.KeyMod.CtrlCmd | monaco.KeyCode.KEY_I
|
monaco.KeyMod.CtrlCmd | monaco.KeyCode.KEY_I
|
||||||
);
|
);
|
||||||
|
|
||||||
|
/* Overrides */
|
||||||
|
|
||||||
|
// Move the command palette widget to overflowing widgets container,
|
||||||
|
// so that it's visible on small editors.
|
||||||
|
// See: https://github.com/microsoft/monaco-editor/issues/70
|
||||||
|
const commandPaletteNode = this.editor.getContribution(
|
||||||
|
"editor.controller.quickInput"
|
||||||
|
).widget.domNode;
|
||||||
|
commandPaletteNode.remove();
|
||||||
|
this.editor._modelData.view._contentWidgets.overflowingContentWidgetsDomNode.domNode.appendChild(
|
||||||
|
commandPaletteNode
|
||||||
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
Loading…
Reference in a new issue