From a0122412ffa874eccfddc4195f46d7010a904799 Mon Sep 17 00:00:00 2001 From: Maribbit Date: Sat, 27 Dec 2025 21:51:27 +0800 Subject: [PATCH 1/2] fix: remove extra newline to fix cursor misalignment The extra newline character between the `
` and `` tags in the template causes a vertical offset in the highlighted code overlay. This results in a mismatch between the visible code and the actual cursor position in the textarea.

Removing the whitespace ensures the code block starts exactly where the container starts, aligning perfectly with the textarea.
---
 npm-package/CodeEditor.vue | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/npm-package/CodeEditor.vue b/npm-package/CodeEditor.vue
index 11f71e6..25b036d 100644
--- a/npm-package/CodeEditor.vue
+++ b/npm-package/CodeEditor.vue
@@ -83,8 +83,7 @@
             marginLeft: showLineNums ? lineNumsWidth + 'px' : '0',
             width: showLineNums ? 'calc(100% - ' + lineNumsWidth + 'px)' : '100%',
           }"
-        >
-        
Date: Sat, 27 Dec 2025 21:57:31 +0800
Subject: [PATCH 2/2] fix: remove extra newline to fix cursor misalignment

also fix newline in the end
---
 npm-package/CodeEditor.vue | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/npm-package/CodeEditor.vue b/npm-package/CodeEditor.vue
index 25b036d..8479814 100644
--- a/npm-package/CodeEditor.vue
+++ b/npm-package/CodeEditor.vue
@@ -92,9 +92,7 @@
             left: left + 'px',
             fontSize: fontSize,
             padding: !header ? padding : lineNums ? '10px ' + padding + ' ' + padding : '0 ' + padding + ' ' + padding,
-          }">
-        
-      
+ }">