codemaxxing 1.0.11 → 1.0.12
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 +9 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -1798,8 +1798,16 @@ function looksLikeMultilinePaste(data) {
|
|
|
1798
1798
|
function flushBurst() {
|
|
1799
1799
|
if (!burstBuffer)
|
|
1800
1800
|
return;
|
|
1801
|
-
|
|
1801
|
+
let buffered = burstBuffer;
|
|
1802
1802
|
burstBuffer = "";
|
|
1803
|
+
// Strip any bracketed paste marker fragments that accumulated across
|
|
1804
|
+
// individual character chunks (terminal sends [, 2, 0, 1, ~ separately)
|
|
1805
|
+
buffered = buffered.replace(/\x1b?\[?20[01]~/g, "");
|
|
1806
|
+
buffered = buffered.replace(/20[01]~/g, "");
|
|
1807
|
+
if (!buffered || !buffered.trim()) {
|
|
1808
|
+
pasteLog("BURST FLUSH stripped to empty — swallowed marker");
|
|
1809
|
+
return;
|
|
1810
|
+
}
|
|
1803
1811
|
const isMultiline = looksLikeMultilinePaste(buffered);
|
|
1804
1812
|
pasteLog(`BURST FLUSH len=${buffered.length} multiline=${isMultiline}`);
|
|
1805
1813
|
if (isMultiline) {
|