From f19c3c2caa061cdc2e7bf200736f4dcaa51e54b4 Mon Sep 17 00:00:00 2001 From: Yuri Karamian Date: Thu, 11 Jun 2026 23:59:27 +0200 Subject: [PATCH] Editor (#100): wrap long lines in Markdown source mode (no-wrap kept when line numbers are on) --- src/lib/components/Editor.svelte | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/src/lib/components/Editor.svelte b/src/lib/components/Editor.svelte index 5569267..043d6d3 100644 --- a/src/lib/components/Editor.svelte +++ b/src/lib/components/Editor.svelte @@ -6620,12 +6620,18 @@ padding: 0; margin: 0; user-select: text; - white-space: pre; - overflow-x: auto; + /* Wrap long lines instead of horizontal-scrolling (matches mobile). (issue #100) */ + white-space: pre-wrap; + word-break: break-word; + overflow-x: hidden; } .source-editor.with-line-numbers { padding-left: 48px; + /* The line-number gutter has one fixed row per line, so wrapping would desync it. + Keep no-wrap (horizontal scroll) whenever line numbers are on. (issue #100) */ + white-space: pre; + overflow-x: auto; } .line-numbers-clip {