Skip to content

Commit 06cfaba

Browse files
authored
Merge branch 'zellij-org:main' into sync
2 parents 5e80fde + 6a1baaf commit 06cfaba

37 files changed

+553
-173
lines changed

.github/ISSUE_TEMPLATE/blank_issue.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,10 @@
11
---
22
name: Blank Issue
33
about: Create a blank issue.
4+
title: ''
5+
labels: ''
6+
assignees: ''
7+
48
---
9+
10+

.github/ISSUE_TEMPLATE/bug_report.md

Lines changed: 36 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,21 @@
11
---
22
name: "\U0001F41B Bug Report"
3-
about: "If something isn't working as expected."
3+
about: If something isn't working as expected.
4+
title: ''
45
labels: bug
6+
assignees: ''
7+
58
---
6-
Thank you for taking the time to file this issue! Please follow the instructions and fill in the missing parts below the instructions, if it is meaningful. Try to be brief and concise.
79

8-
**In Case of Graphical or Performance Issues**
10+
<!-- Please choose the relevant section, follow the instructions and delete the other sections:
11+
12+
1. Graphical issue inside a terminal pane (eg. something does not look as it should or as it looks outside of Zellij)
13+
2. Issues with the Zellij UI / behavior
14+
15+
** Please note: comparisons of desired behavior to tmux are usually not relevant. tmux and Zellij are two extremely different programs that do things very differently. Zellij is not, nor does it try to be, a tmux clone. Please try to refrain from such comparisons. **
16+
-->
17+
18+
# 1. Graphical issue inside a terminal pane (eg. something does not look as it should)
919

1020
1. Delete the contents of `/tmp/zellij-1000/zellij-log`, ie with `cd /tmp/zellij-1000/` and `rm -fr zellij-log/` (`/tmp/` is `$TMPDIR/` on OSX)
1121
2. Run `zellij --debug`
@@ -18,12 +28,30 @@ Please attach the files that were created in `/tmp/zellij-1000/zellij-log/` to t
1828
**Basic information**
1929

2030
`zellij --version`:
31+
2132
`stty size`:
22-
`uname -av` or `ver`(Windows):
2333

24-
List of programs you interact with as, `PROGRAM --version`: output cropped meaningful, for example:
25-
`nvim --version`: NVIM v0.5.0-dev+1299-g1c2e504d5 (used the appimage release)
26-
`alacritty --version`: alacritty 0.7.2 (5ac8060b)
34+
`uname -av` or `ver`(Windows):
2735

28-
**Further information**
36+
## Further information
2937
Reproduction steps, noticeable behavior, related issues, etc
38+
39+
# 2. Issues with the Zellij UI / behavior
40+
<!-- Please find a minimal reproduction.
41+
42+
If you have a complex setup that causes an issue, try to troubleshoot and narrow the problem down to as minimal a reproduction as possible. Remove as many parts of the equation as you can.
43+
44+
If you are unsure what to do, you are welcome to ask for help either in the issue itself or in one of our community chats (Discord / Matrix). We will be happy to try and assist or suggest directions, but please note that the responsibility to troubleshoot the issue and find the problem is ultimately on your shoulders.
45+
46+
You're the expert on your system and we believe you are in the best position to troubleshoot it. Thank you for understanding.
47+
48+
Example of a good issue report: "The `default_tab_template` layout node does not work when resurrecting sessions".
49+
50+
Example of an issue report that needs work before being submitted: "Zellij randomly crashes without an error when I use it with the attached script".
51+
-->
52+
53+
## Issue description
54+
55+
## Minimal reproduction
56+
57+
## Other relevant information
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
---
2+
name: Feature request
3+
about: Suggest an idea for this project
4+
title: ''
5+
labels: ''
6+
assignees: ''
7+
8+
---
9+
10+
<!--
11+
12+
Note on new features: while Zellij tries to be as user friendly as possible, it must also be friendly to its maintainers. We take great care in considering which features should be included in the core Zellij functionality - because each such feature means more maintenance overhead for the project.
13+
14+
On the other hand, we know our users care about the program a great deal and would like to see it improve. For this reason, we try to make an effort to allow users to develop their desired new features as Zellij plugins (https://zellij.dev/documentation/plugins). Please consider whether your feature can be a plugin itself, and if not - try to think which APIs you need in order to make it possible. A feature request for a plugin API will likely be given higher priority than one for a Zellij core feature.
15+
16+
** Note on comparisons to tmux: Zellij is not, nor does it try to be, a tmux clone. While we appreciate that many people use it as a tmux alternative and are missing their favorite features - this is not what we do here. There are often native alternatives to tmux features that Zellij does differently. We would encourage you to look into those alternatives rather than try to make it work exactly like tmux. A good place to start would be our FAQ: https://zellij.dev/documentation/faq
17+
18+
We believe each program has its strengths and weaknesses, and hope that users would want to use Zellij for what it can do, rather than trying to make it behave like something it does not want to be. Thank you for understanding! **
19+
20+
-->

CHANGELOG.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,16 @@ All notable changes to this project will be documented in this file.
55
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/)
66

77
## [Unreleased]
8+
* feat(plugins): skip plugin cache flag when loading plugins (https://github.com/zellij-org/zellij/pull/2971)
9+
* fix(grid): recover from various errors (https://github.com/zellij-org/zellij/pull/2972)
10+
* fix(grid): flaky scroll with scroll region (https://github.com/zellij-org/zellij/pull/2935)
11+
* fix(plugins): display errors properly (https://github.com/zellij-org/zellij/pull/2975)
12+
* feat(terminal): implement synchronized renders (https://github.com/zellij-org/zellij/pull/2977)
13+
14+
## [0.39.2] - 2023-11-29
15+
* fix(cli): typo in cli help (https://github.com/zellij-org/zellij/pull/2906)
16+
* fix(sessions): slow session updates in the session-manager (https://github.com/zellij-org/zellij/pull/2951)
17+
* fix: compiler warnings (https://github.com/zellij-org/zellij/pull/2873)
818

919
## [0.39.1] - 2023-11-13
1020
* fix: styled underlines in editors (https://github.com/zellij-org/zellij/pull/2918)

default-plugins/status-bar/src/second_line.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -245,7 +245,7 @@ fn get_keys_and_hints(mi: &ModeInfo) -> Vec<(String, String, Vec<Key>)> {
245245
action_key(&km, &[A::SearchToggleOption(SOpt::WholeWord)])),
246246
]} else if mi.mode == IM::Session { vec![
247247
(s("Detach"), s("Detach"), action_key(&km, &[Action::Detach])),
248-
(s("Session Manager"), s("Manager"), action_key(&km, &[A::LaunchOrFocusPlugin(Default::default(), true, true, false), TO_NORMAL])), // not entirely accurate
248+
(s("Session Manager"), s("Manager"), action_key(&km, &[A::LaunchOrFocusPlugin(Default::default(), true, true, false, false), TO_NORMAL])), // not entirely accurate
249249
(s("Select pane"), s("Select"), to_normal_key),
250250
]} else if mi.mode == IM::Tmux { vec![
251251
(s("Move focus"), s("Move"), action_key_group(&km, &[

docs/THIRD_PARTY_INSTALL.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
[![Packaging status](https://repology.org/badge/vertical-allrepos/zellij.svg)](https://repology.org/project/zellij/versions)
1414

1515
### Arch Linux
16-
You can install the `zellij` package from the [official community repository](https://archlinux.org/packages/community/x86_64/zellij/):
16+
You can install the `zellij` package from the [official extra repository](https://archlinux.org/packages/extra/x86_64/zellij/):
1717

1818
```
1919
pacman -S zellij

src/main.rs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@ fn main() {
3131
start_suspended,
3232
})) = opts.command
3333
{
34+
let skip_plugin_cache = false; // N/A for this action
3435
let command_cli_action = CliAction::NewPane {
3536
command,
3637
plugin: None,
@@ -42,6 +43,7 @@ fn main() {
4243
close_on_exit,
4344
start_suspended,
4445
configuration: None,
46+
skip_plugin_cache,
4547
};
4648
commands::send_action_to_session(command_cli_action, opts.session, config);
4749
std::process::exit(0);
@@ -51,6 +53,7 @@ fn main() {
5153
floating,
5254
in_place,
5355
configuration,
56+
skip_plugin_cache,
5457
})) = opts.command
5558
{
5659
let command_cli_action = CliAction::NewPane {
@@ -64,6 +67,7 @@ fn main() {
6467
close_on_exit: false,
6568
start_suspended: false,
6669
configuration,
70+
skip_plugin_cache,
6771
};
6872
commands::send_action_to_session(command_cli_action, opts.session, config);
6973
std::process::exit(0);

zellij-server/src/background_jobs.rs

Lines changed: 27 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,8 @@ impl From<&BackgroundJob> for BackgroundJobContext {
7878

7979
static FLASH_DURATION_MS: u64 = 1000;
8080
static PLUGIN_ANIMATION_OFFSET_DURATION_MD: u64 = 500;
81-
static SESSION_READ_DURATION: u64 = 60000;
81+
static SESSION_READ_DURATION: u64 = 1000;
82+
static DEFAULT_SERIALIZATION_INTERVAL: u64 = 60000;
8283

8384
pub(crate) fn background_jobs_main(
8485
bus: Bus<BackgroundJob>,
@@ -90,6 +91,7 @@ pub(crate) fn background_jobs_main(
9091
let current_session_name = Arc::new(Mutex::new(String::default()));
9192
let current_session_info = Arc::new(Mutex::new(SessionInfo::default()));
9293
let current_session_layout = Arc::new(Mutex::new((String::new(), BTreeMap::new())));
94+
let last_serialization_time = Arc::new(Mutex::new(Instant::now()));
9395
let serialization_interval = serialization_interval.map(|s| s * 1000); // convert to
9496
// milliseconds
9597

@@ -165,6 +167,7 @@ pub(crate) fn background_jobs_main(
165167
let current_session_info = current_session_info.clone();
166168
let current_session_name = current_session_name.clone();
167169
let current_session_layout = current_session_layout.clone();
170+
let last_serialization_time = last_serialization_time.clone();
168171
async move {
169172
loop {
170173
let current_session_name =
@@ -185,11 +188,20 @@ pub(crate) fn background_jobs_main(
185188
session_infos_on_machine,
186189
resurrectable_sessions,
187190
));
188-
let _ = senders.send_to_screen(ScreenInstruction::DumpLayoutToHd);
189-
task::sleep(std::time::Duration::from_millis(
190-
serialization_interval.unwrap_or(SESSION_READ_DURATION),
191-
))
192-
.await;
191+
if last_serialization_time
192+
.lock()
193+
.unwrap()
194+
.elapsed()
195+
.as_millis()
196+
>= serialization_interval
197+
.unwrap_or(DEFAULT_SERIALIZATION_INTERVAL)
198+
.into()
199+
{
200+
let _ = senders.send_to_screen(ScreenInstruction::DumpLayoutToHd);
201+
*last_serialization_time.lock().unwrap() = Instant::now();
202+
}
203+
task::sleep(std::time::Duration::from_millis(SESSION_READ_DURATION))
204+
.await;
193205
}
194206
}
195207
});
@@ -421,10 +433,15 @@ fn find_resurrectable_sessions(
421433
{
422434
Ok(created) => Some(created),
423435
Err(e) => {
424-
log::error!(
425-
"Failed to read created stamp of resurrection file: {:?}",
426-
e
427-
);
436+
if e.kind() != std::io::ErrorKind::NotFound {
437+
// let's not spam the
438+
// logs if serialization
439+
// is disabled
440+
log::error!(
441+
"Failed to read created stamp of resurrection file: {:?}",
442+
e
443+
);
444+
}
428445
None
429446
},
430447
};

zellij-server/src/os_input_output.rs

Lines changed: 22 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -580,18 +580,17 @@ impl ServerOsApi for ServerOsInputOutput {
580580
.lock()
581581
.to_anyhow()
582582
.with_context(err_context)?;
583-
let mut terminal_id = None;
584-
{
585-
let current_ids: BTreeSet<u32> = self
586-
.terminal_id_to_raw_fd
587-
.lock()
588-
.to_anyhow()
589-
.with_context(err_context)?
590-
.keys()
591-
.copied()
592-
.collect();
593-
terminal_id = current_ids.last().map(|l| l + 1).or(Some(0));
594-
}
583+
let terminal_id = self
584+
.terminal_id_to_raw_fd
585+
.lock()
586+
.to_anyhow()
587+
.with_context(err_context)?
588+
.keys()
589+
.copied()
590+
.collect::<BTreeSet<u32>>()
591+
.last()
592+
.map(|l| l + 1)
593+
.or(Some(0));
595594
match terminal_id {
596595
Some(terminal_id) => {
597596
self.terminal_id_to_raw_fd
@@ -622,18 +621,17 @@ impl ServerOsApi for ServerOsInputOutput {
622621
fn reserve_terminal_id(&self) -> Result<u32> {
623622
let err_context = || "failed to reserve a terminal ID".to_string();
624623

625-
let mut terminal_id = None;
626-
{
627-
let current_ids: BTreeSet<u32> = self
628-
.terminal_id_to_raw_fd
629-
.lock()
630-
.to_anyhow()
631-
.with_context(err_context)?
632-
.keys()
633-
.copied()
634-
.collect();
635-
terminal_id = current_ids.last().map(|l| l + 1).or(Some(0));
636-
}
624+
let terminal_id = self
625+
.terminal_id_to_raw_fd
626+
.lock()
627+
.to_anyhow()
628+
.with_context(err_context)?
629+
.keys()
630+
.copied()
631+
.collect::<BTreeSet<u32>>()
632+
.last()
633+
.map(|l| l + 1)
634+
.or(Some(0));
637635
match terminal_id {
638636
Some(terminal_id) => {
639637
self.terminal_id_to_raw_fd

0 commit comments

Comments
 (0)