codemaxxing 1.0.8 → 1.0.9
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.js +5 -4
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -1822,11 +1822,12 @@ process.stdin.emit = function (event, ...args) {
|
|
|
1822
1822
|
// regardless of context. Some terminals split markers across chunks or send
|
|
1823
1823
|
// them in unexpected positions. We never want \x1b[200~ or \x1b[201~ (or
|
|
1824
1824
|
// partial fragments like [200~ / [201~) to reach the input component.
|
|
1825
|
-
const hadStart = data.includes("\x1b[200~") || data.includes("[200~");
|
|
1826
|
-
const hadEnd = data.includes("\x1b[201~") || data.includes("[201~");
|
|
1825
|
+
const hadStart = data.includes("\x1b[200~") || data.includes("[200~") || data.includes("200~");
|
|
1826
|
+
const hadEnd = data.includes("\x1b[201~") || data.includes("[201~") || data.includes("201~");
|
|
1827
1827
|
pasteLog(`MARKERS start=${hadStart} end=${hadEnd} inBracketed=${inBracketedPaste}`);
|
|
1828
|
-
// Strip full and partial bracketed paste markers
|
|
1829
|
-
|
|
1828
|
+
// Strip full and partial bracketed paste markers — catch every possible fragment
|
|
1829
|
+
// Full: \x1b[200~ / \x1b[201~ Partial: [200~ / [201~ Bare: 200~ / 201~
|
|
1830
|
+
data = data.replace(/\x1b?\[?20[01]~/g, "");
|
|
1830
1831
|
// ── Bracketed paste handling ──
|
|
1831
1832
|
if (hadStart) {
|
|
1832
1833
|
// Flush any pending burst before entering bracketed mode
|