diff options
Diffstat (limited to 'src/raw_input.rs')
| -rw-r--r-- | src/raw_input.rs | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/src/raw_input.rs b/src/raw_input.rs index 5638cd7a..b07641a5 100644 --- a/src/raw_input.rs +++ b/src/raw_input.rs @@ -142,6 +142,11 @@ impl RawInputFramer { self.byte_framer.has_pending_input() } + #[cfg(any(windows, test))] + pub(crate) fn has_pending_bracketed_paste(&self) -> bool { + self.byte_framer.has_pending_bracketed_paste() + } + pub(crate) fn flush_timeout(&mut self) -> Vec<RawInputEvent> { Self::events_from_chunks(self.byte_framer.flush_timeout()) } @@ -198,6 +203,12 @@ impl RawInputByteFramer { !self.buffer.is_empty() } + #[cfg(any(windows, test))] + pub(crate) fn has_pending_bracketed_paste(&self) -> bool { + self.buffer.starts_with(BRACKETED_PASTE_START) + && find_subsequence(&self.buffer, BRACKETED_PASTE_END).is_none() + } + pub(crate) fn flush_timeout(&mut self) -> Vec<Vec<u8>> { let mut chunks = self.drain_available_chunks(); |
