diff options
Fix extra bracketed paste markers when pasting >8kb
Before this patch, when pasting over BUFSIZE (8192 bytes here), st would
do the following:
\e[200~...8192 bytes...\e[201~\e[200~...remaining bytes...\e[201~
With this patch, the start marker is only sent when the offset is 0 (at
the beginning of selnotify) and the end marker is only sent when the
remaining bytes to read are 0 (at the end).
For short pastes, both conditions are true in the same iteration.
For long pastes, it removes the extra markers in the middle, keeping the
intended wrapping:
\e[200~...8192 bytes......remaining bytes...\e[201~
Signed-off-by: Christoph Lohmann <20h@r-36.net>
Diffstat (limited to '%252525253fid%252525253d4be353e381e07fd8100f0cf29b299180f6681e46&id2%252525253d20d53cebc122829449524ef339ce44e13c6e85ec%2525253fid%2525253d4be353e381e07fd8100f0cf29b299180f6681e46&id2%2525253d20d53cebc122829449524ef339ce44e13c6e85ec%25253fid%25253d4be353e381e07fd8100f0cf29b299180f6681e46&id2%25253d20d53cebc122829449524ef339ce44e13c6e85ec%253fid%253d4be353e381e07fd8100f0cf29b299180f6681e46&id2%253d20d53cebc122829449524ef339ce44e13c6e85ec%3fid%3d4be353e381e07fd8100f0cf29b299180f6681e46?id=4be353e381e07fd8100f0cf29b299180f6681e46')
0 files changed, 0 insertions, 0 deletions
