diff --git a/app/MindWork AI Studio/Components/CodeEditor.razor.cs b/app/MindWork AI Studio/Components/CodeEditor.razor.cs index f6fceff0..08de3997 100644 --- a/app/MindWork AI Studio/Components/CodeEditor.razor.cs +++ b/app/MindWork AI Studio/Components/CodeEditor.razor.cs @@ -23,7 +23,7 @@ public partial class CodeEditor : ComponentBase, IAsyncDisposable public string Class { get; set; } = string.Empty; private readonly string editorId = $"code-editor-{Guid.NewGuid():N}"; - private const string CODE_EDITOR_MODULE = "./system/CodeEditor/code-editor.js?v=20260708-1"; + private const string CODE_EDITOR_MODULE = "./system/CodeEditor/code-editor.js?v=20260713-1"; private ElementReference editorElement; private ElementReference lineNumbersElement; private IJSObjectReference? module; diff --git a/app/MindWork AI Studio/wwwroot/system/CodeEditor/code-editor.js b/app/MindWork AI Studio/wwwroot/system/CodeEditor/code-editor.js index cb5397c6..969420ee 100644 --- a/app/MindWork AI Studio/wwwroot/system/CodeEditor/code-editor.js +++ b/app/MindWork AI Studio/wwwroot/system/CodeEditor/code-editor.js @@ -32,6 +32,9 @@ export function init(id, element, lineNumbersElement, code, language) { tab: ' ', spellcheck: false }); + // CodeJar enables soft wrapping by default, which cannot stay aligned with a newline-based gutter. + element.style.whiteSpace = 'pre'; + element.style.overflowWrap = 'normal'; const scrollHandler = () => syncLineNumbersScroll(element, lineNumbersElement); codeJar.updateCode(code ?? '');