id stringlengths 20 30 | source stringclasses 1
value | chunk_index int64 0 520k | token_count int32 154 512 | content stringlengths 185 57.5k |
|---|---|---|---|---|
rust_dataset_chunk_518900 | rust_dataset.txt | 518,900 | 512 | ForegroundColor {
color: String,
},
ColorRegisters {
color_registers: Vec<ColorRegister>,
},
TerminalResize {
new_size: Size,
},
FirstClientConnected {
cli_assets: CliAssets,
is_web_client: bool,
},
AttachClient {
cli_assets: CliAssets,... |
rust_dataset_chunk_518901 | rust_dataset.txt | 518,901 | 512 | ClipboardPasteSupport {
supported: bool,
shortcut: Option<String>,
},
RenderFrameAck {
seq: u64,
},
FontFamilies {
families: Vec<String>,
},
PaneMirror {
payload: Vec<u8>,
},
AdoptSessionHistory {
history: crate::session_history::Sessio... |
rust_dataset_chunk_518902 | rust_dataset.txt | 518,902 | 512 | json: String,
},
}
#[derive(Serialize, Deserialize, Debug, Clone, PartialEq)]
pub enum ExitReason {
Normal,
NormalDetached,
ForceDetached,
CannotAttach,
Disconnect,
WebClientsForbidden,
KickedByHost,
CustomExitStatus(i32),
Error(String),
}
impl Display for ExitReason {
... |
rust_dataset_chunk_518903 | rust_dataset.txt | 518,903 | 512 | sender: io::BufWriter<Box<dyn IpcStream>>,
_phantom: PhantomData<T>,
}
impl<T: Serialize> IpcSenderWithContext<T> {
/// Returns a sender to the given [LocalSocketStream](interprocess::local_socket::LocalSocketStream).
pub fn new(sender: LocalSocketStream) -> Self {
Self {
sender: io::B... |
rust_dataset_chunk_518904 | rust_dataset.txt | 518,904 | 512 | IpcReceiverWithContext<T>
where
T: for<'de> Deserialize<'de> + Serialize,
{
/// Returns a receiver to the given [LocalSocketStream](interprocess::local_socket::LocalSocketStream).
pub fn new(receiver: LocalSocketStream) -> Self {
Self {
receiver: io::BufReader::new(Box::new(receiver)),
... |
rust_dataset_chunk_518905 | rust_dataset.txt | 518,905 | 512 | Duration>) -> io::Result<()> {
self.receiver.get_ref().set_read_timeout(timeout)
}
}
// Protobuf wire format utilities
fn read_protobuf_message<T: Message + Default>(
reader: &mut impl Read,
) -> std::result::Result<T, IpcReceiveError> {
// Read length-prefixed protobuf message
let mut len_byte... |
rust_dataset_chunk_518906 | rust_dataset.txt | 518,906 | 512 | ServerMsg, ErrorContext)> {
receiver.try_recv_client_msg().ok()
}
pub fn recv_protobuf_server_to_client(
receiver: &mut IpcReceiverWithContext<ServerToClientMsg>,
) -> Option<(ServerToClientMsg, ErrorContext)> {
receiver.try_recv_server_msg().ok()
}
/// Asynchronously send `ClientToServerMsg::KillSession`... |
rust_dataset_chunk_518907 | rust_dataset.txt | 518,907 | 512 | _buf = [0u8; 4];
let _ = stream.read_exact(&mut len_buf).await;
Ok(())
}
#[cfg(windows)]
pub async fn async_send_kill_and_await(path: &std::path::Path) -> io::Result<()> {
let path = path.to_path_buf();
tokio::task::spawn_blocking(move || {
let (stream, reply_stream) = crate::pipe_pairs::connec... |
rust_dataset_chunk_518908 | rust_dataset.txt | 518,908 | 512 | , ExitReason, MobileActivePanePayload, MobilePanePayload,
MobileRenderPrefsPayload, MobileSessionPayload, MobileSizePayload, MobileStatePayload,
MobileTabPayload, PaneReference, PixelDimensions, ServerToClientMsg,
};
use crate::pane_size::{Size, SizeInPixels};
use crate::position::Position;
use crate::session_e... |
rust_dataset_chunk_518909 | rust_dataset.txt | 518,909 | 512 | TiledPaneLayout {
name: Some("no_constraint".to_owned()),
..Default::default()
},
);
let swap_tiled_layouts_1 = (
swap_tiled_layouts_1,
Some("swap_tiled_layouts_1".to_owned()),
);
let mut swap_tiled_layouts_2 = BTreeMap::new();
swap_tiled_layouts_2.in... |
rust_dataset_chunk_518910 | rust_dataset.txt | 518,910 | 512 | Default::default()
},
);
let swap_tiled_layouts_3 = (swap_tiled_layouts_3, None);
let mut swap_floating_layouts_1 = BTreeMap::new();
swap_floating_layouts_1.insert(
LayoutConstraint::MaxPanes(1),
vec![
FloatingPaneLayout {
name: Some("max_panes_1".to_... |
rust_dataset_chunk_518911 | rust_dataset.txt | 518,911 | 512 | 2.insert(
LayoutConstraint::MinPanes(2),
vec![
FloatingPaneLayout {
name: Some("min_panes_2".to_owned()),
..Default::default()
},
FloatingPaneLayout {
name: Some("min_panes_2_1".to_owned()),
..Default::de... |
rust_dataset_chunk_518912 | rust_dataset.txt | 518,912 | 512 | exact_panes_2_1".to_owned()),
..Default::default()
},
],
);
swap_floating_layouts_3.insert(
LayoutConstraint::NoConstraint,
vec![
FloatingPaneLayout {
name: Some("no_constraint".to_owned()),
..Default::default()
... |
rust_dataset_chunk_518913 | rust_dataset.txt | 518,913 | 512 | });
test_client_roundtrip!(ClientToServerMsg::TerminalPixelDimensions {
pixel_dimensions: PixelDimensions {
text_area_size: None,
character_cell_size: None,
},
});
test_client_roundtrip!(ClientToServerMsg::TerminalPixelDimensions {
pixel_dimensions: PixelDime... |
rust_dataset_chunk_518914 | rust_dataset.txt | 518,914 | 512 | , rows: 24 },
});
test_client_roundtrip!(ClientToServerMsg::TerminalResize {
new_size: Size {
cols: 200,
rows: 50
},
});
test_client_roundtrip!(ClientToServerMsg::TerminalResize {
new_size: Size { cols: 40, rows: 38 },
});
test_client_roundtrip!(Cl... |
rust_dataset_chunk_518915 | rust_dataset.txt | 518,915 | 512 | collect(),
initial_panes: None,
switch_context: Some(crate::session_history::SwitchContext {
history: crate::session_history::SessionHistory {
back: vec!["api".to_owned()],
forward: vec!["docs".to_owned()],
last: Some("a... |
rust_dataset_chunk_518916 | rust_dataset.txt | 518,916 | 512 | osc8_hyperlinks: Some(true),
scrollback_editor: Some(PathBuf::from("scrollback_editor")),
session_name: Some("session_name".to_owned()),
attach_to_session: Some(true),
auto_layout: Some(true),
session_serialization: Some(tru... |
rust_dataset_chunk_518917 | rust_dataset.txt | 518,917 | 512 | bars_hidden_on_start: Some(crate::data::HiddenBars::from_names(&[
"tab-bar",
"status-bar",
])),
hidden_bars_notification: Some(false),
mode_hints_when_bars_hidden: Some(true),
}),
layout: None... |
rust_dataset_chunk_518918 | rust_dataset.txt | 518,918 | 512 | ::default()
}),
..Default::default()
},
is_web_client: true,
});
test_client_roundtrip!(ClientToServerMsg::FirstClientConnected {
cli_assets: CliAssets {
configuration_options: Some(Options {
default_mode: Some(InputMode::Tab),
... |
rust_dataset_chunk_518919 | rust_dataset.txt | 518,919 | 512 | _mode: Some(InputMode::Move),
..Default::default()
}),
..Default::default()
},
is_web_client: true,
});
test_client_roundtrip!(ClientToServerMsg::FirstClientConnected {
cli_assets: CliAssets {
configuration_options: Some(Options {
... |
rust_dataset_chunk_518920 | rust_dataset.txt | 518,920 | 512 | Connected {
cli_assets: CliAssets {
configuration_options: Some(Options {
nested_session_handling: Some(NestedSessionHandling::Fullscreen),
..Default::default()
}),
..Default::default()
},
is_web_client: true,
});
test_c... |
rust_dataset_chunk_518921 | rust_dataset.txt | 518,921 | 512 | !(ClientToServerMsg::Action {
action: Action::Quit,
terminal_id: None,
client_id: None,
is_cli_client: false,
});
test_client_roundtrip!(ClientToServerMsg::Action {
action: Action::Quit,
terminal_id: Some(1),
client_id: Some(100),
is_cli_client: tr... |
rust_dataset_chunk_518922 | rust_dataset.txt | 518,922 | 512 | Some(1),
client_id: Some(100),
is_cli_client: true,
});
test_client_roundtrip!(ClientToServerMsg::Action {
action: Action::Resize {
resize: Resize::Decrease,
direction: Some(Direction::Left),
},
terminal_id: Some(1),
client_id: Some(100),
... |
rust_dataset_chunk_518923 | rust_dataset.txt | 518,923 | 512 | Some(100),
is_cli_client: true,
});
test_client_roundtrip!(ClientToServerMsg::Action {
action: Action::MovePane { direction: None },
terminal_id: Some(1),
client_id: Some(100),
is_cli_client: true,
});
test_client_roundtrip!(ClientToServerMsg::Action {
ac... |
rust_dataset_chunk_518924 | rust_dataset.txt | 518,924 | 512 | _id: Some(1),
client_id: Some(100),
is_cli_client: true,
});
test_client_roundtrip!(ClientToServerMsg::Action {
action: Action::DumpLayout,
terminal_id: Some(1),
client_id: Some(100),
is_cli_client: true,
});
test_client_roundtrip!(ClientToServerMsg::Actio... |
rust_dataset_chunk_518925 | rust_dataset.txt | 518,925 | 512 | client_id: Some(100),
is_cli_client: true,
});
test_client_roundtrip!(ClientToServerMsg::Action {
action: Action::ScrollDownAt {
position: Position::new(0, 0),
},
terminal_id: Some(1),
client_id: Some(100),
is_cli_client: true,
});
test_client... |
rust_dataset_chunk_518926 | rust_dataset.txt | 518,926 | 512 | ServerMsg::Action {
action: Action::ToggleBars {
bars: vec!["status-bar".to_owned()],
},
terminal_id: Some(1),
client_id: Some(100),
is_cli_client: true,
});
test_client_roundtrip!(ClientToServerMsg::Action {
action: Action::HideBars { bars: vec![] },
... |
rust_dataset_chunk_518927 | rust_dataset.txt | 518,927 | 512 | _id: None,
},
terminal_id: Some(1),
client_id: Some(100),
is_cli_client: true,
});
test_client_roundtrip!(ClientToServerMsg::Action {
action: Action::EditFile {
payload: OpenFilePayload {
path: PathBuf::from("/file/path"),
line_... |
rust_dataset_chunk_518928 | rust_dataset.txt | 518,928 | 512 | start_suppressed: true,
coordinates: FloatingPaneCoordinates::new(None, None, None, None, None, Some(false)),
near_current_pane: false,
no_focus: false,
tab_id: None,
},
terminal_id: Some(1),
client_id: Some(100),
is_cli_client:... |
rust_dataset_chunk_518929 | rust_dataset.txt | 518,929 | 512 | {
action: Action::EditFile {
payload: OpenFilePayload {
path: PathBuf::from("/file/path"),
line_number: Some(1),
cwd: Some(PathBuf::from("/my/cwd")),
originating_plugin: Some(OriginatingPlugin {
plugin_id: 11,
... |
rust_dataset_chunk_518930 | rust_dataset.txt | 518,930 | 512 | _client_roundtrip!(ClientToServerMsg::Action {
action: Action::NewFloatingPane {
command: Some(RunCommandAction {
command: PathBuf::from("/path/to/command"),
args: vec![],
cwd: None,
direction: None,
hold_on_close: false... |
rust_dataset_chunk_518931 | rust_dataset.txt | 518,931 | 512 | ),
client_id: Some(100),
is_cli_client: true,
});
test_client_roundtrip!(ClientToServerMsg::Action {
action: Action::NewTiledPane {
command: Some(RunCommandAction {
command: PathBuf::from("/path/to/command"),
args: vec!["arg1".to_owned(), "arg2... |
rust_dataset_chunk_518932 | rust_dataset.txt | 518,932 | 512 | ane: false,
no_focus: false,
pane_id_to_replace: None,
close_replaced_pane: false,
tab_id: None,
},
terminal_id: Some(1),
client_id: Some(100),
is_cli_client: true,
});
test_client_roundtrip!(ClientToServerMsg::Action {
acti... |
rust_dataset_chunk_518933 | rust_dataset.txt | 518,933 | 512 | NameInput {
input: "name input".as_bytes().to_vec(),
},
terminal_id: Some(1),
client_id: Some(100),
is_cli_client: true,
});
test_client_roundtrip!(ClientToServerMsg::Action {
action: Action::UndoRenamePane,
terminal_id: Some(1),
client_id: Som... |
rust_dataset_chunk_518934 | rust_dataset.txt | 518,934 | 512 | ..Default::default()
}),
floating_layouts: vec![],
swap_tiled_layouts: None,
swap_floating_layouts: None,
tab_name: None,
should_change_focus_to_new_tab: false,
cwd: None,
initial_panes: None,
first_pane_unblock... |
rust_dataset_chunk_518935 | rust_dataset.txt | 518,935 | 512 | Default::default()
}),
floating_layouts: vec![],
swap_tiled_layouts: None,
swap_floating_layouts: None,
tab_name: None,
should_change_focus_to_new_tab: false,
cwd: None,
initial_panes: None,
first_pane_unblock_co... |
rust_dataset_chunk_518936 | rust_dataset.txt | 518,936 | 512 | },
terminal_id: Some(1),
client_id: Some(100),
is_cli_client: true,
});
test_client_roundtrip!(ClientToServerMsg::Action {
action: Action::NewTab {
tiled_layout: Some(TiledPaneLayout {
run: Some(Run::Plugin(RunPluginOrAlias::RunPlugin(RunPlugin... |
rust_dataset_chunk_518937 | rust_dataset.txt | 518,937 | 512 | first_pane_unblock_condition: None,
},
terminal_id: Some(1),
client_id: Some(100),
is_cli_client: true,
});
test_client_roundtrip!(ClientToServerMsg::Action {
action: Action::NewTab {
tiled_layout: Some(TiledPaneLayout {
run: Some(R... |
rust_dataset_chunk_518938 | rust_dataset.txt | 518,938 | 512 | initial_panes: None,
first_pane_unblock_condition: None,
},
terminal_id: Some(1),
client_id: Some(100),
is_cli_client: true,
});
test_client_roundtrip!(ClientToServerMsg::Action {
action: Action::NewTab {
tiled_layout: Some(TiledPaneLay... |
rust_dataset_chunk_518939 | rust_dataset.txt | 518,939 | 512 | None,
},
terminal_id: Some(1),
client_id: Some(100),
is_cli_client: true,
});
test_client_roundtrip!(ClientToServerMsg::Action {
action: Action::NewTab {
tiled_layout: Some(TiledPaneLayout {
run: Some(Run::Plugin(RunPluginOrAlias::Alias(Plugin... |
rust_dataset_chunk_518940 | rust_dataset.txt | 518,940 | 512 | (), "arg3".to_owned()],
cwd: Some(PathBuf::from("/path/to/cwd")),
hold_on_close: true,
hold_on_start: true,
originating_plugin: Some(OriginatingPlugin {
plugin_id: 11,
client_id: 22,
... |
rust_dataset_chunk_518941 | rust_dataset.txt | 518,941 | 512 | ::Action {
action: Action::NewTab {
tiled_layout: Some(TiledPaneLayout {
run: Some(Run::Cwd(PathBuf::from("/path/to/cwd"))),
..Default::default()
}),
floating_layouts: vec![],
swap_tiled_layouts: None,
swap_floating_layo... |
rust_dataset_chunk_518942 | rust_dataset.txt | 518,942 | 512 | 100),
is_cli_client: true,
});
test_client_roundtrip!(ClientToServerMsg::Action {
action: Action::NewTab {
tiled_layout: None,
floating_layouts: vec![],
swap_tiled_layouts: Some(vec![
swap_tiled_layouts_1.clone(),
swap_tiled_lay... |
rust_dataset_chunk_518943 | rust_dataset.txt | 518,943 | 512 | ,
cwd: None,
initial_panes: Some(vec![
CommandOrPlugin::Command(RunCommandAction {
command: PathBuf::from("/path/to/command"),
args: vec![],
cwd: None,
direction: None,
hold_on_clo... |
rust_dataset_chunk_518944 | rust_dataset.txt | 518,944 | 512 | : Some(1),
client_id: Some(100),
is_cli_client: true,
});
test_client_roundtrip!(ClientToServerMsg::Action {
action: Action::GoToTabName {
name: "tab_name".to_owned(),
create: true,
},
terminal_id: Some(1),
client_id: Some(100),
is_... |
rust_dataset_chunk_518945 | rust_dataset.txt | 518,945 | 512 | originating_plugin: None,
use_terminal_title: false,
notify: Default::default(),
},
},
terminal_id: Some(1),
client_id: Some(100),
is_cli_client: true,
});
test_client_roundtrip!(ClientToServerMsg::Action {
actio... |
rust_dataset_chunk_518946 | rust_dataset.txt | 518,946 | 512 | ::MarkAllSeen {
session: None,
this_session: true,
},
terminal_id: None,
client_id: None,
is_cli_client: true,
});
test_client_roundtrip!(ClientToServerMsg::Action {
action: Action::MarkAllSeen {
session: Some("api".to_owned()),
... |
rust_dataset_chunk_518947 | rust_dataset.txt | 518,947 | 512 | skip_cache: false,
tab_id: None,
},
terminal_id: Some(1),
client_id: Some(100),
is_cli_client: true,
});
test_client_roundtrip!(ClientToServerMsg::Action {
action: Action::LaunchPlugin {
plugin: RunPluginOrAlias::RunPlugin(RunPlugin::default()),
... |
rust_dataset_chunk_518948 | rust_dataset.txt | 518,948 | 512 | },
terminal_id: Some(1),
client_id: Some(100),
is_cli_client: true,
});
test_client_roundtrip!(ClientToServerMsg::Action {
action: Action::MouseEvent {
event: MouseEvent {
event_type: MouseEventType::Release,
left: true,
... |
rust_dataset_chunk_518949 | rust_dataset.txt | 518,949 | 512 | ),
client_id: Some(100),
is_cli_client: true,
});
test_client_roundtrip!(ClientToServerMsg::Action {
action: Action::SearchToggleOption {
option: SearchOption::CaseSensitivity,
},
terminal_id: Some(1),
client_id: Some(100),
is_cli_client: true,... |
rust_dataset_chunk_518950 | rust_dataset.txt | 518,950 | 512 | Action {
action: Action::NewTiledPluginPane {
plugin: RunPluginOrAlias::Alias(PluginAlias::default()),
pane_name: Some("my_pane_name".to_owned()),
skip_cache: false,
cwd: Some(PathBuf::from("relative/path/to/cwd")),
no_focus: false,
tab_id:... |
rust_dataset_chunk_518951 | rust_dataset.txt | 518,951 | 512 | command: None,
pane_name: None,
near_current_pane: false,
no_focus: false,
borderless: None,
tab_id: Some(3),
border_style: None,
},
terminal_id: Some(1),
client_id: Some(100),
is_cli_client: true,
})... |
rust_dataset_chunk_518952 | rust_dataset.txt | 518,952 | 512 | ServerMsg::Action {
action: Action::NewInPlacePane {
command: None,
pane_name: None,
near_current_pane: false,
no_focus: false,
pane_id_to_replace: None,
close_replaced_pane: false,
tab_id: Some(7),
},
terminal_i... |
rust_dataset_chunk_518953 | rust_dataset.txt | 518,953 | 512 | true,
});
test_client_roundtrip!(ClientToServerMsg::Action {
action: Action::NewInPlacePluginPane {
plugin: RunPluginOrAlias::RunPlugin(RunPlugin::default()),
pane_name: None,
skip_cache: false,
close_replaced_pane: false,
no_focus: false,
... |
rust_dataset_chunk_518954 | rust_dataset.txt | 518,954 | 512 | ToServerMsg::Action {
action: Action::FocusPluginPaneWithId {
pane_id: 12,
should_float_if_hidden: true,
should_be_in_place_if_hidden: false,
},
terminal_id: Some(1),
client_id: Some(100),
is_cli_client: true,
});
test_client_roundtrip!... |
rust_dataset_chunk_518955 | rust_dataset.txt | 518,955 | 512 | _owned(),
name: None,
payload: None,
args: None,
plugin: None,
configuration: None,
launch_new: false,
skip_cache: false,
floating: None,
in_place: None,
cwd: None,
pane_title: None,
... |
rust_dataset_chunk_518956 | rust_dataset.txt | 518,956 | 512 | ServerMsg::Action {
action: Action::KeybindPipe {
plugin_id: None,
name: None,
payload: None,
args: None,
plugin: None,
configuration: None,
launch_new: false,
skip_cache: false,
floating: None,
... |
rust_dataset_chunk_518957 | rust_dataset.txt | 518,957 | 512 | ::Terminal(2),
PaneId::Plugin(3)
],
},
terminal_id: Some(1),
client_id: Some(100),
is_cli_client: true,
});
test_client_roundtrip!(ClientToServerMsg::Action {
action: Action::ChangeFloatingPaneCoordinates {
pane_id: PaneId::Terminal... |
rust_dataset_chunk_518958 | rust_dataset.txt | 518,958 | 512 | : Action::SetPaneBorderStyle {
pane_id: PaneId::Terminal(7),
border_style: BorderStyleOverride {
all: Some(LineStyle::Double),
top: Some(LineStyle::Heavy),
right: Some(LineStyle::Dashed),
bottom: Some(LineStyle::HeavyDashed),
... |
rust_dataset_chunk_518959 | rust_dataset.txt | 518,959 | 512 | (Direction::Right),
borderless: Some(true),
border_style: Some(BorderStyleOverride {
left: Some(LineStyle::Heavy),
..Default::default()
}),
},
NewPanePlacement::InPlace {
pane_id_to_replace: Some(PaneId::Terminal(3)),
... |
rust_dataset_chunk_518960 | rust_dataset.txt | 518,960 | 512 | raw_bytes".as_bytes().to_vec(),
is_kitty_keyboard_protocol: false,
});
test_client_roundtrip!(ClientToServerMsg::Key {
key: KeyWithModifier {
bare_key: BareKey::PageDown,
key_modifiers: demo_modifiers_4,
},
raw_bytes: "raw_bytes".as_bytes().to_vec(),
... |
rust_dataset_chunk_518961 | rust_dataset.txt | 518,961 | 512 | bare_key: BareKey::Backspace,
key_modifiers: BTreeSet::new(),
},
raw_bytes: "raw_bytes".as_bytes().to_vec(),
is_kitty_keyboard_protocol: false,
});
test_client_roundtrip!(ClientToServerMsg::Key {
key: KeyWithModifier {
bare_key: BareKey::Delete,
... |
rust_dataset_chunk_518962 | rust_dataset.txt | 518,962 | 512 | _protocol: false,
});
test_client_roundtrip!(ClientToServerMsg::Key {
key: KeyWithModifier {
bare_key: BareKey::NumLock,
key_modifiers: BTreeSet::new(),
},
raw_bytes: "raw_bytes".as_bytes().to_vec(),
is_kitty_keyboard_protocol: false,
});
test_clie... |
rust_dataset_chunk_518963 | rust_dataset.txt | 518,963 | 512 | 4),
key_modifiers: BTreeSet::new(),
},
raw_bytes: "raw_bytes".as_bytes().to_vec(),
is_kitty_keyboard_protocol: false,
});
test_client_roundtrip!(ClientToServerMsg::Key {
key: KeyWithModifier {
bare_key: BareKey::F(5),
key_modifiers: BTreeSet::n... |
rust_dataset_chunk_518964 | rust_dataset.txt | 518,964 | 512 | is_kitty_keyboard_protocol: false,
});
test_client_roundtrip!(ClientToServerMsg::Key {
key: KeyWithModifier {
bare_key: BareKey::F(12),
key_modifiers: BTreeSet::new(),
},
raw_bytes: "raw_bytes".as_bytes().to_vec(),
is_kitty_keyboard_protocol: false... |
rust_dataset_chunk_518965 | rust_dataset.txt | 518,965 | 512 | : false,
top: None,
items: vec![crate::attention::AttentionItem {
pane_id: crate::data::PaneId::Terminal(4),
tab_id: 1,
tab_name: "build".to_owned(),
pane_title: "tests".to_owned(),
attention: crate::attention::PaneA... |
rust_dataset_chunk_518966 | rust_dataset.txt | 518,966 | 512 | ],
initial_state: true,
},
});
test_client_roundtrip!(ClientToServerMsg::Action {
action: Action::ScrollUpByPaneId {
pane_id: PaneId::Terminal(1),
},
terminal_id: Some(1),
client_id: Some(100),
is_cli_client: true,
});
test_client_r... |
rust_dataset_chunk_518967 | rust_dataset.txt | 518,967 | 512 | });
test_client_roundtrip!(ClientToServerMsg::Action {
action: Action::HalfPageScrollDownByPaneId {
pane_id: PaneId::Terminal(1),
},
terminal_id: Some(1),
client_id: Some(100),
is_cli_client: true,
});
test_client_roundtrip!(ClientToServerMsg::Action {
... |
rust_dataset_chunk_518968 | rust_dataset.txt | 518,968 | 512 | 1),
ansi: false,
},
terminal_id: Some(1),
client_id: Some(100),
is_cli_client: true,
});
test_client_roundtrip!(ClientToServerMsg::Action {
action: Action::DumpScreen {
file_path: Some("/path".to_owned()),
include_scrollback: true,
... |
rust_dataset_chunk_518969 | rust_dataset.txt | 518,969 | 512 | {
pane_id: Some(PaneId::Terminal(1)),
name: "test-name".as_bytes().to_vec(),
},
terminal_id: Some(1),
client_id: Some(100),
is_cli_client: true,
});
test_client_roundtrip!(ClientToServerMsg::Action {
action: Action::UndoRenamePaneByPaneId {
... |
rust_dataset_chunk_518970 | rust_dataset.txt | 518,970 | 512 | (1),
client_id: Some(100),
is_cli_client: true,
});
test_client_roundtrip!(ClientToServerMsg::Action {
action: Action::ToggleActiveSyncTabByTabId { id: 2 },
terminal_id: Some(1),
client_id: Some(100),
is_cli_client: true,
});
test_client_roundtrip!(ClientT... |
rust_dataset_chunk_518971 | rust_dataset.txt | 518,971 | 512 | Msg::Action {
action: Action::MoveTabToPosition {
id: 2,
position: u64::MAX,
},
terminal_id: Some(1),
client_id: Some(100),
is_cli_client: true,
});
test_client_roundtrip!(ClientToServerMsg::Action {
action: Action::SetPaneFrameStyle(PaneFr... |
rust_dataset_chunk_518972 | rust_dataset.txt | 518,972 | 512 | 'f', b'f', b'/', b'f', b'f',
b'f', b'f', b'/', b'f', b'f', b'f', b'f', 0x07, 0xff, 0x00,
],
});
test_client_roundtrip!(ClientToServerMsg::HostTerminalThemeChanged {
mode: HostTerminalThemeMode::Dark,
});
test_client_roundtrip!(ClientToServerMsg::HostTerminalThemeChanged {
... |
rust_dataset_chunk_518973 | rust_dataset.txt | 518,973 | 512 | : Box::new(crate::input::terminal::TerminalSettings::from_config(
&window_config
)),
});
test_server_roundtrip!(ServerToClientMsg::RenamedSession {
name: "my-session".to_string(),
});
test_server_roundtrip!(ServerToClientMsg::UnblockCliPipeInput {
pipe_name: "stdout".... |
rust_dataset_chunk_518974 | rust_dataset.txt | 518,974 | 512 | 5 seconds".to_string(),
],
});
test_server_roundtrip!(ServerToClientMsg::SwitchSession {
connect_to_session: ConnectToSession::default(),
});
test_server_roundtrip!(ServerToClientMsg::SwitchSession {
connect_to_session: ConnectToSession {
name: Some("from_the_welcome_... |
rust_dataset_chunk_518975 | rust_dataset.txt | 518,975 | 512 | layout: Some(LayoutInfo::File(
"/path/to/my/file.kdl".to_owned(),
LayoutMetadata {
tabs: vec![],
creation_time: "0".to_owned(),
update_time: "0".to_owned()
}
)),
cwd: Some(Path... |
rust_dataset_chunk_518976 | rust_dataset.txt | 518,976 | 512 | ToClientMsg::SessionEvent {
json: r#"{"event":"session_ending"}"#.to_string(),
});
test_server_roundtrip!(ServerToClientMsg::SessionEvent {
json: String::new(),
});
test_server_roundtrip!(ServerToClientMsg::ForwardQueryToHost {
token: 0,
query_bytes: vec![],
resol... |
rust_dataset_chunk_518977 | rust_dataset.txt | 518,977 | 512 | tab_names: vec!["build".to_owned(), "agents".to_owned()],
contents: "\u{1b}[32m$ cargo test\u{1b}[0m\nok".to_owned(),
pane_count: 3,
connected_clients: 2,
error: Some("partial".to_owned()),
tabs: vec![crate::data::SessionPreviewTab {
name: "bu... |
rust_dataset_chunk_518978 | rust_dataset.txt | 518,978 | 512 | ::Failed,
text: "failed: tests".to_owned(),
since_ms: 15,
}),
},
};
test_server_roundtrip!(ServerToClientMsg::SessionAttention {
attention: crate::attention::SessionAttention {
status: crate::attention::AttentionStatus::NeedsYou,
... |
rust_dataset_chunk_518979 | rust_dataset.txt | 518,979 | 512 | {
pane_id: 3,
is_plugin: true,
tab_position: 1,
}),
tabs: vec![
MobileTabPayload {
position: 0,
name: "Tab #1".to_string(),
active: true,
},
... |
rust_dataset_chunk_518980 | rust_dataset.txt | 518,980 | 512 | original, roundtrip);
}
/// Tests that RenamePaneByPaneId with `pane_id: None` (the active-pane CLI
/// rename case) survives a full wire-level round-trip
/// (Rust → proto struct → bytes → proto struct → Rust).
///
/// The struct-level round-trip in `test_client_roundtrip!` doesn't catch
/// issues with prost's `tags... |
rust_dataset_chunk_518981 | rust_dataset.txt | 518,981 | 512 | ByPaneId(TogglePanePinnedByPaneIdAction { pane_id: None }),
ActionType::TogglePaneInGroupByPaneId(TogglePaneInGroupByPaneIdAction { pane_id: None }),
ActionType::StartRenamePaneByPaneId(StartRenamePaneByPaneIdAction { pane_id: None }),
];
for action_type in without_pane_id {
let describe... |
rust_dataset_chunk_518982 | rust_dataset.txt | 518,982 | 512 | ();
match ClientToServerMsg::try_from(proto).unwrap() {
ClientToServerMsg::PaneMirror { payload } => {
assert_eq!(ViewerMessage::decode(&payload), Ok(message))
},
other => panic!("{:?}", other),
}
}
let source_messages = vec![
SourceMes... |
rust_dataset_chunk_518983 | rust_dataset.txt | 518,983 | 512 | expect("Failed to convert decoded protobuf back to Rust");
assert_eq!(original, roundtrip);
}
#[test]
fn set_resurrect_command_wire_roundtrip() {
assert_action_wire_roundtrip(Action::SetResurrectCommand {
pane_id: PaneId::Terminal(3),
resurrect: Some(crate::input::actions::ResurrectCommand {
... |
rust_dataset_chunk_518984 | rust_dataset.txt | 518,984 | 512 | ", std::process::id(), id));
(dir, path)
}
#[cfg(windows)]
fn new_ipc() -> (IpcGuard, IpcName) {
let id = IPC_COUNTER.fetch_add(1, Ordering::SeqCst);
let name = format!(
"@zellij-test-{}-{}-{}",
std::process::id(),
id,
std::time::SystemTime::now()
.duration_since... |
rust_dataset_chunk_518985 | rust_dataset.txt | 518,985 | 512 | Stream as LocalSocketStream};
LocalSocketStream::connect(name.as_str().to_ns_name::<GenericNamespaced>().unwrap())
}
#[test]
fn client_to_server_message_over_socket() {
let (_guard, name) = new_ipc();
let listener = bind_listener(&name);
let client = std::thread::spawn({
let name = name.clone... |
rust_dataset_chunk_518986 | rust_dataset.txt | 518,986 | 512 | let server = std::thread::spawn(move || {
let stream = listener.incoming().next().unwrap().expect("accept failed");
let mut sender: IpcSenderWithContext<ServerToClientMsg> = IpcSenderWithContext::new(stream);
let mut receiver: IpcReceiverWithContext<ClientToServerMsg> = sender.get_receiver(... |
rust_dataset_chunk_518987 | rust_dataset.txt | 518,987 | 512 | =
IpcReceiverWithContext::new(stream);
let (msg1, _) = receiver.recv_client_msg().expect("missing message 1");
assert!(matches!(msg1, ClientToServerMsg::ConnStatus));
let (msg2, _) = receiver.recv_client_msg().expect("missing message 2");
match msg2 {
ClientToServerMsg::TerminalResize... |
rust_dataset_chunk_518988 | rust_dataset.txt | 518,988 | 512 | ().unwrap().expect("accept failed");
let mut receiver: IpcReceiverWithContext<ClientToServerMsg> =
IpcReceiverWithContext::new(stream);
client.join().expect("client thread panicked");
assert!(
receiver.try_recv_client_msg().is_ok(),
"should receive the sent message"
);
ass... |
rust_dataset_chunk_518989 | rust_dataset.txt | 518,989 | 512 | = new_ipc();
let _listener = bind_listener(&name);
let metadata = std::fs::metadata(&name).expect("metadata failed");
assert!(
metadata.file_type().is_socket(),
"a bound LocalSocketListener path should be identified as a socket"
);
}
#[cfg(unix)]
#[test]
fn is_socket_rejects_regular_f... |
rust_dataset_chunk_518990 | rust_dataset.txt | 518,990 | 512 | name);
}
let result = try_connect(&name);
assert!(
result.is_err(),
"connecting to a dead socket should fail (no listener)"
);
}
#[cfg(unix)]
#[test]
fn socket_directory_enumeration_finds_sockets() {
use interprocess::local_socket::GenericFilePath;
use std::os::unix::fs::FileTy... |
rust_dataset_chunk_518991 | rust_dataset.txt | 518,991 | 512 | _into()
.expect("Failed to convert back from protobuf");
assert_eq!(original, roundtrip);
}};
}
pub(crate) use {test_client_roundtrip, test_server_roundtrip};
--- FILE: zellij/zellij-utils/src/kdl/kdl_layout_parser.rs ---
use crate::input::{
command::RunCommand,
config::ConfigError,
... |
rust_dataset_chunk_518992 | rust_dataset.txt | 518,992 | 512 | file_name: Option<String>,
) -> Self {
KdlLayoutParser {
raw_layout,
tab_templates: HashMap::new(),
pane_templates: HashMap::new(),
default_tab_template: None,
new_tab_template: None,
global_cwd,
file_name: file_name... |
rust_dataset_chunk_518993 | rust_dataset.txt | 518,993 | 512 | "children"
|| property_name == "stacked"
|| property_name == "expanded"
|| property_name == "stack_orientation"
|| property_name == "exclude_from_sync"
|| property_name == "contents_file"
|| property_name == "default_fg"
|| property_na... |
rust_dataset_chunk_518994 | rust_dataset.txt | 518,994 | 512 | || property_name == "x"
|| property_name == "y"
|| property_name == "width"
|| property_name == "height"
|| property_name == "pinned"
|| property_name == "contents_file"
|| property_name == "default_fg"
|| property_name == "... |
rust_dataset_chunk_518995 | rust_dataset.txt | 518,995 | 512 | Err(ConfigError::new_layout_kdl_error(
format!("Template names cannot contain parentheses"),
kdl_node.span().offset(),
kdl_node.span().len(),
))
} else if name
.chars()
.next()
.map(|first_char| first_cha... |
rust_dataset_chunk_518996 | rust_dataset.txt | 518,996 | 512 | ))
} else if let Some(node) = kdl_child_with_name!(kdl_node, "size") {
Err(kdl_parsing_error!(
format!(
"size cannot be bare, it should have a value (eg. 'size 1', or 'size \"50%\"')"
),
node
))
} els... |
rust_dataset_chunk_518997 | rust_dataset.txt | 518,997 | 512 | } else {
Ok(None)
}
}
fn parse_plugin_block(&self, plugin_block: &KdlNode) -> Result<Option<Run>, ConfigError> {
let _allow_exec_host_cmd =
kdl_get_bool_property_or_child_value_with_error!(plugin_block, "_allow_exec_host_cmd")
.unwrap_or(false);
l... |
rust_dataset_chunk_518998 | rust_dataset.txt | 518,998 | 512 | }`) entries
// to prevent diverging behaviour with the keybindings config
}
if let Some(user_config) = kdl_children_nodes!(plugin_block) {
for user_configuration_entry in user_config {
let config_entry_name = kdl_name!(user_configuration_entry);
i... |
rust_dataset_chunk_518999 | rust_dataset.txt | 518,999 | 512 | wd)) => Some(global_cwd.join(tab_cwd)),
(None, Some(tab_cwd)) => Some(tab_cwd.clone()),
(Some(global_cwd), None) => Some(global_cwd.clone()),
(None, None) => None,
})
}
fn parse_path(
&self,
kdl_node: &KdlNode,
name: &'static str,
) -> Resu... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.