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_514600 | rust_dataset.txt | 514,600 | 512 | {
completion.set_exit_status(1);
completion.set_error_message(message.to_owned());
}
},
}
}
}
--- FILE: zellij/zellij-server/src/screen/mirror.rs ---
use super::Screen;
use crate::background_jobs::BackgroundJob;
use crate::pane_mirror::{... |
rust_dataset_chunk_514601 | rust_dataset.txt | 514,601 | 512 | subscribers: HashMap::new(),
next_pin_order: 0,
pinned_panes: HashMap::new(),
resizes_source_pane: true,
tick_at: None,
attached_at: HashMap::new(),
viewed_panes: HashSet::new(),
focused_panes: HashSet::new(),
se... |
rust_dataset_chunk_514602 | rust_dataset.txt | 514,602 | 512 | || !self.pinned_panes.contains_key(&subscriber.pane_id)
|| subscriber.yielded
{
continue;
}
subscriber.yielded = true;
subscriber.lease_until = None;
yielded_any = true;
}
yielded_any
}
p... |
rust_dataset_chunk_514603 | rust_dataset.txt | 514,603 | 512 | );
claims
.entry(subscriber.pane_id)
.and_modify(|current| {
if (candidate.0, candidate.1) > (current.0, current.1) {
*current = candidate;
}
})
.or_insert(candidate);
}
... |
rust_dataset_chunk_514604 | rust_dataset.txt | 514,604 | 512 | size)
.or_else(|| kept.get(&pane_id).copied());
if self.pinned_panes.get(&pane_id).copied() == wanted {
continue;
}
match (host.set_pinned_size(pane_id, wanted), wanted) {
(Some(applied), Some(size)) => {
... |
rust_dataset_chunk_514605 | rust_dataset.txt | 514,605 | 512 | _pinned_size(&mut self, pane_id: PaneId, size: Option<Size>) -> Option<bool> {
self.values_mut()
.find(|tab| tab.has_pane_with_pid(&pane_id))
.map(|tab| tab.set_mirror_pinned_size(pane_id, size))
}
}
pub(crate) fn choose_pins(
subscribers: &HashMap<MirrorSubscriberId, MirrorSubs... |
rust_dataset_chunk_514606 | rust_dataset.txt | 514,606 | 512 | _id).is_some()
}
fn mirror_screen_of(tabs: &mut BTreeMap<usize, Tab>, pane_id: PaneId) -> Option<MirrorScreen> {
tabs.values_mut()
.find_map(|tab| {
tab.get_pane_with_id_mut(pane_id)
.map(|pane| pane.mirror_screen())
})
.flatten()
}
fn change_counter_of(tabs: &B... |
rust_dataset_chunk_514607 | rust_dataset.txt | 514,607 | 512 | };
let Some(snapshot) = mirror_screen_of(&mut self.tabs, pane_id) else {
outbox.close(MirrorClosedReason::Rejected);
return;
};
if !outbox.send(SourceMessage::Attached {
version: PANE_MIRROR_VERSION,
capabilities: capabilities(),
pane_... |
rust_dataset_chunk_514608 | rust_dataset.txt | 514,608 | 512 | (change), Some(snapshot)) => self
.pane_mirrors
.subscribers
.get_mut(&subscriber_id)
.map(|subscriber| send_frame(subscriber, change, &snapshot))
.unwrap_or(true),
_ => {
self.remove_mirror_subscribers(vec![(
... |
rust_dataset_chunk_514609 | rust_dataset.txt | 514,609 | 512 | }
}
pub(crate) fn mirror_input(&mut self, subscriber_id: MirrorSubscriberId, input: MirrorInput) {
let Some(subscriber) = self.pane_mirrors.subscribers.get(&subscriber_id) else {
return;
};
if subscriber.view_only || subscriber.parked {
return;
}
... |
rust_dataset_chunk_514610 | rust_dataset.txt | 514,610 | 512 | = vec![];
let gone = MirrorRemoval::Closed(MirrorClosedReason::PaneClosed);
for (subscriber_id, subscriber) in self.pane_mirrors.subscribers.iter_mut() {
let Some(change) = change_counter_of(&self.tabs, subscriber.pane_id) else {
removals.push((*subscriber_id, gone));
... |
rust_dataset_chunk_514611 | rust_dataset.txt | 514,611 | 512 | , resizes_source_pane: bool) {
if self.pane_mirrors.resizes_source_pane == resizes_source_pane {
return;
}
self.pane_mirrors.resizes_source_pane = resizes_source_pane;
self.apply_mirror_pins_and_render();
}
fn apply_mirror_pins_and_render(&mut self) {
if self... |
rust_dataset_chunk_514612 | rust_dataset.txt | 514,612 | 512 | _viewed_elsewhere(pane_id.into(), false, at);
}
self.pane_mirrors.viewed_panes = viewed;
self.flush_attention(true);
}
pub(crate) fn apply_mirror_pins(&mut self) -> bool {
let local_input: HashSet<PaneId> = self
.tabs
.values_mut()
.flat_map(|... |
rust_dataset_chunk_514613 | rust_dataset.txt | 514,613 | 512 | );
let delay = deadline.saturating_duration_since(now) + Duration::from_millis(1);
let _ = self
.bus
.senders
.send_to_background_jobs(BackgroundJob::MirrorTickAfter {
delay_ms: delay.as_millis().min(u64::MAX as u128) as u64,
});
}
... |
rust_dataset_chunk_514614 | rust_dataset.txt | 514,614 | 512 | prompt::PromptPlacement;
const POPUP_REVEAL_FALLBACK_MS: u64 = 1000;
pub const CONTEXT_MENU_PLUGIN_ALIAS: &str = "context-menu";
pub const SESSION_MANAGER_PLUGIN_ALIAS: &str = "session-manager";
pub const SESSION_CARD_COLS: usize = 72;
pub const SESSION_CARD_ROWS: usize = 13;
pub const SESSION_MANAGER_ROLE: &str = "... |
rust_dataset_chunk_514615 | rust_dataset.txt | 514,615 | 512 | = entries
.iter()
.filter_map(|entry| match entry {
ContextMenuEntry::Item { label, actions, .. } => {
let shortcut = context_menu_shortcut(keybinds, base_mode, actions)
.map(|shortcut| zellij_utils::graphemes::display_width(&shortcut) + 1)
... |
rust_dataset_chunk_514616 | rust_dataset.txt | 514,616 | 512 | _enabled(&mut self, context_menu_enabled: bool) {
self.context_menu_enabled = context_menu_enabled;
for tab in self.tabs.values_mut() {
tab.update_context_menu_enabled(context_menu_enabled);
}
}
pub fn update_context_menu_config(
&mut self,
client_id: ClientId... |
rust_dataset_chunk_514617 | rust_dataset.txt | 514,617 | 512 | ers
.send_to_plugin(PluginInstruction::Unload(*plugin_id));
}
}
pub fn scroll_popup(&mut self, client_id: ClientId, scroll: PopupScroll) -> bool {
let Ok(tab) = self.get_active_tab(client_id) else {
return false;
};
match scroll {
PopupScro... |
rust_dataset_chunk_514618 | rust_dataset.txt | 514,618 | 512 | (_) => None,
};
match closed {
Some(plugin_id) => {
let _ = self
.bus
.senders
.send_to_plugin(PluginInstruction::Unload(plugin_id));
self.forget_context_menu_unless_open(client_id);
s... |
rust_dataset_chunk_514619 | rust_dataset.txt | 514,619 | 512 | }
self.unload_popups(&closed_plugin_ids);
let info_popups = self
.tabs
.get_mut(&old_tab_id)
.map(|tab| tab.take_info_popups(client_id))
.unwrap_or_default();
if let Some(tab) = self.tabs.get_mut(&new_tab_id) {
tab.adopt_popups(... |
rust_dataset_chunk_514620 | rust_dataset.txt | 514,620 | 512 | if let Some(client_id) = tab.close_popup_with_plugin_id(plugin_id) {
closed_for_client = Some(client_id);
break;
}
}
match closed_for_client {
Some(client_id) => {
self.forget_context_menu_unless_open(client_id);
se... |
rust_dataset_chunk_514621 | rust_dataset.txt | 514,621 | 512 | loating: request.is_floating,
tab_index: Some(tab.position),
tab_id: Some(tab.id),
tab_count,
line: request.position.line.0.max(0) as usize,
column: request.position.column.0,
client_id,
paste_shortcut: None,
};
self.ope... |
rust_dataset_chunk_514622 | rust_dataset.txt | 514,622 | 512 | };
let context = ContextMenuContext {
kind,
pane_id,
pane_is_floating: false,
tab_index,
tab_id,
tab_count,
line,
column,
client_id,
paste_shortcut: None,
};
self.open_context... |
rust_dataset_chunk_514623 | rust_dataset.txt | 514,623 | 512 | .default_mode_info)
.clone();
let base_mode = mode_info.base_mode.unwrap_or(self.default_mode_info.mode);
mode_info.base_mode = Some(base_mode);
let (width, height) = estimated_context_menu_size(&entries, &keybinds, base_mode);
let anchor = Position::new(context.line as i32, ... |
rust_dataset_chunk_514624 | rust_dataset.txt | 514,624 | 512 | ClientId,
run_plugin_or_alias: RunPluginOrAlias,
placement: PopupPlacement,
behavior: PopupBehavior,
anchor_pane: Option<PaneId>,
width: usize,
height: usize,
initial_events: Vec<Event>,
) {
if behavior.menu {
self.close_menu_popups_for_cl... |
rust_dataset_chunk_514625 | rust_dataset.txt | 514,625 | 512 | (pane_id)));
}
let in_caller_tab = connected
.iter()
.copied()
.filter(|client_id| self.active_tab_ids.get(client_id) == Some(&tab_id));
if let Some(client_id) = self.most_recently_active(in_caller_tab) {
return Some((cl... |
rust_dataset_chunk_514626 | rust_dataset.txt | 514,626 | 512 | ;
},
};
let (pipe_placement, explicit_pane) = match placement {
None => (PipePopupPlacement::Pane, None),
Some(PromptPlacement::Pane(pane_id)) => {
(PipePopupPlacement::Pane, Some(PaneId::from(pane_id)))
},
Some(PromptPlacement:... |
rust_dataset_chunk_514627 | rust_dataset.txt | 514,627 | 512 | self.tabs
.values()
.find_map(|tab| tab.get_pane_with_id(pane_id))
});
let caller_title = caller_pane
.map(|pane| pane.current_title())
.unwrap_or_default();
let caller_tab_name = caller_pane_id.and_then(|pane_id| {
... |
rust_dataset_chunk_514628 | rust_dataset.txt | 514,628 | 512 | ) => PopupPlacement::Corner(corner),
None => PopupPlacement::CenteredIn(bounds),
},
};
let behavior = if focused {
PopupBehavior::prompt()
} else {
PopupBehavior::info()
}
.capturing_all_keys(capture_all_keys)
.on_outsid... |
rust_dataset_chunk_514629 | rust_dataset.txt | 514,629 | 512 | pane_id).is_some())
.unwrap_or(false)
})
.unwrap_or(true);
let tab_id = match self.active_tab_ids.get(&client_id) {
Some(current_tab_id) if !behavior.focused => *current_tab_id,
_ => tab_id,
};
let client_is_still_on_tab =
... |
rust_dataset_chunk_514630 | rust_dataset.txt | 514,630 | 512 | ) {
return;
}
let Ok(tab) = self.get_active_tab(client_id) else {
return;
};
let open_browser = tab.floating_plugin_for_location(SESSION_MANAGER_PLUGIN_ALIAS);
let browser_hidden = !tab.are_floating_panes_visible();
match tab.popup_for_location(cli... |
rust_dataset_chunk_514631 | rust_dataset.txt | 514,631 | 512 | _err() {
self.pending_session_card = Some(client_id);
return;
}
self.pending_session_card = None;
self.request_session_card(client_id, false);
}
fn request_session_card(&mut self, client_id: ClientId, focused: bool) {
if focused {
self.open_ses... |
rust_dataset_chunk_514632 | rust_dataset.txt | 514,632 | 512 | ,
false,
None,
run_plugin_or_alias,
Some(tab_index),
None,
client_id,
content,
None,
None,
false,
Some(true),
Some(coordinates),
None,
));
}
pub fn ... |
rust_dataset_chunk_514633 | rust_dataset.txt | 514,633 | 512 | coordinates: Option<zellij_utils::data::FloatingPaneCoordinates>,
) -> bool {
self.convert_popup_to_floating_pane(plugin_id, coordinates, None)
}
fn convert_popup_to_floating_pane(
&mut self,
plugin_id: u32,
coordinates: Option<zellij_utils::data::FloatingPaneCoordina... |
rust_dataset_chunk_514634 | rust_dataset.txt | 514,634 | 512 | illis(
SWAP_LAYOUT_NOTIFICATION_MS,
));
let _ = self
.bus
.senders
.send_to_plugin(PluginInstruction::PromptRequest {
caller: PromptCaller {
plugin_id: SERVER_NOTICE_CALLER_ID,
client_... |
rust_dataset_chunk_514635 | rust_dataset.txt | 514,635 | 512 | map(|tab| tab.position),
_ => None,
};
let wanted_index = tab_index
.or(tab_of_wanted_pane)
.or(active_tab_index)
.unwrap_or(0);
let connected_clients = self.active_tab_ids.keys().len();
let pane_client = client_id.unwrap_or(1);
let... |
rust_dataset_chunk_514636 | rust_dataset.txt | 514,636 | 512 | _or_default(),
None,
),
(None, _) => (String::new(), None),
};
(contents, pane_count, shown_pane, anchor_line)
},
None => (String::new(), 0, None, None),
};
zellij_utils::data::Session... |
rust_dataset_chunk_514637 | rust_dataset.txt | 514,637 | 512 | );
}
#[test]
fn paste_and_open_in_a_window_are_only_offered_where_they_work() {
let entries = vec![
ContextMenuEntry::item(
"Paste",
vec![ContextMenuAction::ClickedPane(
ClickedPaneAction::PasteFromClipboard,
)],
... |
rust_dataset_chunk_514638 | rust_dataset.txt | 514,638 | 512 | Direction::Up,
))],
),
ContextMenuEntry::item("Detach", vec![Action::Detach.into()]),
];
assert_eq!(
entries_available_to_plugins(entries),
vec![ContextMenuEntry::item(
"Detach",
vec![Action::Detach.into()]
... |
rust_dataset_chunk_514639 | rust_dataset.txt | 514,639 | 512 | 0-based index in tab bar).
//! Changes when tabs are moved or closed. Used for user-facing operations.
//!
//! # Terminology Convention
//!
//! - **"id"**: Always means stable identifier
//! - **"position"**: Always means 0-based display order
//! - **"index"**: Synonym for "position" (used in public/plugin APIs)
//!... |
rust_dataset_chunk_514640 | rust_dataset.txt | 514,640 | 512 | Info, Styling, TabInfo,
ThemeHue, WebSharing,
};
use zellij_utils::errors::prelude::*;
use zellij_utils::input::actions::Action;
use zellij_utils::input::command::RunCommand;
use zellij_utils::input::config::Config;
use zellij_utils::input::context_menu::ContextMenuConfig;
use zellij_utils::input::keybinds::{shortc... |
rust_dataset_chunk_514641 | rust_dataset.txt | 514,641 | 512 | ImageStore},
panes::sixel::SixelImageStore,
panes::PaneId,
plugins::{
DumpSessionLayoutResponse, PluginId, PluginInstruction, PluginRenderAsset, PromptCaller,
},
pty::{get_default_shell, ClientTabIndexOrPaneId, PtyInstruction, VteBytes},
pty_writer::PtyWriteInstruction,
tab::{GuestCh... |
rust_dataset_chunk_514642 | rust_dataset.txt | 514,642 | 512 | _parts = Vec::new();
for kv in metadata.split(':') {
if let Some(namespaced_value) = kv.strip_prefix("i=p") {
if let Some(dot_pos) = namespaced_value.find('.') {
let flags_part = namespaced_value.get(..dot_pos).unwrap_or_default();
let original_id = namespaced_va... |
rust_dataset_chunk_514643 | rust_dataset.txt | 514,643 | 512 | a closure on it
///
/// If no active tab can be found, an error is logged instead.
///
/// # Parameters
///
/// - screen: An instance of `Screen` to operate on
/// - client_id: The client_id, usually taken from the `ScreenInstruction` that's being processed
/// - closure: A closure satisfying `|tab: &mut Tab| -> ()` O... |
rust_dataset_chunk_514644 | rust_dataset.txt | 514,644 | 512 | log::error!("No client ids in screen found");
};
},
}
};
// Same as above, but with an added `?` for when the closure returns a `Result` type.
($screen:ident, $client_id:ident, $closure:expr, ?) => {
match $screen.get_active_tab_mut($client_id)... |
rust_dataset_chunk_514645 | rust_dataset.txt | 514,645 | 512 | (active_tab, Some(client_id)).non_fatal();
},
Err(err) => Err::<(), _>(err).non_fatal(),
}
} else {
match $screen.get_indexed_tab_mut(0) {
Some(first_tab) => {
$clo... |
rust_dataset_chunk_514646 | rust_dataset.txt | 514,646 | 512 | <usize>,
completion: Option<NotificationEnd>,
},
WriteCharacter(
Option<KeyWithModifier>,
Vec<u8>,
bool,
ClientId,
Option<NotificationEnd>,
), // bool ->
// is_kitty_keyboard_protocol
KeyToPopup(
KeyWithModifier,
Vec<u8>,
bool,
... |
rust_dataset_chunk_514647 | rust_dataset.txt | 514,647 | 512 | pane_id: PaneId,
response_channel: crossbeam::channel::Sender<Option<PaneInfo>>,
},
GetTabInfo {
tab_id: usize,
response_channel: crossbeam::channel::Sender<Option<TabInfo>>,
},
EditScrollback(ClientId, bool, Option<NotificationEnd>),
GetPaneScrollback {
pane_id: Pan... |
rust_dataset_chunk_514648 | rust_dataset.txt | 514,648 | 512 | >),
UndoRenamePane(ClientId, Option<NotificationEnd>),
NewTab(
Option<PathBuf>,
Option<TerminalAction>,
Option<TiledPaneLayout>,
Vec<FloatingPaneLayout>,
Option<String>,
// `None` falls back to `Screen::default_layout`'s swap layouts.
(
Option<... |
rust_dataset_chunk_514649 | rust_dataset.txt | 514,649 | 512 | ),
MoveTabRight(ClientId, Option<NotificationEnd>),
GoToTabWithId(usize, Option<ClientId>, Option<NotificationEnd>),
CloseTabWithId(usize, Option<NotificationEnd>),
RenameTabWithId(usize, Vec<u8>, Option<NotificationEnd>),
BreakPanesToTabWithId {
pane_ids: Vec<PaneId>,
tab_id: usize,... |
rust_dataset_chunk_514650 | rust_dataset.txt | 514,650 | 512 | response_channel: crossbeam::channel::Sender<NestedSessionKeybindsResponse>,
},
GuestModalChoice {
client_id: ClientId,
pane_id: PaneId,
outcome: GuestModalOutcome,
},
ConfirmQuit(ClientId),
SetOnQuit(zellij_utils::input::options::OnQuit),
CloseDialogueAnswer {
c... |
rust_dataset_chunk_514651 | rust_dataset.txt | 514,651 | 512 | "Last one wins": these compete naively with
/// terminal-driven notifications via the dedupe in
/// `update_host_terminal_theme_mode`.
SetDarkTheme(Option<NotificationEnd>),
SetLightTheme(Option<NotificationEnd>),
ToggleTheme(Option<NotificationEnd>),
ChangeMode(
InputMode,
Opti... |
rust_dataset_chunk_514652 | rust_dataset.txt | 514,652 | 512 | retain_existing_plugin_panes
bool, // apply_only_to_focused_tab
ClientId,
Option<NotificationEnd>,
),
OverrideLayoutComplete(
Vec<TabOverrideResult>, // results for each tab
bool, // retain_existing_terminal_panes
bool, ... |
rust_dataset_chunk_514653 | rust_dataset.txt | 514,653 | 512 | 32 - plugin_id
ProgressPluginLoadingOffset(u32), // u32 - plugin id
RequestStateUpdateForPlugins,
LaunchOrFocusPlugin(
RunPluginOrAlias,
bool,
bool,
bool,
bool,
Option<PaneId>,
bool,
ClientId,
Option<NotificationEnd>,
... |
rust_dataset_chunk_514654 | rust_dataset.txt | 514,654 | 512 | , // close replaced pane
ClientTabIndexOrPaneId,
Option<NotificationEnd>, // completion signal
),
SerializeLayoutForResurrection,
RenameSession(String, ClientId, Option<NotificationEnd>), // String -> new name
UpdateSessionNameDraft(Vec<u8>, ClientId, Option<NotificationEnd>),
UndoRe... |
rust_dataset_chunk_514655 | rust_dataset.txt | 514,655 | 512 | host_notification_protocol: HostNotificationProtocol,
nested_session_handling: NestedSessionHandling,
dangerously_enable_paste_buffer_read: bool,
},
RerunCommandPane(u32, Option<NotificationEnd>), // u32 - terminal pane id
ResizePaneWithId(ResizeStrategy, PaneId),
EditScrollbackForPaneW... |
rust_dataset_chunk_514656 | rust_dataset.txt | 514,656 | 512 | inned(ClientId, Option<NotificationEnd>),
SetFloatingPanePinned(PaneId, bool),
StackPanes(Vec<PaneId>, ClientId, Option<NotificationEnd>),
ChangeFloatingPanesCoordinates(
Vec<(PaneId, FloatingPaneCoordinates)>,
bool,
Option<NotificationEnd>,
),
TogglePaneBorderless(PaneId, Op... |
rust_dataset_chunk_514657 | rust_dataset.txt | 514,657 | 512 | Notification(bool),
ToggleBars(Vec<String>, ClientId, Option<NotificationEnd>),
HideBars(Vec<String>, ClientId, Option<NotificationEnd>),
ShowBars(ClientId, Option<NotificationEnd>),
HideBarByPaneId(PaneId, ClientId, Option<NotificationEnd>),
SetHiddenBarsNotification(bool),
SetModeHintsWhenBars... |
rust_dataset_chunk_514658 | rust_dataset.txt | 514,658 | 512 | width: usize,
height: usize,
anchor_pane: Option<PaneId>,
},
OpenPipePopup {
pipe_id: String,
run_plugin_or_alias: RunPluginOrAlias,
caller_pane_id: Option<PaneId>,
placement: zellij_utils::data::PipePopupPlacement,
focused: bool,
capture_a... |
rust_dataset_chunk_514659 | rust_dataset.txt | 514,659 | 512 | scrollback: Option<usize>,
ansi: bool,
},
NotifyPaneClosedToSubscribers {
pane_id: zellij_utils::data::PaneId,
},
SubscribeToEvents {
client_id: ClientId,
filter: zellij_utils::session_events::CliEventFilter,
},
NotifyEventSubscribers(zellij_utils::session_events... |
rust_dataset_chunk_514660 | rust_dataset.txt | 514,660 | 512 | CLI variants
ScrollUpWithPaneId(PaneId, Option<NotificationEnd>),
ScrollDownWithPaneId(PaneId, Option<NotificationEnd>),
ScrollToTopWithPaneId(PaneId, Option<NotificationEnd>),
ScrollToBottomWithPaneId(PaneId, Option<NotificationEnd>),
PageScrollUpWithPaneId(PaneId, Option<NotificationEnd>),
Pa... |
rust_dataset_chunk_514661 | rust_dataset.txt | 514,661 | 512 | MoveTabToPosition(usize, usize, Option<NotificationEnd>),
SetSoftKeyboard {
client_id: ClientId,
on: bool,
},
FocusHostSession(ClientId, Option<NotificationEnd>),
FocusGuestSession(ClientId, Option<NotificationEnd>),
ToggleHostFullscreen(ClientId, Option<NotificationEnd>),
Atten... |
rust_dataset_chunk_514662 | rust_dataset.txt | 514,662 | 512 | ScreenInstruction::KeyToPopup(..) => ScreenContext::KeyToPopup,
ScreenInstruction::Resize(.., strategy, _) => match strategy {
ResizeStrategy {
resize: Resize::Increase,
direction,
..
} => match direction... |
rust_dataset_chunk_514663 | rust_dataset.txt | 514,663 | 512 | ::Exit => ScreenContext::Exit,
ScreenInstruction::SessionEnding => ScreenContext::SessionEnding,
ScreenInstruction::ClearScreen(..) => ScreenContext::ClearScreen,
ScreenInstruction::DumpScreen(..) => ScreenContext::DumpScreen,
ScreenInstruction::DumpLayout(..) => ScreenCo... |
rust_dataset_chunk_514664 | rust_dataset.txt | 514,664 | 512 | UiFullscreen
},
ScreenInstruction::TogglePaneFrames(..) => ScreenContext::TogglePaneFrames,
ScreenInstruction::ToggleStackListOrientation(..) => {
ScreenContext::ToggleStackListOrientation
},
ScreenInstruction::ToggleStackListOrientationWithPan... |
rust_dataset_chunk_514665 | rust_dataset.txt | 514,665 | 512 | BackgroundColor
},
ScreenInstruction::TerminalForegroundColor(..) => {
ScreenContext::TerminalForegroundColor
},
ScreenInstruction::TerminalColorRegisters(..) => ScreenContext::TerminalColorRegisters,
ScreenInstruction::SetKittyGraphicsSupport ... |
rust_dataset_chunk_514666 | rust_dataset.txt | 514,666 | 512 | Theme(..) => ScreenContext::ToggleTheme,
ScreenInstruction::ChangeMode(..) => ScreenContext::ChangeMode,
ScreenInstruction::ChangeModeForAllClients(..) => {
ScreenContext::ChangeModeForAllClients
},
ScreenInstruction::ToggleActiveSyncTab(..) => ScreenConte... |
rust_dataset_chunk_514667 | rust_dataset.txt | 514,667 | 512 | Layout,
ScreenInstruction::OverrideLayoutComplete(..) => ScreenContext::OverrideLayoutComplete,
ScreenInstruction::QueryTabNames(..) => ScreenContext::QueryTabNames,
ScreenInstruction::NewTiledPluginPane(..) => ScreenContext::NewTiledPluginPane,
ScreenInstruction::NewFloa... |
rust_dataset_chunk_514668 | rust_dataset.txt | 514,668 | 512 | ::RenameSession(..) => ScreenContext::RenameSession,
ScreenInstruction::UpdateSessionNameDraft(..) => ScreenContext::UpdateSessionNameDraft,
ScreenInstruction::UndoRenameSession(..) => ScreenContext::UndoRenameSession,
ScreenInstruction::ListClientsMetadata(..) => ScreenContext::List... |
rust_dataset_chunk_514669 | rust_dataset.txt | 514,669 | 512 | PaneIdFullscreen,
ScreenInstruction::SetMobileRenderPreferences { .. } => {
ScreenContext::SetMobileRenderPreferences
},
ScreenInstruction::TogglePaneEmbedOrEjectForPaneId(..)
| ScreenInstruction::MovePaneBetweenLayersForPaneId(..) => {
Scr... |
rust_dataset_chunk_514670 | rust_dataset.txt | 514,670 | 512 | (..) => ScreenContext::SetPaneCollapsed,
ScreenInstruction::InterceptKeyPresses(..) => ScreenContext::InterceptKeyPresses,
ScreenInstruction::ClearKeyPressesIntercepts(..) => {
ScreenContext::ClearKeyPressesIntercepts
},
ScreenInstruction::TogglePaneIdInGr... |
rust_dataset_chunk_514671 | rust_dataset.txt | 514,671 | 512 | ,
ScreenInstruction::GlobalAttentionUpdate(..) => ScreenContext::GlobalAttentionUpdate,
ScreenInstruction::ClientSessionHistory { .. }
| ScreenInstruction::UpdateClientSessionHistory { .. } => {
ScreenContext::ClientSessionHistory
},
ScreenInst... |
rust_dataset_chunk_514672 | rust_dataset.txt | 514,672 | 512 | ::ClearPluginHighlights,
ScreenInstruction::ClearAllPluginHighlights(..) => ScreenContext::ClearPluginHighlights,
ScreenInstruction::DesktopNotificationResponse(..) => {
ScreenContext::DesktopNotificationResponse
},
ScreenInstruction::SubscribeToPaneRender... |
rust_dataset_chunk_514673 | rust_dataset.txt | 514,673 | 512 | PageScrollDownWithPaneId(..) => {
ScreenContext::PageScrollDownWithPaneId
},
ScreenInstruction::HalfPageScrollUpWithPaneId(..) => {
ScreenContext::HalfPageScrollUpWithPaneId
},
ScreenInstruction::HalfPageScrollDownWithPaneId(..) => {
... |
rust_dataset_chunk_514674 | rust_dataset.txt | 514,674 | 512 | {
ScreenContext::NextSwapLayoutWithTabId
},
ScreenInstruction::ApplyTiledSwapLayoutWithTabId(..) => {
ScreenContext::ApplyTiledSwapLayoutWithTabId
},
ScreenInstruction::ApplyFloatingSwapLayoutWithTabId(..) => {
ScreenContex... |
rust_dataset_chunk_514675 | rust_dataset.txt | 514,675 | 512 | portions of the UI) have been fully loaded before the tab is first rendered (with
// a sensible timeout of 100ms)
#[derive(Debug, Clone)]
pub struct RenderBlocker {
blocking_plugins: HashMap<u32, Instant>,
#[cfg_attr(test, allow(dead_code))]
timeout_ms: u64,
}
impl RenderBlocker {
pub fn new(timeout_m... |
rust_dataset_chunk_514676 | rust_dataset.txt | 514,676 | 512 | ::PaneId, Vec<String>>,
ansi: bool,
}
#[derive(Debug, Clone, Copy, PartialEq, Eq)]
pub(crate) enum NestedGuestChoice {
Zoom,
Descend,
Dismissed,
}
impl NestedGuestChoice {
fn enters_passthrough(&self) -> bool {
matches!(self, NestedGuestChoice::Zoom | NestedGuestChoice::Descend)
}
}
#... |
rust_dataset_chunk_514677 | rust_dataset.txt | 514,677 | 512 | phasize_first(4),
ChoiceItem::labeled(CLOSE_CANCEL, "Cancel").emphasize_first(6),
])
.remember(CLOSE_REMEMBER_LABEL)
.padded()
.title("Close this window?")
.placement(PromptPlacement::Center)
.capture_all_keys(true)
}
const CLOSE_REMEMBER_LABEL: &str = "Always do this";
fn close_choice... |
rust_dataset_chunk_514678 | rust_dataset.txt | 514,678 | 512 | /// An optional maximal amount of panes allowed per [`Tab`] in this [`Screen`] instance.
max_panes: Option<usize>,
/// A map between this [`Screen`]'s tabs and their ID/key.
tabs: BTreeMap<usize, Tab>,
last_single_pane_tab_names: HashMap<usize, Option<String>>,
pixel_dimensions: PixelDimensions,... |
rust_dataset_chunk_514679 | rust_dataset.txt | 514,679 | 512 | _configs: HashMap<ClientId, ContextMenuConfig>,
default_mousebinds: Arc<Mousebinds>,
configured_default_shell: Option<PathBuf>,
client_mousebinds: HashMap<ClientId, Arc<Mousebinds>>,
open_context_menus: HashMap<ClientId, (ContextMenuContext, Vec<ContextMenuEntry>)>,
last_client_input: HashMap<Client... |
rust_dataset_chunk_514680 | rust_dataset.txt | 514,680 | 512 | // the below are the configured values - the ones that will be set if and when the web server
// is brought online
web_server_ip: IpAddr,
web_server_port: u16,
render_blocker: RenderBlocker,
watcher_clients: HashMap<ClientId, WatcherState>,
followed_client_id: Option<ClientId>,
watcher_foll... |
rust_dataset_chunk_514681 | rust_dataset.txt | 514,681 | 512 | next_close_prompt_id: u64,
guest_ascend_keys: HashMap<PaneId, Vec<KeyWithModifier>>,
guest_capabilities: HashMap<PaneId, Vec<NestedSessionCapability>>,
guest_last_mode: HashMap<PaneId, GuestModeReport>,
pending_keybinds_requests: HashMap<u64, PendingKeybindsRequest>,
next_keybinds_request_id: u6... |
rust_dataset_chunk_514682 | rust_dataset.txt | 514,682 | 512 | , u64>,
pane_mirrors: mirror::PaneMirrors,
mirror_connector: Arc<dyn zellij_utils::pane_mirror::MirrorConnector>,
live_views: crate::pane_mirror::SharedLiveViews,
}
#[derive(Debug, Clone, PartialEq, Eq)]
pub enum SessionPaneCommand {
MarkSeen(zellij_utils::data::PaneId),
Write(zellij_utils::data::P... |
rust_dataset_chunk_514683 | rust_dataset.txt | 514,683 | 512 | synthesizes an empty reply for itself so the in-flight slot
/// releases and queued forwards continue to drain.
///
/// This recovers the worst-case where the connected client doesn't
/// understand `ServerToClientMsg::ForwardQueryToHost` (an old client
/// against a new server) — without it the slot would deadlock an... |
rust_dataset_chunk_514684 | rust_dataset.txt | 514,684 | 512 | _without_typed_input_does_not_answer_it() {
assert!(!answers_typed_input(None, Instant::now()));
}
#[test]
fn only_the_first_output_after_a_keystroke_answers_it() {
let typed_at = Instant::now();
let mut typed_input = TypedInput::default();
typed_input.record(7, typed_at);
... |
rust_dataset_chunk_514685 | rust_dataset.txt | 514,685 | 512 | bool,
web_sharing: WebSharing,
advanced_mouse_actions: bool,
osc133_command_selection: bool,
word_separators: String,
mouse_scroll_resize: bool,
scroll_mode_sync: bool,
mouse_hover_effects: bool,
mouse_hover_tips: bool,
visual_bell: bool,
... |
rust_dataset_chunk_514686 | rust_dataset.txt | 514,686 | 512 | ::new(),
global_last_active_tab_id: 0,
tabs: BTreeMap::new(),
last_single_pane_tab_names: HashMap::new(),
terminal_emulator_colors: Rc::new(RefCell::new(Palette::default())),
terminal_emulator_color_codes: Rc::new(RefCell::new(HashMap::new())),
tab... |
rust_dataset_chunk_514687 | rust_dataset.txt | 514,687 | 512 | ),
watcher_clients: HashMap::new(),
followed_client_id: None,
watcher_followed_content: None,
cached_layouts: vec![],
cached_layout_errors: vec![],
pane_render_subscribers: HashMap::new(),
event_subscribers: Default::default(),
... |
rust_dataset_chunk_514688 | rust_dataset.txt | 514,688 | 512 | ![],
host_descended: false,
host_terminal_theme_mode: None,
last_host_reported_theme_mode: None,
theme_policy: ThemePolicy::Auto,
configured_explicit_theme_hue: None,
host_theme_dark_styling: None,
host_theme_light_styling: None,
... |
rust_dataset_chunk_514689 | rust_dataset.txt | 514,689 | 512 | (&mut self, id: usize) -> Option<&mut Tab> {
self.tabs.get_mut(&id)
}
/// Gets a mutable tab by its display position (0-based).
fn get_tab_by_position_mut(&mut self, position: usize) -> Option<&mut Tab> {
self.tabs.values_mut().find(|t| t.position == position)
}
/// Gets the stable... |
rust_dataset_chunk_514690 | rust_dataset.txt | 514,690 | 512 | _previous_tab)
.or_default()
.push(client_id);
continue;
}
}
self.active_tab_ids.insert(client_id, first_tab_index);
self.tabs
.get_mut(&first_tab_index)
.with_context(... |
rust_dataset_chunk_514691 | rust_dataset.txt | 514,691 | 512 | None ==> move all clients
let drained_clients = self
.get_indexed_tab_mut(source_tab_index)
.map(|t| t.drain_connected_clients(clients_to_move));
if let Some(client_mode_info_in_source_tab) = drained_clients {
let arriving_client_ids: Vec<ClientId> = client_mode_inf... |
rust_dataset_chunk_514692 | rust_dataset.txt | 514,692 | 512 | ,
should_change_pane_focus: Option<Direction>,
update_mode_infos: bool,
client_id: ClientId,
) -> Result<()> {
let err_context = || {
format!(
"Failed to switch to active tab at position {new_tab_pos} for client id: {client_id:?}"
)
};
... |
rust_dataset_chunk_514693 | rust_dataset.txt | 514,693 | 512 | _tab)) => {
new_tab.focus_pane_on_edge(direction, client_id);
},
_ => {},
}
self.update_client_tab_focus(client_id, new_tab_index);
}
if let So... |
rust_dataset_chunk_514694 | rust_dataset.txt | 514,694 | 512 | Tab`] to the next tab.
pub fn switch_tab_next(
&mut self,
should_change_pane_focus: Option<Direction>,
update_mode_infos: bool,
client_id: ClientId,
) -> Result<()> {
let err_context = || format!("failed to switch to next tab for client {client_id}");
let client_... |
rust_dataset_chunk_514695 | rust_dataset.txt | 514,695 | 512 | 1), None, true, client_id)
}
pub fn go_to_tab_name(&mut self, name: String, client_id: ClientId) -> Result<bool> {
self.switch_active_tab_name(name, client_id)
}
fn close_tab_by_id(&mut self, tab_id: usize) -> Result<()> {
let err_context = || format!("failed to close tab at index {tab... |
rust_dataset_chunk_514696 | rust_dataset.txt | 514,696 | 512 | rain_connected_clients(None);
self.move_clients_from_closed_tab(client_mode_infos_in_closed_tab)
.with_context(err_context)?;
self.move_suppressed_panes_from_closed_tab(suppressed_panes)
.with_context(err_context)?;
let visible_tab_indices: HashSet<usi... |
rust_dataset_chunk_514697 | rust_dataset.txt | 514,697 | 512 | .get(tab_id))
.map(|tab| tab.size)
.unwrap_or_else(|| self.size_for_client(Some(client_id)))
}
fn clients_are_larger_than_tab(&self, tab_id: usize, client_ids: &[ClientId]) -> bool {
let Some(tab_size) = self.tabs.get(&tab_id).map(|tab| tab.size) else {
return false;... |
rust_dataset_chunk_514698 | rust_dataset.txt | 514,698 | 512 | .iter()
.filter(|(_client_id, prefs)| !prefs.fit)
.map(|(client_id, _)| *client_id)
.collect();
let mut tab_ids: HashSet<usize> = HashSet::new();
for client_id in fit_disabled_clients {
if let Some(tab_id) = self.active_tab_ids.get(&client_id).... |
rust_dataset_chunk_514699 | rust_dataset.txt | 514,699 | 512 | };
if tab.is_fullscreen_active() {
if tab.fullscreen_pane_id() == Some(pane_id) {
if tab.fullscreen_covers_ui() {
return;
}
tab.toggle_pane_no_ui_fullscreen(pane_id);
return;
}
tab.uns... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.