aboutsummaryrefslogtreecommitdiffstats
path: root/zellij-utils/src/errors.rs
diff options
context:
space:
mode:
authorThomas Linford <tlinford@users.noreply.github.com>2022-05-16 21:14:57 +0200
committerGitHub <noreply@github.com>2022-05-16 21:14:57 +0200
commite8f955906293fcfe84d73a8af4a3c7f458708d06 (patch)
treece45348a986896bae8db99cab174de5a96169b21 /zellij-utils/src/errors.rs
parentdocs(changelog): ansi resize input (diff)
downloadsl0ppij-e8f955906293fcfe84d73a8af4a3c7f458708d06.tar.gz
sl0ppij-e8f955906293fcfe84d73a8af4a3c7f458708d06.tar.xz
sl0ppij-e8f955906293fcfe84d73a8af4a3c7f458708d06.zip
fix(pty): paste freeze with large amounts of text (#1383)
add pty writer thread to avoid screen thread blocking on unistd::write
Diffstat (limited to 'zellij-utils/src/errors.rs')
-rw-r--r--zellij-utils/src/errors.rs7
1 files changed, 7 insertions, 0 deletions
diff --git a/zellij-utils/src/errors.rs b/zellij-utils/src/errors.rs
index 396fc9c5..ec709b21 100644
--- a/zellij-utils/src/errors.rs
+++ b/zellij-utils/src/errors.rs
@@ -182,6 +182,7 @@ pub enum ContextType {
IPCServer(ServerContext),
StdinHandler,
AsyncTask,
+ PtyWrite(PtyWriteContext),
/// An empty, placeholder call. This should be thought of as representing no call at all.
/// A call stack representation filled with these is the representation of an empty call stack.
Empty,
@@ -197,6 +198,7 @@ impl Display for ContextType {
ContextType::IPCServer(c) => Some(("ipc_server:", format!("{:?}", c))),
ContextType::StdinHandler => Some(("stdin_handler_thread:", "AcceptInput".to_string())),
ContextType::AsyncTask => Some(("stream_terminal_bytes:", "AsyncTask".to_string())),
+ ContextType::PtyWrite(c) => Some(("pty_writer_thread:", format!("{:?}", c))),
ContextType::Empty => None,
} {
write!(f, "{} {}", left.purple(), right.green())
@@ -337,3 +339,8 @@ pub enum ServerContext {
AttachClient,
ConnStatus,
}
+
+#[derive(Debug, Clone, Copy, PartialEq, Serialize, Deserialize)]
+pub enum PtyWriteContext {
+ Write,
+}