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_514700
rust_dataset.txt
514,700
512
, MobileWebPrefs { single_pane, fit, fullscreened_pane, }, ); if let Some(&tab_id) = self.active_tab_ids.get(&client_id) { self.recompute_tab_size(tab_id)?; } self.render(None)?; Ok(()) } ...
rust_dataset_chunk_514701
rust_dataset.txt
514,701
512
// one but the tab is no longer fullscreen on it, another actor deliberately left // fullscreen, so single-pane yields rather than fighting for it. A changed focus target // (own tap, own new pane, closed pane) is instead re-asserted against the new pane. let target_tab_fullscreen_ok = ...
rust_dataset_chunk_514702
rust_dataset.txt
514,702
512
PixelDimensions, ) -> bool { let previous_character_cell_size = *self.character_cell_size.borrow(); self.pixel_dimensions.merge(pixel_dimensions); if let Some(character_cell_size) = self.pixel_dimensions.character_cell_size { *self.character_cell_size.borrow_mut() = Some(charact...
rust_dataset_chunk_514703
rust_dataset.txt
514,703
512
_kitty_host_state.borrow_mut().remove(&client_id) { state.release_media(); } } fn kitty_host_support_aggregate(&self) -> Option<KittyHostSupport> { if !self.support_kitty_graphics_protocol { return Some(KittyHostSupport::ProtocolDisabled); } let capabilit...
rust_dataset_chunk_514704
rust_dataset.txt
514,704
512
clients.entry(client_id).or_default(); state.enabled = true; state.reset_viewport(size); } if let Some(watcher_state) = self.watcher_clients.get_mut(&client_id) { watcher_state.set_force_render(); } for tab in self.tabs.values_mut() { tab....
rust_dataset_chunk_514705
rust_dataset.txt
514,705
512
_force_render(); } } } fn pace_structured_payloads_shifted(&mut self, client_id: ClientId) { if let Some(state) = self .structured_render_clients .borrow_mut() .get_mut(&client_id) { let size = state.size; state.res...
rust_dataset_chunk_514706
rust_dataset.txt
514,706
512
ace_structured_payloads_shifted(client_id); abandoned.retain(|abandoned_id| *abandoned_id != client_id); if let Some(watcher_state) = self.watcher_clients.get_mut(&client_id) { watcher_state.set_force_render(); } } for client_id in abandoned { ...
rust_dataset_chunk_514707
rust_dataset.txt
514,707
512
_state(&mut self, client_id: ClientId) { self.structured_render_clients .borrow_mut() .remove(&client_id); self.clipboard_paste_clients.remove(&client_id); } pub fn update_clipboard_paste_support( &mut self, client_id: ClientId, supported: bool, ...
rust_dataset_chunk_514708
rust_dataset.txt
514,708
512
xparse_color(background_color_instruction.as_bytes()) { let bg_palette_color = PaletteColor::Rgb((r, g, b)); self.terminal_emulator_colors.borrow_mut().bg = bg_palette_color; } } pub fn update_terminal_foreground_color(&mut self, foreground_color_instruction:...
rust_dataset_chunk_514709
rust_dataset.txt
514,709
512
= self.next_forward_token; // Skip over the reserved sentinel (0) on wrap; allocate a fresh // u32 for every forward. self.next_forward_token = self.next_forward_token.wrapping_add(1); if self.next_forward_token == STARTUP_SENTINEL_TOKEN { self.next_forward_token = 1; ...
rust_dataset_chunk_514710
rust_dataset.txt
514,710
512
-> Result<()> { if let Some(PendingForwardEntry { pane_id, query }) = self.pending_clipboard_forwards.remove(&token) { let payload = if reply_bytes.is_empty() { query.empty_reply_bytes() } else { reply_bytes }; ...
rust_dataset_chunk_514711
rust_dataset.txt
514,711
512
&mut self, token: u32, pane_id: PaneId, query: crate::host_query::HostQuery, ) { let query_bytes = query.to_query_bytes(); self.pending_forwarded_queries .insert(token, PendingForwardEntry { pane_id, query }); self.forward_in_flight_token = Some(token); ...
rust_dataset_chunk_514712
rust_dataset.txt
514,712
512
// reply landed first (releasing the slot AND dispatching the // next queued forward), the late timeout's empty reply for the // already-cleared token must be a no-op — releasing the slot // again would clobber the new in-flight forward. The same // logic also rejects duplicate ...
rust_dataset_chunk_514713
rust_dataset.txt
514,713
512
: Vec<u8>, ) -> Result<()> { let terminal_id = match pane_id { PaneId::Terminal(id) => id, PaneId::Plugin(_) => { // Plugin panes do not forward queries — dropping is // the correct behaviour matching the existing // forwarding path's p...
rust_dataset_chunk_514714
rust_dataset.txt
514,714
512
direction { None => { self.unset_nested_fullscreen_if_active(pane_id); for client_id in clients_focused_on_pane { self.nested_guest_choices .insert((client_id, pane_id), NestedGuestChoice::Di...
rust_dataset_chunk_514715
rust_dataset.txt
514,715
512
.guest_last_mode.insert(pane_id, report.clone()); let _ = self .bus .senders .send_to_plugin(PluginInstruction::Update(vec![( None, None, Event::NestedSessionModeUpdate { ...
rust_dataset_chunk_514716
rust_dataset.txt
514,716
512
pending.deadline > now); let terminal_id = match pane_id { PaneId::Terminal(terminal_id) => terminal_id, PaneId::Plugin(_) => { return self.answer_keybinds_request( reply_to, pane_id, Err(NestedSessionKeybindsEr...
rust_dataset_chunk_514717
rust_dataset.txt
514,717
512
, result: NestedSessionKeybindsResponse, ) { match pending.reply_to { KeybindsReplyTo::Plugin(response_channel) => { let _ = response_channel.send(result); }, KeybindsReplyTo::Host { client_id, request_id, ...
rust_dataset_chunk_514718
rust_dataset.txt
514,718
512
![( None, None, Event::NestedSessionEnded { pane_id: pane_id.into(), reason, }, )])); } fn answer_keybinds_request_from_host(&mut self, client_id: ClientId, request_id: u64) { if !self ...
rust_dataset_chunk_514719
rust_dataset.txt
514,719
512
} fn own_mode_for_host(&self, client_id: ClientId) -> (InputMode, Option<InputMode>) { let (mode, base_mode) = self.current_mode_for_client(client_id); let base_mode = base_mode .or(self.default_mode_info.base_mode) .unwrap_or(self.default_mode_info.mode); (mode,...
rust_dataset_chunk_514720
rust_dataset.txt
514,720
512
let payload = nested_session::encode_payload(&NestedSessionMessage::GuestModeUpdate { mode: report.mode, base_mode: report.base_mode, session_path: report.session_path, keybinds_generation: report.keybinds_generation, }); let _ = self ....
rust_dataset_chunk_514721
rust_dataset.txt
514,721
512
.clone()); let announce_ack = NestedSessionMessage::AnnounceAck { ancestry, capabilities: vec![ NestedSessionCapability::NestedControl, NestedSessionCapability::HintReporting, ], descend_keys: self.own_descend_shortcut(), };...
rust_dataset_chunk_514722
rust_dataset.txt
514,722
512
self.set_client_dimmed(client_id, false, None); let _ = self .bus .senders .send_to_server(ServerInstruction::KeyPassthroughChanged( client_id, pane_id, pane_id, false, None, false, )); } self.rep...
rust_dataset_chunk_514723
rust_dataset.txt
514,723
512
pub fn has_close_prompt(&self, client_id: ClientId) -> bool { self.close_prompts.contains_key(&client_id) } fn quit_client(&self, client_id: ClientId) { let _ = self .bus .senders .send_to_server(ServerInstruction::ClientExit(client_id, None)); } fn...
rust_dataset_chunk_514724
rust_dataset.txt
514,724
512
PromptResult, ) { if self.close_prompts.get(&client_id) != Some(&request_id) { return; } self.close_prompts.remove(&client_id); let (outcome, always) = close_prompt_outcome(&result); if always { self.remember_on_quit(client_id, outcome); } ...
rust_dataset_chunk_514725
rust_dataset.txt
514,725
512
); } self.apply_nested_guest_fullscreen(pane_id, true); self.sync_nested_guest_fullscreen_state(); if let Some(via_client_id) = self.nested_via_client_id { let payload = nested_session::encode_payload( &NestedSes...
rust_dataset_chunk_514726
rust_dataset.txt
514,726
512
Ask | NestedSessionHandling::Never => {}, } } fn focus_guest_session(&mut self, client_id: ClientId) { let focused_pane_id = match self.get_active_pane_id(&client_id) { Some(pane_id) => pane_id, None => return, }; let is_live_guest = self.tabs.values().an...
rust_dataset_chunk_514727
rust_dataset.txt
514,727
512
_guest { self.notify_plugins_nested_session_ended(pane_id, NestedSessionEndReason::Exited); } let _ = self .bus .senders .send_to_background_jobs(BackgroundJob::StopNestedGuestPing(pane_id)); self.unset_nested_fullscreen_if_active(pane_id); ...
rust_dataset_chunk_514728
rust_dataset.txt
514,728
512
continue; } match self.nested_session_handling { NestedSessionHandling::Ask => { for tab in self.tabs.values_mut() { if tab.has_pane_with_pid(&pane_id) { tab.set_guest_modal_on_pane(pane_id, &[client_id]); ...
rust_dataset_chunk_514729
rust_dataset.txt
514,729
512
(NestedGuestChoice::Zoom) | None => None, } } fn sync_guest_choice_indicator(&mut self, client_id: ClientId, pane_id: PaneId) { let indicator = self.guest_choice_indicator_for(client_id, pane_id); for tab in self.tabs.values_mut() { if tab.has_pane_with_pid(&pane_id) { ...
rust_dataset_chunk_514730
rust_dataset.txt
514,730
512
client_id) .map(|mode_info| mode_info.nested_ascend_keys != ascend_keys) .unwrap_or_else(|| !ascend_keys.is_empty()); if !changed && !ascend_keys_changed { return; } self.ensure_client_keybinds(client_id); let mode_info = self .mode_info ...
rust_dataset_chunk_514731
rust_dataset.txt
514,731
512
.guest_ascend_keys .get(&pane_id) .cloned() .unwrap_or_default(); let dimmed_client_ids: Vec<ClientId> = self.dimmed_clients.iter().copied().collect(); let mut clients_to_update: Vec<(ClientId, ModeInfo)> = vec![]; for client_id in dimmed_client_id...
rust_dataset_chunk_514732
rust_dataset.txt
514,732
512
ested_ancestry.clone(); let host_fullscreen = if self.host_fullscreen { Some(true) } else { None }; let session_ascended = if !ancestry.is_empty() && !self.host_descended { Some(true) } else { None }; let descend_key...
rust_dataset_chunk_514733
rust_dataset.txt
514,733
512
for terminal_id in self.nested_guest_terminal_ids() { let _ = self .bus .senders .send_to_pty_writer(PtyWriteInstruction::Write(frame.clone(), terminal_id, None)); } } fn apply_nested_guest_fullscreen(&mut self, pane_id: PaneId, fullscreen: b...
rust_dataset_chunk_514734
rust_dataset.txt
514,734
512
_state(&mut self) { let mut actual: HashMap<PaneId, bool> = HashMap::new(); for tab in self.tabs.values() { let fullscreen_pane_id = tab.fullscreen_pane_id(); let covers_ui = tab.fullscreen_covers_ui(); for pane_id in tab.nested_guest_pane_ids() { if !...
rust_dataset_chunk_514735
rust_dataset.txt
514,735
512
= nested_session::encode_payload(&NestedSessionMessage::FocusHost { direction: Some(direction), }); let _ = self .bus .senders .send_to_server(ServerInstruction::EmitNestedSessionFrameToClient( client_id, payload, )); } ...
rust_dataset_chunk_514736
rust_dataset.txt
514,736
512
_guests(); }, NestedSessionMessage::FocusGained { from_direction: Some(direction), } => { self.set_host_descended(true); let old_pane_id = self.get_active_pane_id(&client_id); if let Ok(tab) = self.get_active_tab_mut(cli...
rust_dataset_chunk_514737
rust_dataset.txt
514,737
512
}, } } /// Build a reply for `query` from whatever host state Zellij has /// cached, or an empty `Vec` if nothing relevant is cached. The /// classification happened at intercept time (Grid produces a /// [`HostQuery`]), so this method is pure structural dispatch — /// no re-parsing of...
rust_dataset_chunk_514738
rust_dataset.txt
514,738
512
out } else { Vec::new() } }, HostQuery::ClipboardContent { .. } => query.empty_reply_bytes(), // Should not reach here: ColorPaletteMode short-circuits in // `forward_host_query` before any cache-fall...
rust_dataset_chunk_514739
rust_dataset.txt
514,739
512
.sync_attention_visibility(); self.sync_plugin_visibility(); self.sync_live_views(); self.apply_mirror_pins(); self.deliver_to_mirrors(); // Track whether non-watcher output was dirty for conditional watcher rendering let non_watcher_output_was_dirty; let mut ta...
rust_dataset_chunk_514740
rust_dataset.txt
514,740
512
self.active_tab_ids.values().copied().collect(); for tab in self.tabs.values_mut() { let is_active = active_tab_ids_snapshot.contains(&tab.id); let (new_panes, tab_newly_set) = tab.check_and_handle_bell_notifications(is...
rust_dataset_chunk_514741
rust_dataset.txt
514,741
512
_forwarded_osc7 .get(&client_id) .and_then(|s| s.as_deref()); if current_osc7 != last { if let Some(uri) = current_osc7 { output.add_post_vte_instruction_to_client( cli...
rust_dataset_chunk_514742
rust_dataset.txt
514,742
512
.tabs .get(&focused_tab_index_of_followed_client_id) .map(|tab| tab.size); let followed_content = (followed_client_id, followed_content_size); if self.watcher_followed_content != Some(followed_content) { self.watcher_followed_...
rust_dataset_chunk_514743
rust_dataset.txt
514,743
512
watcher's output with size constraints (cropping and padding handled inside) let mut serialized_output = watcher_specific_output .serialize_with_size(Some(watcher_state.size()), followed_content_size) .context(err_context)?; ...
rust_dataset_chunk_514744
rust_dataset.txt
514,744
512
.keys().next().copied() } pub fn has_no_client_to_act_for(&self, client_id: ClientId) -> bool { self.get_active_tab(client_id).is_err() && self.get_first_client_id().is_none() } pub fn report_no_client_to_act_for( &self, client_id: ClientId, message: String, com...
rust_dataset_chunk_514745
rust_dataset.txt
514,745
512
return; }; if self.pane_is_held_focused_by_another_client(&client_id, pane_id) { return; } if let Ok(tab) = self.get_active_tab_mut(client_id) { tab.send_host_focus_event_to_pane(pane_id, focused); } } fn pane_is_held_focused_by_anothe...
rust_dataset_chunk_514746
rust_dataset.txt
514,746
512
{ let host_terminal_env = self .client_host_terminal_env .get(&client_id) .cloned() .unwrap_or_default(); self.client_notification_protocols.insert( client_id, NotificationProtocol::resolve(host_noti...
rust_dataset_chunk_514747
rust_dataset.txt
514,747
512
.render(None); } /// Clear bell notification for the currently focused pane of the given client. /// Also cancels any running flash jobs if applicable. pub fn clear_bell_for_focused_pane(&mut self, client_id: ClientId) { let tab_id_and_pane_id: Option<(usize, PaneId)> = self.get_act...
rust_dataset_chunk_514748
rust_dataset.txt
514,748
512
ell_now_cleared { let _ = self .bus .senders .send_to_background_jobs(BackgroundJob::StopFlashTabBell(tab_id)); } } } } } pub fn show_floating_pane...
rust_dataset_chunk_514749
rust_dataset.txt
514,749
512
_stdout_message("true".to_string()); } } else { if let Some(c) = completion.as_mut() { c.set_error_message("false".to_string()); } } }, } drop(completion); Ok(()) }...
rust_dataset_chunk_514750
rust_dataset.txt
514,750
512
(), self.advanced_mouse_actions, self.mouse_scroll_resize, self.mouse_hover_effects, self.mouse_hover_tips, self.focus_follows_mouse, self.mouse_click_through, self.web_server_ip, self.web_server_port, ); for...
rust_dataset_chunk_514751
rust_dataset.txt
514,751
512
CreatedReason::TabNotFound, ); } for plugin_id in new_plugin_ids.values().flatten() { self.close_pane_that_was_not_created_without_reporting( PaneId::Plugin(*plugin_id), None, PaneNotCreatedReason::TabNot...
rust_dataset_chunk_514752
rust_dataset.txt
514,752
512
up(); // move the relevant clients out of the current tab and place them in the new one let drained_clients = if should_change_client_focus { if self.session_is_mirrored { let client_mode_infos_in_source_tab = if let Ok(active_tab) = self.get_active_tab_m...
rust_dataset_chunk_514753
rust_dataset.txt
514,753
512
.with_context(err_context)?; let client_has_since_disconnected = self.recently_disconnected_clients.contains(&client_id); if !self.active_tab_ids.contains_key(&client_id) && !client_has_since_disconnected { self.add_client(client_id, is_web_client) .with_context(...
rust_dataset_chunk_514754
rust_dataset.txt
514,754
512
(|_| attach_to_first_tab_on_tiled_surface) { first_tab_index } else if let Some((_first_client, first_active_tab_index)) = self.active_tab_ids.iter().next() { *first_active_tab_index } else if self.tabs.contains_key(&self.global_last_active_tab_id) { ...
rust_dataset_chunk_514755
rust_dataset.txt
514,755
512
_ancestry.is_empty() || !self.host_descend_keys.is_empty() { self.update_all_clients_nesting_mode_info(); } if let Some(mode) = self.host_terminal_theme_mode { let _ = self.bus .senders .send_to_server(ServerInstruction::Hos...
rust_dataset_chunk_514756
rust_dataset.txt
514,756
512
(client_id) == self.followed_client_id { // Try to find another regular (non-watcher) client self.followed_client_id = self .connected_clients .borrow() .keys() .copied() .find(|id| !self.watcher_clients.contains_key...
rust_dataset_chunk_514757
rust_dataset.txt
514,757
512
_id); self.background_plugin_subscriptions .retain(|(_plugin_id, c_id), _subscriptions| c_id != &client_id); self.last_forwarded_osc7.remove(&client_id); self.client_host_focused.remove(&client_id); self.client_notification_protocols.remove(&client_id); self.client_ho...
rust_dataset_chunk_514758
rust_dataset.txt
514,758
512
} pub fn add_watcher_client(&mut self, client_id: ClientId) -> Result<()> { // Initialize with a default size - will be updated when we receive the actual size let default_size = Size { rows: 24, cols: 80 }; // Reasonable default self.watcher_clients .insert(client_id, Watch...
rust_dataset_chunk_514759
rust_dataset.txt
514,759
512
i == &tab.id), panes_to_hide: tab.panes_to_hide_count(), is_fullscreen_active: tab.is_fullscreen_active(), is_sync_panes_active: tab.is_sync_panes_active(), are_floating_panes_visible: tab.are_floating_panes_visible(), other_focused_client...
rust_dataset_chunk_514760
rust_dataset.txt
514,760
512
panes_to_hide: tab.panes_to_hide_count(), is_fullscreen_active: tab.is_fullscreen_active(), is_sync_panes_active: tab.is_sync_panes_active(), are_floating_panes_visible: tab.are_floating_panes_visible(), other_focused_client_slots: self ...
rust_dataset_chunk_514761
rust_dataset.txt
514,761
512
)); } } if !plugin_updates.is_empty() { self.bus .senders .send_to_plugin(PluginInstruction::Update(plugin_updates)) .context("failed to update pane state")?; } Ok(pane_manifest) } fn report...
rust_dataset_chunk_514762
rust_dataset.txt
514,762
512
Sort by position (display order) tab_infos.sort_by_key(|t| t.position); Ok(tab_infos) } fn get_current_tab_info(&self, client_id: ClientId) -> Result<Option<TabInfo>> { match self.active_tab_ids.get(&client_id) { Some(active_tab_id) => Ok(self.get_tab_info(*active_tab_id))...
rust_dataset_chunk_514763
rust_dataset.txt
514,763
512
_pending_selectable_panes(&mut self) { if self.pending_selectable_panes.is_empty() { return; } let pending: Vec<(PaneId, bool)> = self.pending_selectable_panes.drain().collect(); for (pane_id, selectable) in pending { let tab = self .tabs ...
rust_dataset_chunk_514764
rust_dataset.txt
514,764
512
self.layout_dir.clone(), &self.default_layout_name, ); self.cached_layouts = layouts; self.cached_layout_errors = errors; } #[cfg(test)] { self.cached_layouts = vec![]; self.cached_la...
rust_dataset_chunk_514765
rust_dataset.txt
514,765
512
.resurrectable_sessions_cache .iter() .map(|(n, d)| (n.clone(), *d)) .collect(); self.bus .senders .send_to_plugin(PluginInstruction::Update(vec![( None, None, Event::SessionUpdate(live_sessions, resurre...
rust_dataset_chunk_514766
rust_dataset.txt
514,766
512
_output_activity .get(&pane_id) .map(|instant| now.saturating_duration_since(*instant).as_secs()) .or_else(|| activity.get(&pane_id).copied()) .unwrap_or_default(); panes.push(MobilePanePayload { tab_posi...
rust_dataset_chunk_514767
rust_dataset.txt
514,767
512
.unwrap_or(false) }) .unwrap_or(false); let prefs = self.mobile_web_prefs.get(&client_id).copied(); let active_pane_is_fullscreen = self .get_active_tab(client_id) .ok() .map(|tab| tab.is_fullscreen_active()) ...
rust_dataset_chunk_514768
rust_dataset.txt
514,768
512
.clone()), None); self.bus .senders .send_to_plugin(PluginInstruction::LogLayoutToHd(session_layout_metadata)) .with_context(err_context)?; Ok(()) } pub fn update_session_infos( &mut self, new_session_infos: BTreeMap<String, SessionInfo>, ...
rust_dataset_chunk_514769
rust_dataset.txt
514,769
512
(tab) = self.tabs.get_mut(&tab_id) { tab.prev_name = tab.name.clone(); tab.name = String::new(); self.rename_tab_targets.insert(client_id, tab_id); self.log_and_report_session_state().non_fatal(); } } fn update_rename_target_pane_name(&mut self, buf: Vec<u...
rust_dataset_chunk_514770
rust_dataset.txt
514,770
512
::graphemes::pop_cluster(&mut tab.name); }, c => { tab.name .push_str(&clean_string_from_control_and_linebreak(c)); }, } } return self .log_and_report_s...
rust_dataset_chunk_514771
rust_dataset.txt
514,771
512
.name != active_tab.prev_name { active_tab.name = active_tab.prev_name.clone(); self.log_and_report_session_state() .context("failed to undo renaming of active tab")?; } }, ...
rust_dataset_chunk_514772
rust_dataset.txt
514,772
512
.tabs .values() .find(|t| t.position == other_tab_pos) .map(|t| t.id) else { log::error!( "Failed to find tab to switch to at position: {}", other_tab_pos ); return; }; if active_tab_id == o...
rust_dataset_chunk_514773
rust_dataset.txt
514,773
512
.log_and_report_session_state() .context("failed to move tab to the right")?; }, Err(err) => Err::<(), _>(err).with_context(err_context).non_fatal(), } Ok(()) } pub fn move_tab_by_id(&mut self, tab_id: usize, direction: Direction) -> Result<bool> { ...
rust_dataset_chunk_514774
rust_dataset.txt
514,774
512
<InputMode>, client_id: ClientId, ) -> Result<()> { self.ensure_client_keybinds(client_id); let mut mode_info = self .mode_info .get(&client_id) .cloned() .unwrap_or_else(|| self.default_mode_info.clone()); let previous_mode = mode_info...
rust_dataset_chunk_514775
rust_dataset.txt
514,775
512
_active_pane_or_floating_pane_mut(client_id) { active_pane.store_pane_name(); } } } self.style = mode_info.style; self.propagate_mode_info(mode_info, client_id)?; if let Some(error_text) = session_rename_error { ...
rust_dataset_chunk_514776
rust_dataset.txt
514,776
512
Result<(), String>> { if let Err(error_text) = zellij_utils::sessions::validate_session_name(&name) { return Ok(Err(error_text)); } let (_, resurrectable_sessions) = crate::background_jobs::scan_session_list_default_dirs( &self.session_name, &[], &...
rust_dataset_chunk_514777
rust_dataset.txt
514,777
512
_tab_ids.keys().copied().collect(); for client_id in connected_client_ids { if let Some(os_input) = &mut self.bus.os_input { let _ = os_input.send_to_client( client_id, ServerToClientMsg::RenamedSession { name: name.clone() }, )...
rust_dataset_chunk_514778
rust_dataset.txt
514,778
512
binds, client_id: ClientId) { self.default_keybinds = new_keybinds.clone(); if self.connected_clients_contains(&client_id) { self.client_keybinds.insert(client_id, new_keybinds); } } fn ensure_client_keybinds(&mut self, client_id: ClientId) { if !self.client_keybinds...
rust_dataset_chunk_514779
rust_dataset.txt
514,779
512
senders .send_to_server(ServerInstruction::ChangeMode(client_id, new_mode, None)) .with_context(|| format!("failed to sync scroll mode on focus for client {client_id}")) } fn active_pane_is_scrolled(&self, client_id: ClientId) -> bool { self.get_active_tab(client_id) ...
rust_dataset_chunk_514780
rust_dataset.txt
514,780
512
including suppressed ones so they can decide to show themselves if let Some(active_tab_id) = self.active_tab_ids.get(&client_id) { if let Some(tab) = self.tabs.get(active_tab_id) { plugin_ids.extend(tab.get_plugin_ids_including_suppressed()); for popup_plugin_id in t...
rust_dataset_chunk_514781
rust_dataset.txt
514,781
512
{ active_tab .move_focus_left(client_id) .and_then(|success| { if !success { if self.tabs.len() == 1 { self.bubble_focus_to_host(client_id, Direction::Left...
rust_dataset_chunk_514782
rust_dataset.txt
514,782
512
.context("failed to toggle tabs")?; self.render(None) } pub fn focus_plugin_pane( &mut self, run_plugin: &RunPluginOrAlias, should_float: bool, move_to_focused_tab: bool, should_be_in_place: bool, client_id: ClientId, completion_tx: &mut Option<N...
rust_dataset_chunk_514783
rust_dataset.txt
514,783
512
// TODO: also should_be_in_place } else { new_active_tab.hide_floating_panes(); new_active_tab.add_tiled_pane( plugin_pane_to_move_to_active_tab, pane_id, false, Some(client_id), ...
rust_dataset_chunk_514784
rust_dataset.txt
514,784
512
un_command_pane_with_id( &mut self, terminal_pane_id: u32, completion_tx: Option<NotificationEnd>, ) -> bool { for tab in self.tabs.values_mut() { if tab.has_pane_with_pid(&PaneId::Terminal(terminal_pane_id)) { return tab.rerun_terminal_pane_with_id(termin...
rust_dataset_chunk_514785
rust_dataset.txt
514,785
512
_layout.swap_floating_layouts.clone(), ); if let Err(e) = self.new_tab(tab_index, swap_layouts, None, Some(client_id)) { self.return_pane_to_tab(source_tab_id, active_pane, pane_location); return Err(e).with_context(err_context); } let Some...
rust_dataset_chunk_514786
rust_dataset.txt
514,786
512
pass None instead of the client_id we have because we do not need to // necessarily trigger a relayout for this tab let pane_location = tab.pane_location(&pane_id); if let Some(pane) = tab.extract_pane(pane_id, true).take() { extracted_panes.push((tab...
rust_dataset_chunk_514787
rust_dataset.txt
514,787
512
NewTab( None, default_shell, Some(tiled_panes_layout), floating_panes_layout, tab_index, None, // initial_panes false, // block_on_first_terminal should_change_focus_to_new_tab, (client_id, is_web_client), ...
rust_dataset_chunk_514788
rust_dataset.txt
514,788
512
active_pane, active_pane_id, None, true, Some(client_id), )?; } else { new_active_tab.hide_floating_panes(); new_active_tab.add_tiled_pane( active_pane, ...
rust_dataset_chunk_514789
rust_dataset.txt
514,789
512
_mut(tab_index) { let tab_size = new_active_tab.size; for (_source_tab_id, pane_location, mut pane) in extracted_panes { let pane_id = pane.pid(); if matches!(pane_location, PaneLocation::Floating { .. }) { let floating_pane_coordinates = Float...
rust_dataset_chunk_514790
rust_dataset.txt
514,790
512
.or_else(|| self.tabs.values().next()) .map(|t| t.id); let tab_id = if self.tabs.contains_key(&tab_id) { Some(tab_id) } else { fallback_tab_id }; match tab_id.and_then(|tab_id| self.tabs.get_mut(&tab_id)) { Some(tab) => tab.retu...
rust_dataset_chunk_514791
rust_dataset.txt
514,791
512
let is_first_run = true; tab.hold_pane(new_pane_id, None, is_first_run, hold_for_command) } }; match client_id_tab_index_or_pane_id { ClientTabIndexOrPaneId::ClientId(client_id) | ClientTabIndexOrPaneId::ClientIdNoFocus(client_id) => { ...
rust_dataset_chunk_514792
rust_dataset.txt
514,792
512
, pane_id: &PaneId) -> bool { self.tabs.values().any(|tab| tab.has_pane_with_pid(pane_id)) } fn close_pane_that_was_not_created( &mut self, pid: PaneId, completion: Option<NotificationEnd>, reason: PaneNotCreatedReason, ) { self.close_pane_that_was_not_created...
rust_dataset_chunk_514793
rust_dataset.txt
514,793
512
aneId::Terminal(pid)) .map(|pane| pane.current_title()); title_changed = title_before != title_after; answers_typed_input = tab.output_answers_typed_input(pid, Instant::now()); } break; } } if tit...
rust_dataset_chunk_514794
rust_dataset.txt
514,794
512
: PaneId) { if let PaneId::Terminal(_) = pid { self.pane_ids_never_created.insert(pid); while self.pane_ids_never_created.len() > MAX_REMEMBERED_PANES_NEVER_CREATED { self.pane_ids_never_created.pop_first(); } } } fn pane_will_never_be_created(...
rust_dataset_chunk_514795
rust_dataset.txt
514,795
512
tabs .iter_mut() .find(|(_, t)| t.position == tab_index_of_pane_id_to_replace) { Some(tab) if suppress_replaced_pane => tab.1.suppress_pane_and_replace_with_other_pane( pane_id_to_replace, extracted_pane_from_other_tab, None, ...
rust_dataset_chunk_514796
rust_dataset.txt
514,796
512
_ui; self.arrow_fonts = should_support_arrow_fonts; // global configuration self.style.colors = theme; self.default_mode_info.update_theme(theme); self.default_mode_info .update_rounded_corners(rounded_corners); self.default_mode_info .update_bord...
rust_dataset_chunk_514797
rust_dataset.txt
514,797
512
self.tabs.values_mut() { tab.update_theme(theme); tab.update_rounded_corners(rounded_corners); tab.update_border_styles(border_style, floating_border_style); tab.update_default_shell(default_shell.clone()); tab.update_default_editor(self.default_editor.clone(...
rust_dataset_chunk_514798
rust_dataset.txt
514,798
512
mut self, mode: HostTerminalThemeMode) -> Result<()> { let err_context = || "Failed to update host terminal theme mode".to_string(); // dedupe if self.host_terminal_theme_mode == Some(mode) { return Ok(()); } self.host_terminal_theme_mode = Some(mode); // re...
rust_dataset_chunk_514799
rust_dataset.txt
514,799
512
_rerender(client_id); } } for tab in self.tabs.values_mut() { tab.update_input_modes().with_context(err_context)?; } } else { log::warn!( "host theme auto-switch enabled but resolved s...