MCPcopy Create free account
hub / github.com/Acode-Foundation/Acode / updateMargin

Function updateMargin

src/lib/editorManager.js:2835–2850  ·  view source on GitHub ↗

* Updates the margin of the editor and optionally updates the gutter settings. * @param {boolean} [updateGutter=false] - Whether to update the gutter settings.

(updateGutter = false)

Source from the content-addressed store, hash-verified

2833 * @param {boolean} [updateGutter=false] - Whether to update the gutter settings.
2834 */
2835 function updateMargin(updateGutter = false) {
2836 const { showSideButtons, linenumbers, showAnnotations } = appSettings.value;
2837 const top = 0;
2838 const bottom = 0;
2839 const right = showSideButtons ? 15 : 0;
2840 const left = linenumbers ? (showAnnotations ? 0 : -16) : 0;
2841 // TODO
2842 //editor.renderer.setMargin(top, bottom, left, right);
2843
2844 if (!updateGutter) return;
2845
2846 // editor.setOptions({
2847 // showGutter: linenumbers || showAnnotations,
2848 // showLineNumbers: linenumbers,
2849 // });
2850 }
2851
2852 /**
2853 * Switches the active file in the editor.

Callers 2

EditorManagerFunction · 0.85
setupEditorFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected